diff mbox

[RFC,28/37] cbus: retu-rtc: remove platform_device code

Message ID 1270656268-7034-29-git-send-email-felipe.balbi@nokia.com (mailing list archive)
State Accepted, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

Felipe Balbi April 7, 2010, 4:04 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/cbus/retu-rtc.c b/drivers/cbus/retu-rtc.c
index f34780b..40a42f1 100644
--- a/drivers/cbus/retu-rtc.c
+++ b/drivers/cbus/retu-rtc.c
@@ -49,16 +49,10 @@  static struct mutex retu_rtc_mutex;
 static u16 retu_rtc_alarm_expired;
 static u16 retu_rtc_reset_occurred;
 
-static DECLARE_COMPLETION(retu_rtc_exited);
 static DECLARE_COMPLETION(retu_rtc_sync);
 
 static void retu_rtc_barrier(void);
 
-static void retu_rtc_device_release(struct device *dev)
-{
-	complete(&retu_rtc_exited);
-}
-
 static ssize_t retu_rtc_time_show(struct device *dev, struct device_attribute *attr,
 				  char *buf)
 {
@@ -428,14 +422,6 @@  static struct device_driver retu_rtc_driver = {
 	.remove		= __devexit_p(retu_rtc_remove),
 };
 
-static struct platform_device retu_rtc_device = {
-	.name		= "retu-rtc",
-	.id		= -1,
-	.dev		= {
-		.release	= retu_rtc_device_release,
-	},
-};
-
 /* This function provides syncronization with the RTCS interrupt handler */
 static void retu_rtc_barrier(void)
 {
@@ -448,29 +434,12 @@  static void retu_rtc_barrier(void)
 
 static int __init retu_rtc_init(void)
 {
-	int ret;
-
-	init_completion(&retu_rtc_exited);
-
-	if ((ret = driver_register(&retu_rtc_driver)) != 0)
-		return ret;
-
-	if ((ret = platform_device_register(&retu_rtc_device)) != 0)
-		goto err_unregister_driver;
-
-	return 0;
-
-err_unregister_driver:
-	driver_unregister(&retu_rtc_driver);
-	return ret;
+	return driver_register(&retu_rtc_driver);
 }
 
 static void __exit retu_rtc_exit(void)
 {
-	platform_device_unregister(&retu_rtc_device);
 	driver_unregister(&retu_rtc_driver);
-
-	wait_for_completion(&retu_rtc_exited);
 }
 
 module_init(retu_rtc_init);