Commit 97cd738c authored by Wang Qing's avatar Wang Qing Committed by Bartosz Golaszewski

gpiolib: sysfs: use kobj_to_dev

Use kobj_to_dev() API instead of container_of().
Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent e012d15a
......@@ -365,7 +365,7 @@ static DEVICE_ATTR_RW(active_low);
static umode_t gpio_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 gpiod_data *data = dev_get_drvdata(dev);
struct gpio_desc *desc = data->desc;
umode_t mode = attr->mode;
......
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