From: Felipe Balbi <felipe.balbi@xxxxxxxxx> still needs work, but it's now using platform_driver structure. Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx> --- drivers/cbus/retu-rtc.c | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/cbus/retu-rtc.c b/drivers/cbus/retu-rtc.c index 40a42f1..2947c80 100644 --- a/drivers/cbus/retu-rtc.c +++ b/drivers/cbus/retu-rtc.c @@ -355,8 +355,9 @@ static int retu_rtc_init_irq(void) } -static int __devinit retu_rtc_probe(struct device *dev) +static int __devinit retu_rtc_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; int r; r = retu_get_status(); @@ -402,8 +403,10 @@ err_unregister_time: return r; } -static int __devexit retu_rtc_remove(struct device *dev) +static int __devexit retu_rtc_remove(struct platform_device *pdev) { + struct device *dev = &pdev->dev; + retu_disable_irq(RETU_INT_RTCS); retu_free_irq(RETU_INT_RTCS); retu_free_irq(RETU_INT_RTCA); @@ -412,14 +415,16 @@ static int __devexit retu_rtc_remove(struct device *dev) device_remove_file(dev, &dev_attr_alarm); device_remove_file(dev, &dev_attr_reset); device_remove_file(dev, &dev_attr_time); + return 0; } -static struct device_driver retu_rtc_driver = { - .name = "retu-rtc", - .bus = &platform_bus_type, +static struct platform_driver retu_rtc_driver = { .probe = retu_rtc_probe, .remove = __devexit_p(retu_rtc_remove), + .driver = { + .name = "retu-rtc", + }, }; /* This function provides syncronization with the RTCS interrupt handler */ @@ -434,12 +439,12 @@ static void retu_rtc_barrier(void) static int __init retu_rtc_init(void) { - return driver_register(&retu_rtc_driver); + return platform_driver_register(&retu_rtc_driver); } static void __exit retu_rtc_exit(void) { - driver_unregister(&retu_rtc_driver); + platform_driver_unregister(&retu_rtc_driver); } module_init(retu_rtc_init); -- 1.7.0.rc0.33.g7c3932 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html