diff options
Diffstat (limited to 'drivers/video/arcfb.c')
-rw-r--r-- | drivers/video/arcfb.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 126daff1c848..a1fc8bbb1090 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 | ||
505 | static void arcfb_platform_release(struct device *device) | ||
506 | { | ||
507 | } | ||
508 | |||
509 | static struct fb_ops arcfb_ops = { | 505 | static struct fb_ops arcfb_ops = { |
510 | .owner = THIS_MODULE, | 506 | .owner = THIS_MODULE, |
511 | .fb_open = arcfb_open, | 507 | .fb_open = arcfb_open, |
@@ -515,7 +511,6 @@ static struct fb_ops arcfb_ops = { | |||
515 | .fb_fillrect = arcfb_fillrect, | 511 | .fb_fillrect = arcfb_fillrect, |
516 | .fb_copyarea = arcfb_copyarea, | 512 | .fb_copyarea = arcfb_copyarea, |
517 | .fb_imageblit = arcfb_imageblit, | 513 | .fb_imageblit = arcfb_imageblit, |
518 | .fb_cursor = soft_cursor, | ||
519 | .fb_ioctl = arcfb_ioctl, | 514 | .fb_ioctl = arcfb_ioctl, |
520 | }; | 515 | }; |
521 | 516 | ||
@@ -624,13 +619,7 @@ static struct device_driver arcfb_driver = { | |||
624 | .remove = arcfb_remove, | 619 | .remove = arcfb_remove, |
625 | }; | 620 | }; |
626 | 621 | ||
627 | static struct platform_device arcfb_device = { | 622 | static struct platform_device *arcfb_device; |
628 | .name = "arcfb", | ||
629 | .id = 0, | ||
630 | .dev = { | ||
631 | .release = arcfb_platform_release, | ||
632 | } | ||
633 | }; | ||
634 | 623 | ||
635 | static int __init arcfb_init(void) | 624 | static int __init arcfb_init(void) |
636 | { | 625 | { |
@@ -641,9 +630,16 @@ static int __init arcfb_init(void) | |||
641 | 630 | ||
642 | ret = driver_register(&arcfb_driver); | 631 | ret = driver_register(&arcfb_driver); |
643 | if (!ret) { | 632 | if (!ret) { |
644 | ret = platform_device_register(&arcfb_device); | 633 | arcfb_device = platform_device_alloc("arcfb", 0); |
645 | if (ret) | 634 | if (arcfb_device) { |
635 | ret = platform_device_add(arcfb_device); | ||
636 | } else { | ||
637 | ret = -ENOMEM; | ||
638 | } | ||
639 | if (ret) { | ||
640 | platform_device_put(arcfb_device); | ||
646 | driver_unregister(&arcfb_driver); | 641 | driver_unregister(&arcfb_driver); |
642 | } | ||
647 | } | 643 | } |
648 | return ret; | 644 | return ret; |
649 | 645 | ||
@@ -651,7 +647,7 @@ static int __init arcfb_init(void) | |||
651 | 647 | ||
652 | static void __exit arcfb_exit(void) | 648 | static void __exit arcfb_exit(void) |
653 | { | 649 | { |
654 | platform_device_unregister(&arcfb_device); | 650 | platform_device_unregister(arcfb_device); |
655 | driver_unregister(&arcfb_driver); | 651 | driver_unregister(&arcfb_driver); |
656 | } | 652 | } |
657 | 653 | ||