diff options
-rw-r--r-- | drivers/video/geode/gx1fb_core.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index bcf9cea54d8b..bb20a2289760 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c | |||
@@ -401,6 +401,30 @@ static void gx1fb_remove(struct pci_dev *pdev) | |||
401 | framebuffer_release(info); | 401 | framebuffer_release(info); |
402 | } | 402 | } |
403 | 403 | ||
404 | #ifndef MODULE | ||
405 | static void __init gx1fb_setup(char *options) | ||
406 | { | ||
407 | char *this_opt; | ||
408 | |||
409 | if (!options || !*options) | ||
410 | return; | ||
411 | |||
412 | while ((this_opt = strsep(&options, ","))) { | ||
413 | if (!*this_opt) | ||
414 | continue; | ||
415 | |||
416 | if (!strncmp(this_opt, "mode:", 5)) | ||
417 | strlcpy(mode_option, this_opt + 5, sizeof(mode_option)); | ||
418 | else if (!strncmp(this_opt, "crt:", 4)) | ||
419 | crt_option = !!simple_strtoul(this_opt + 4, NULL, 0); | ||
420 | else if (!strncmp(this_opt, "panel:", 6)) | ||
421 | strlcpy(panel_option, this_opt + 6, sizeof(panel_option)); | ||
422 | else | ||
423 | strlcpy(mode_option, this_opt, sizeof(mode_option)); | ||
424 | } | ||
425 | } | ||
426 | #endif | ||
427 | |||
404 | static struct pci_device_id gx1fb_id_table[] = { | 428 | static struct pci_device_id gx1fb_id_table[] = { |
405 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_VIDEO, | 429 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_VIDEO, |
406 | PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16, | 430 | PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16, |
@@ -420,8 +444,11 @@ static struct pci_driver gx1fb_driver = { | |||
420 | static int __init gx1fb_init(void) | 444 | static int __init gx1fb_init(void) |
421 | { | 445 | { |
422 | #ifndef MODULE | 446 | #ifndef MODULE |
423 | if (fb_get_options("gx1fb", NULL)) | 447 | char *option = NULL; |
448 | |||
449 | if (fb_get_options("gx1fb", &option)) | ||
424 | return -ENODEV; | 450 | return -ENODEV; |
451 | gx1fb_setup(option); | ||
425 | #endif | 452 | #endif |
426 | return pci_register_driver(&gx1fb_driver); | 453 | return pci_register_driver(&gx1fb_driver); |
427 | } | 454 | } |