[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMpxmJVBKnRinJuh7scvUCV4gci3A_7p=LW9n5yhc+RC6aipbQ@mail.gmail.com>
Date: Mon, 15 Jun 2020 10:08:13 +0200
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
To: Wang Qing <wangqing@...o.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
linux-gpio <linux-gpio@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, opensource.kernel@...o.com
Subject: Re: [PATCH] drivers\gpio: use kobj_to_dev
pt., 12 cze 2020 o 10:05 Wang Qing <wangqing@...o.com> napisaĆ(a):
>
> Use kobj_to_dev() API instead of container_of().
>
> Signed-off-by: Wang Qing <wangqing@...o.com>
> ---
> drivers/gpio/gpiolib-sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> mode change 100644 => 100755 drivers/gpio/gpiolib-sysfs.c
>
> diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
> index 23e3d33..82371fe
> --- a/drivers/gpio/gpiolib-sysfs.c
> +++ b/drivers/gpio/gpiolib-sysfs.c
> @@ -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;
> --
> 2.7.4
>
Patch applied, thanks!
Bartosz
Powered by blists - more mailing lists