aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/class.c')
-rw-r--r--drivers/rtc/class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 413c7d54ea1..1cb61a761cb 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -69,6 +69,7 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev,
69 rtc->id = id; 69 rtc->id = id;
70 rtc->ops = ops; 70 rtc->ops = ops;
71 rtc->owner = owner; 71 rtc->owner = owner;
72 rtc->max_user_freq = 64;
72 rtc->class_dev.dev = dev; 73 rtc->class_dev.dev = dev;
73 rtc->class_dev.class = rtc_class; 74 rtc->class_dev.class = rtc_class;
74 rtc->class_dev.release = rtc_device_release; 75 rtc->class_dev.release = rtc_device_release;
@@ -93,7 +94,9 @@ exit_kfree:
93 kfree(rtc); 94 kfree(rtc);
94 95
95exit_idr: 96exit_idr:
97 mutex_lock(&idr_lock);
96 idr_remove(&rtc_idr, id); 98 idr_remove(&rtc_idr, id);
99 mutex_unlock(&idr_lock);
97 100
98exit: 101exit:
99 dev_err(dev, "rtc core: unable to register %s, err = %d\n", 102 dev_err(dev, "rtc core: unable to register %s, err = %d\n",