LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] RTC: use kobj_to_dev
@ 2020-02-25 2:19 guosongsu
2020-03-03 16:09 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: guosongsu @ 2020-02-25 2:19 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel, suguosong
From: suguosong <suguosong@xiaomi.com>
use kobj_to_dev instead of open-conding it
Signed-off-by: suguosong <suguosong@xiaomi.com>
---
drivers/rtc/sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.14.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] RTC: use kobj_to_dev
2020-02-25 2:19 [PATCH] RTC: use kobj_to_dev guosongsu
@ 2020-03-03 16:09 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2020-03-03 16:09 UTC (permalink / raw)
To: guosongsu; +Cc: Alessandro Zummo, linux-rtc, linux-kernel, suguosong
On 25/02/2020 10:19:23+0800, guosongsu@gmail.com wrote:
> From: suguosong <suguosong@xiaomi.com>
>
> use kobj_to_dev instead of open-conding it
>
> Signed-off-by: suguosong <suguosong@xiaomi.com>
> ---
> drivers/rtc/sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied, thanks.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-03 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 2:19 [PATCH] RTC: use kobj_to_dev guosongsu
2020-03-03 16:09 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).