summaryrefslogtreecommitdiffstats
path: root/drivers/w1/slaves/w1_ds2780.c
diff options
context:
space:
mode:
authordongjian <dongjian@yulong.com>2021-03-16 07:59:47 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-24 08:26:30 +0100
commitb0ebbaeee3d78a68d3413bdaeb707e527c5d4dbe (patch)
tree7cfb627fa216c149451b9aca8e61692c7465b8a1 /drivers/w1/slaves/w1_ds2780.c
parentw1: w1_therm: use clamp() in int_to_short() (diff)
downloadlinux-b0ebbaeee3d78a68d3413bdaeb707e527c5d4dbe.tar.xz
linux-b0ebbaeee3d78a68d3413bdaeb707e527c5d4dbe.zip
w1: Use kobj_to_dev()[RESEND]
Use kobj_to_dev() instead of open-coding it Signed-off-by: dongjian <dongjian@yulong.com> Link: https://lore.kernel.org/r/1615877987-32163-1-git-send-email-dj0227@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/slaves/w1_ds2780.c')
-rw-r--r--drivers/w1/slaves/w1_ds2780.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/slaves/w1_ds2780.c b/drivers/w1/slaves/w1_ds2780.c
index c281fe5ed688..9dcb5a54f7fc 100644
--- a/drivers/w1/slaves/w1_ds2780.c
+++ b/drivers/w1/slaves/w1_ds2780.c
@@ -90,7 +90,7 @@ static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr, char *buf,
loff_t off, size_t count)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
return w1_ds2780_io(dev, buf, off, count, 0);
}