diff options
author | zhouchuangao <chuangaozhou@gmail.com> | 2020-04-26 07:13:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-28 21:05:42 +0200 |
commit | baf1d9c182935e88aab08701b0a0b22871117fe0 (patch) | |
tree | e5996e6f8f4bb970589b6b26acb933caaa5afd99 | |
parent | Merge 5.7-rc3 into driver-core-next (diff) | |
download | linux-baf1d9c182935e88aab08701b0a0b22871117fe0.tar.xz linux-baf1d9c182935e88aab08701b0a0b22871117fe0.zip |
driver/base/soc: Use kobj_to_dev() API
Use kobj_to_dev() API instead of container_of().
Signed-off-by: zhouchuangao <zhouchuangao@xiaomi.com>
Link: https://lore.kernel.org/r/1587878031-16591-1-git-send-email-zhouchuangao@xiaomi.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/base/soc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/soc.c b/drivers/base/soc.c index 4af11a423475..a5bae551167d 100644 --- a/drivers/base/soc.c +++ b/drivers/base/soc.c @@ -46,7 +46,7 @@ static umode_t soc_attribute_mode(struct kobject *kobj, struct attribute *attr, int index) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); if ((attr == &dev_attr_machine.attr) |