diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2020-09-01 10:27:17 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-09-01 11:06:08 +0200 |
commit | fff15f23b8e74c2f969a5d25f29d0565e76e7137 (patch) | |
tree | d8dad6164a2865ed2ecd21f2f507b1a322331e75 /drivers/thunderbolt/switch.c | |
parent | Linux 5.9-rc3 (diff) | |
download | linux-fff15f23b8e74c2f969a5d25f29d0565e76e7137.tar.xz linux-fff15f23b8e74c2f969a5d25f29d0565e76e7137.zip |
thunderbolt: Use kobj_to_dev() instead of container_of()
Doesn't really matter for an individual driver, but it may
get coppied to lots more. I consider it's a little tidy up.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/switch.c')
-rw-r--r-- | drivers/thunderbolt/switch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 3845db569e4c..99effd6be3c1 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -1648,7 +1648,7 @@ static struct attribute *switch_attrs[] = { static umode_t switch_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 tb_switch *sw = tb_to_switch(dev); if (attr == &dev_attr_device.attr) { |