diff options
author | Fuqian Huang <huangfq.daxian@gmail.com> | 2019-07-01 05:24:26 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-07-03 14:38:06 +0200 |
commit | 8e8fe446a91caf4537f512572e4bf52f8f2154a9 (patch) | |
tree | f0e1bfaf77dd93762d81aa92e442db10738c30a7 /drivers/platform/x86/asus-wmi.c | |
parent | Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces (diff) | |
download | linux-8e8fe446a91caf4537f512572e4bf52f8f2154a9.tar.xz linux-8e8fe446a91caf4537f512572e4bf52f8f2154a9.zip |
platform/x86: asus-wmi: Use dev_get_drvdata()
Using dev_get_drvdata directly.
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/asus-wmi.c')
-rw-r--r-- | drivers/platform/x86/asus-wmi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 508e6ad47793..269ed7e94013 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -1402,8 +1402,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; |