diff options
author | Ding Xiang <dingxiang@cmss.chinamobile.com> | 2020-11-17 10:59:33 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-23 17:59:51 +0100 |
commit | 6b8fb5ecf7f357d6a70a87f87d94c967c174cb97 (patch) | |
tree | a03e9aa49161eda504ef620fd8d2234deeb1f9a8 /drivers/staging/fieldbus | |
parent | ba3e4a2a0b3c639d3835f2f1dce27d79576ae453 (diff) |
staging: fieldbus: use kobj_to_dev() to get device
Use kobj_to_dev() instead of container_of()
Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20201117025933.668938-1-dingxiang@cmss.chinamobile.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fieldbus')
-rw-r--r-- | drivers/staging/fieldbus/dev_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fieldbus/dev_core.c b/drivers/staging/fieldbus/dev_core.c index 1ba0234cc60d..5aab734606ea 100644 --- a/drivers/staging/fieldbus/dev_core.c +++ b/drivers/staging/fieldbus/dev_core.c @@ -134,7 +134,7 @@ static struct attribute *fieldbus_attrs[] = { static umode_t fieldbus_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 fieldbus_dev *fb = dev_get_drvdata(dev); umode_t mode = attr->mode; |