Re: [PATCH] drivers\gpio: use kobj_to_dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pt., 12 cze 2020 o 10:05 Wang Qing <wangqing@xxxxxxxx> napisał(a):
>
> Use kobj_to_dev() API instead of container_of().
>
> Signed-off-by: Wang Qing <wangqing@xxxxxxxx>
> ---
>  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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux