* [PATCH] hwmon: (max6650): Switch to using the new API kobj_to_dev()
@ 2020-12-31 1:03 Tian Tao
2021-01-08 15:34 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2020-12-31 1:03 UTC (permalink / raw)
To: jdelvare, linux; +Cc: linux-hwmon
Switch to using the new API kobj_to_dev() to fix the below warnning:
drivers/hwmon/max6650.c:324:60-61: WARNING opportunity for
kobj_to_dev().
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/hwmon/max6650.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c
index cc7f298..f8d4534 100644
--- a/drivers/hwmon/max6650.c
+++ b/drivers/hwmon/max6650.c
@@ -321,7 +321,7 @@ static SENSOR_DEVICE_ATTR_RO(gpio2_alarm, alarm, MAX6650_ALRM_GPIO2);
static umode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a,
int n)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct max6650_data *data = dev_get_drvdata(dev);
struct device_attribute *devattr;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hwmon: (max6650): Switch to using the new API kobj_to_dev()
2020-12-31 1:03 [PATCH] hwmon: (max6650): Switch to using the new API kobj_to_dev() Tian Tao
@ 2021-01-08 15:34 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-01-08 15:34 UTC (permalink / raw)
To: Tian Tao; +Cc: jdelvare, linux-hwmon
On Thu, Dec 31, 2020 at 09:03:41AM +0800, Tian Tao wrote:
> Switch to using the new API kobj_to_dev() to fix the below warnning:
> drivers/hwmon/max6650.c:324:60-61: WARNING opportunity for
> kobj_to_dev().
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-08 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-31 1:03 [PATCH] hwmon: (max6650): Switch to using the new API kobj_to_dev() Tian Tao
2021-01-08 15:34 ` Guenter Roeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.