diff options
author | suguosong <suguosong@xiaomi.com> | 2020-02-25 03:19:23 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2020-03-16 11:12:08 +0100 |
commit | ae243ef0afbcbf2e68e2afd5e33753eb2e03d5d6 (patch) | |
tree | b57bf0a784193208a15dcfbae4d9bf9dde732c7c /drivers/rtc/sysfs.c | |
parent | rtc: cmos: Use spin_lock_irqsave() in cmos_interrupt() (diff) | |
download | linux-ae243ef0afbcbf2e68e2afd5e33753eb2e03d5d6.tar.xz linux-ae243ef0afbcbf2e68e2afd5e33753eb2e03d5d6.zip |
rtc: sysfs: use kobj_to_dev
use kobj_to_dev instead of open-conding it
Signed-off-by: suguosong <suguosong@xiaomi.com>
Link: https://lore.kernel.org/r/20200225021923.8570-1-guosongsu@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/sysfs.c')
-rw-r--r-- | drivers/rtc/sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/sysfs.c b/drivers/rtc/sysfs.c index b7ca7d79fb28..950fac0d41ff 100644 --- a/drivers/rtc/sysfs.c +++ b/drivers/rtc/sysfs.c @@ -279,7 +279,7 @@ static bool rtc_does_wakealarm(struct rtc_device *rtc) static umode_t rtc_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct rtc_device *rtc = to_rtc_device(dev); umode_t mode = attr->mode; |