diff options
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r-- | drivers/rtc/interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 6f11f6dfdd9d..ef40df0f169d 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -179,7 +179,7 @@ struct class_device *rtc_class_open(char *name) | |||
179 | down(&rtc_class->sem); | 179 | down(&rtc_class->sem); |
180 | list_for_each_entry(class_dev_tmp, &rtc_class->children, node) { | 180 | list_for_each_entry(class_dev_tmp, &rtc_class->children, node) { |
181 | if (strncmp(class_dev_tmp->class_id, name, BUS_ID_SIZE) == 0) { | 181 | if (strncmp(class_dev_tmp->class_id, name, BUS_ID_SIZE) == 0) { |
182 | class_dev = class_dev_tmp; | 182 | class_dev = class_device_get(class_dev_tmp); |
183 | break; | 183 | break; |
184 | } | 184 | } |
185 | } | 185 | } |
@@ -197,6 +197,7 @@ EXPORT_SYMBOL_GPL(rtc_class_open); | |||
197 | void rtc_class_close(struct class_device *class_dev) | 197 | void rtc_class_close(struct class_device *class_dev) |
198 | { | 198 | { |
199 | module_put(to_rtc_device(class_dev)->owner); | 199 | module_put(to_rtc_device(class_dev)->owner); |
200 | class_device_put(class_dev); | ||
200 | } | 201 | } |
201 | EXPORT_SYMBOL_GPL(rtc_class_close); | 202 | EXPORT_SYMBOL_GPL(rtc_class_close); |
202 | 203 | ||