mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
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>
This commit is contained in:
parent
96fa72ffb2
commit
baf1d9c182
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ static umode_t soc_attribute_mode(struct kobject *kobj,
|
||||||
struct attribute *attr,
|
struct attribute *attr,
|
||||||
int index)
|
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);
|
struct soc_device *soc_dev = container_of(dev, struct soc_device, dev);
|
||||||
|
|
||||||
if ((attr == &dev_attr_machine.attr)
|
if ((attr == &dev_attr_machine.attr)
|
||||||
|
|
Loading…
Add table
Reference in a new issue