RTC: use kobj_to_dev
PATCH 1/1 RTC: use kobj_to_dev
From: suguosong <[email protected]>
use kobj_to_dev instead of open-conding it
Signed-off-by suguosong <[email protected]>
--- drivers/rtc/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/sysfs.c +1 -1
@@ -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;
Signature · 1 line
2.14.1
Quoted 9 lines · On 25/02/2020 10:19:23+0800, [email protected] wrote:
From: suguosong <[email protected]>
use
kobj_to_devinstead of open-conding itSigned-off-by suguosong <[email protected]>--- drivers/rtc/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Signature · 3 lines
Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com