Commit ae243ef0 authored by suguosong's avatar suguosong Committed by Alexandre Belloni

rtc: sysfs: use kobj_to_dev

use kobj_to_dev instead of open-conding it
Signed-off-by: default avatarsuguosong <suguosong@xiaomi.com>
Link: https://lore.kernel.org/r/20200225021923.8570-1-guosongsu@gmail.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 66e4f4a9
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment