aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/vr41xx_rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/vr41xx_rtc.c')
-rw-r--r--drivers/char/vr41xx_rtc.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/char/vr41xx_rtc.c b/drivers/char/vr41xx_rtc.c
index 5e3292df69d8..435b30748e23 100644
--- a/drivers/char/vr41xx_rtc.c
+++ b/drivers/char/vr41xx_rtc.c
@@ -560,13 +560,11 @@ static struct miscdevice rtc_miscdevice = {
560 .fops = &rtc_fops, 560 .fops = &rtc_fops,
561}; 561};
562 562
563static int rtc_probe(struct device *dev) 563static int rtc_probe(struct platform_device *pdev)
564{ 564{
565 struct platform_device *pdev;
566 unsigned int irq; 565 unsigned int irq;
567 int retval; 566 int retval;
568 567
569 pdev = to_platform_device(dev);
570 if (pdev->num_resources != 2) 568 if (pdev->num_resources != 2)
571 return -EBUSY; 569 return -EBUSY;
572 570
@@ -635,7 +633,7 @@ static int rtc_probe(struct device *dev)
635 return 0; 633 return 0;
636} 634}
637 635
638static int rtc_remove(struct device *dev) 636static int rtc_remove(struct platform_device *dev)
639{ 637{
640 int retval; 638 int retval;
641 639
@@ -655,11 +653,12 @@ static int rtc_remove(struct device *dev)
655 653
656static struct platform_device *rtc_platform_device; 654static struct platform_device *rtc_platform_device;
657 655
658static struct device_driver rtc_device_driver = { 656static struct platform_driver rtc_device_driver = {
659 .name = rtc_name,
660 .bus = &platform_bus_type,
661 .probe = rtc_probe, 657 .probe = rtc_probe,
662 .remove = rtc_remove, 658 .remove = rtc_remove,
659 .driver = {
660 .name = rtc_name,
661 },
663}; 662};
664 663
665static int __devinit vr41xx_rtc_init(void) 664static int __devinit vr41xx_rtc_init(void)
@@ -691,7 +690,7 @@ static int __devinit vr41xx_rtc_init(void)
691 if (IS_ERR(rtc_platform_device)) 690 if (IS_ERR(rtc_platform_device))
692 return PTR_ERR(rtc_platform_device); 691 return PTR_ERR(rtc_platform_device);
693 692
694 retval = driver_register(&rtc_device_driver); 693 retval = platform_driver_register(&rtc_device_driver);
695 if (retval < 0) 694 if (retval < 0)
696 platform_device_unregister(rtc_platform_device); 695 platform_device_unregister(rtc_platform_device);
697 696
@@ -700,7 +699,7 @@ static int __devinit vr41xx_rtc_init(void)
700 699
701static void __devexit vr41xx_rtc_exit(void) 700static void __devexit vr41xx_rtc_exit(void)
702{ 701{
703 driver_unregister(&rtc_device_driver); 702 platform_driver_unregister(&rtc_device_driver);
704 703
705 platform_device_unregister(rtc_platform_device); 704 platform_device_unregister(rtc_platform_device);
706} 705}