diff options
Diffstat (limited to 'drivers/video/arcfb.c')
-rw-r--r-- | drivers/video/arcfb.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index a1fc8bbb1090..2784f0a9d693 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
@@ -441,7 +441,7 @@ static int arcfb_ioctl(struct inode *inode, struct file *file, | |||
441 | * the fb. it's inefficient for them to do anything less than 64*8 | 441 | * the fb. it's inefficient for them to do anything less than 64*8 |
442 | * writes since we update the lcd in each write() anyway. | 442 | * writes since we update the lcd in each write() anyway. |
443 | */ | 443 | */ |
444 | static ssize_t arcfb_write(struct file *file, const char *buf, size_t count, | 444 | static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t count, |
445 | loff_t *ppos) | 445 | loff_t *ppos) |
446 | { | 446 | { |
447 | /* modded from epson 1355 */ | 447 | /* modded from epson 1355 */ |
@@ -514,9 +514,8 @@ static struct fb_ops arcfb_ops = { | |||
514 | .fb_ioctl = arcfb_ioctl, | 514 | .fb_ioctl = arcfb_ioctl, |
515 | }; | 515 | }; |
516 | 516 | ||
517 | static int __init arcfb_probe(struct device *device) | 517 | static int __init arcfb_probe(struct platform_device *dev) |
518 | { | 518 | { |
519 | struct platform_device *dev = to_platform_device(device); | ||
520 | struct fb_info *info; | 519 | struct fb_info *info; |
521 | int retval = -ENOMEM; | 520 | int retval = -ENOMEM; |
522 | int videomemorysize; | 521 | int videomemorysize; |
@@ -559,7 +558,7 @@ static int __init arcfb_probe(struct device *device) | |||
559 | retval = register_framebuffer(info); | 558 | retval = register_framebuffer(info); |
560 | if (retval < 0) | 559 | if (retval < 0) |
561 | goto err1; | 560 | goto err1; |
562 | dev_set_drvdata(&dev->dev, info); | 561 | platform_set_drvdata(dev, info); |
563 | if (irq) { | 562 | if (irq) { |
564 | par->irq = irq; | 563 | par->irq = irq; |
565 | if (request_irq(par->irq, &arcfb_interrupt, SA_SHIRQ, | 564 | if (request_irq(par->irq, &arcfb_interrupt, SA_SHIRQ, |
@@ -600,9 +599,9 @@ err: | |||
600 | return retval; | 599 | return retval; |
601 | } | 600 | } |
602 | 601 | ||
603 | static int arcfb_remove(struct device *device) | 602 | static int arcfb_remove(struct platform_device *dev) |
604 | { | 603 | { |
605 | struct fb_info *info = dev_get_drvdata(device); | 604 | struct fb_info *info = platform_get_drvdata(dev); |
606 | 605 | ||
607 | if (info) { | 606 | if (info) { |
608 | unregister_framebuffer(info); | 607 | unregister_framebuffer(info); |
@@ -612,11 +611,12 @@ static int arcfb_remove(struct device *device) | |||
612 | return 0; | 611 | return 0; |
613 | } | 612 | } |
614 | 613 | ||
615 | static struct device_driver arcfb_driver = { | 614 | static struct platform_driver arcfb_driver = { |
616 | .name = "arcfb", | ||
617 | .bus = &platform_bus_type, | ||
618 | .probe = arcfb_probe, | 615 | .probe = arcfb_probe, |
619 | .remove = arcfb_remove, | 616 | .remove = arcfb_remove, |
617 | .driver = { | ||
618 | .name = "arcfb", | ||
619 | }, | ||
620 | }; | 620 | }; |
621 | 621 | ||
622 | static struct platform_device *arcfb_device; | 622 | static struct platform_device *arcfb_device; |
@@ -628,7 +628,7 @@ static int __init arcfb_init(void) | |||
628 | if (!arcfb_enable) | 628 | if (!arcfb_enable) |
629 | return -ENXIO; | 629 | return -ENXIO; |
630 | 630 | ||
631 | ret = driver_register(&arcfb_driver); | 631 | ret = platform_driver_register(&arcfb_driver); |
632 | if (!ret) { | 632 | if (!ret) { |
633 | arcfb_device = platform_device_alloc("arcfb", 0); | 633 | arcfb_device = platform_device_alloc("arcfb", 0); |
634 | if (arcfb_device) { | 634 | if (arcfb_device) { |
@@ -638,7 +638,7 @@ static int __init arcfb_init(void) | |||
638 | } | 638 | } |
639 | if (ret) { | 639 | if (ret) { |
640 | platform_device_put(arcfb_device); | 640 | platform_device_put(arcfb_device); |
641 | driver_unregister(&arcfb_driver); | 641 | platform_driver_unregister(&arcfb_driver); |
642 | } | 642 | } |
643 | } | 643 | } |
644 | return ret; | 644 | return ret; |
@@ -648,7 +648,7 @@ static int __init arcfb_init(void) | |||
648 | static void __exit arcfb_exit(void) | 648 | static void __exit arcfb_exit(void) |
649 | { | 649 | { |
650 | platform_device_unregister(arcfb_device); | 650 | platform_device_unregister(arcfb_device); |
651 | driver_unregister(&arcfb_driver); | 651 | platform_driver_unregister(&arcfb_driver); |
652 | } | 652 | } |
653 | 653 | ||
654 | module_param(num_cols, ulong, 0); | 654 | module_param(num_cols, ulong, 0); |