diff options
author | Fuqian Huang <huangfq.daxian@gmail.com> | 2019-07-01 06:24:26 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-07-03 15:38:06 +0300 |
commit | 8e8fe446a91caf4537f512572e4bf52f8f2154a9 (patch) | |
tree | f0e1bfaf77dd93762d81aa92e442db10738c30a7 /drivers/platform | |
parent | ba07e3aacc08de2e6f6cd199c3618fbbc2c45f0c (diff) | |
download | linux-8e8fe446a91caf4537f512572e4bf52f8f2154a9.tar.xz |
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')
-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; |