aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/arcfb.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index 126daff1c848..6aa9f824c185 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -502,10 +502,6 @@ static ssize_t arcfb_write(struct file *file, const char *buf, size_t count,
502 return err; 502 return err;
503} 503}
504 504
505static void arcfb_platform_release(struct device *device)
506{
507}
508
509static struct fb_ops arcfb_ops = { 505static struct fb_ops arcfb_ops = {
510 .owner = THIS_MODULE, 506 .owner = THIS_MODULE,
511 .fb_open = arcfb_open, 507 .fb_open = arcfb_open,
@@ -624,13 +620,7 @@ static struct device_driver arcfb_driver = {
624 .remove = arcfb_remove, 620 .remove = arcfb_remove,
625}; 621};
626 622
627static struct platform_device arcfb_device = { 623static struct platform_device *arcfb_device;
628 .name = "arcfb",
629 .id = 0,
630 .dev = {
631 .release = arcfb_platform_release,
632 }
633};
634 624
635static int __init arcfb_init(void) 625static int __init arcfb_init(void)
636{ 626{
@@ -641,9 +631,16 @@ static int __init arcfb_init(void)
641 631
642 ret = driver_register(&arcfb_driver); 632 ret = driver_register(&arcfb_driver);
643 if (!ret) { 633 if (!ret) {
644 ret = platform_device_register(&arcfb_device); 634 arcfb_device = platform_device_alloc("arcfb", 0);
645 if (ret) 635 if (arcfb_device) {
636 ret = platform_device_add(arcfb_device);
637 } else {
638 ret = -ENOMEM;
639 }
640 if (ret) {
641 platform_device_put(arcfb_device);
646 driver_unregister(&arcfb_driver); 642 driver_unregister(&arcfb_driver);
643 }
647 } 644 }
648 return ret; 645 return ret;
649 646
@@ -651,7 +648,7 @@ static int __init arcfb_init(void)
651 648
652static void __exit arcfb_exit(void) 649static void __exit arcfb_exit(void)
653{ 650{
654 platform_device_unregister(&arcfb_device); 651 platform_device_unregister(arcfb_device);
655 driver_unregister(&arcfb_driver); 652 driver_unregister(&arcfb_driver);
656} 653}
657 654