Commit 224941c9 authored by Wang Qing's avatar Wang Qing Committed by Sebastian Reichel

power: supply: use kobj_to_dev

Use kobj_to_dev() API instead of open-coded container_of().
Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 0768e6e4
......@@ -343,7 +343,7 @@ static umode_t power_supply_attr_is_visible(struct kobject *kobj,
struct attribute *attr,
int attrno)
{
struct device *dev = container_of(kobj, struct device, kobj);
struct device *dev = kobj_to_dev(kobj);
struct power_supply *psy = dev_get_drvdata(dev);
umode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment