lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcmM0mx7-3P96n092cz0mfV22OK+jB_Gvqsrhv2PsqEFQ@mail.gmail.com>
Date:   Mon, 6 May 2019 12:01:41 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>
Subject: Re: [PATCH next 20/25] platform/x86: asus-wmi: Use dev_get_drvdata()

On Tue, Apr 23, 2019 at 10:40 AM Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
>
> Using dev_get_drvdata directly.
>

Acked-by: Andy Shevchenko <andy.shevchenko@...il.com>

> Cc: Darren Hart <dvhart@...radead.org>
> Cc: Andy Shevchenko <andy@...radead.org>
> Cc: platform-driver-x86@...r.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> ---
>  drivers/platform/x86/asus-wmi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index ee1fa93708ec..fb9e4e02c068 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -1361,8 +1361,7 @@ static umode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj,
>                                           struct attribute *attr, int idx)
>  {
>         struct device *dev = container_of(kobj, struct device, kobj);
> -       struct platform_device *pdev = to_platform_device(dev->parent);
> -       struct asus_wmi *asus = platform_get_drvdata(pdev);
> +       struct asus_wmi *asus = dev_get_drvdata(dev->parent);
>         int dev_id = -1;
>         int fan_attr = -1;
>         u32 value = ASUS_WMI_UNSUPPORTED_METHOD;
> --
> 2.20.1
>


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ