aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r--drivers/rtc/rtc-dev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 2c13433089a0..671b14ec28bb 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -396,7 +396,7 @@ static const struct file_operations rtc_dev_fops = {
396 396
397/* insertion/removal hooks */ 397/* insertion/removal hooks */
398 398
399void rtc_dev_add_device(struct rtc_device *rtc) 399void rtc_dev_prepare(struct rtc_device *rtc)
400{ 400{
401 if (!rtc_devt) 401 if (!rtc_devt)
402 return; 402 return;
@@ -418,7 +418,10 @@ void rtc_dev_add_device(struct rtc_device *rtc)
418 418
419 cdev_init(&rtc->char_dev, &rtc_dev_fops); 419 cdev_init(&rtc->char_dev, &rtc_dev_fops);
420 rtc->char_dev.owner = rtc->owner; 420 rtc->char_dev.owner = rtc->owner;
421}
421 422
423void rtc_dev_add_device(struct rtc_device *rtc)
424{
422 if (cdev_add(&rtc->char_dev, rtc->dev.devt, 1)) 425 if (cdev_add(&rtc->char_dev, rtc->dev.devt, 1))
423 printk(KERN_WARNING "%s: failed to add char device %d:%d\n", 426 printk(KERN_WARNING "%s: failed to add char device %d:%d\n",
424 rtc->name, MAJOR(rtc_devt), rtc->id); 427 rtc->name, MAJOR(rtc_devt), rtc->id);