summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/domain.c
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-09-01 16:27:17 +0800
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-09-01 12:06:08 +0300
commitfff15f23b8e74c2f969a5d25f29d0565e76e7137 (patch)
treed8dad6164a2865ed2ecd21f2f507b1a322331e75 /drivers/thunderbolt/domain.c
parentf75aef392f869018f78cfedf3c320a6b3fcfda6b (diff)
downloadlinux-fff15f23b8e74c2f969a5d25f29d0565e76e7137.tar.gz
linux-fff15f23b8e74c2f969a5d25f29d0565e76e7137.tar.bz2
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/domain.c')
-rw-r--r--drivers/thunderbolt/domain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c
index bba4cbfa9759..7a192b7ea85e 100644
--- a/drivers/thunderbolt/domain.c
+++ b/drivers/thunderbolt/domain.c
@@ -275,7 +275,7 @@ static struct attribute *domain_attrs[] = {
static umode_t domain_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 *tb = container_of(dev, struct tb, dev);
if (attr == &dev_attr_boot_acl.attr) {