@@ -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);