summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/asus-wmi.c
diff options
context:
space:
mode:
authorFuqian Huang <huangfq.daxian@gmail.com>2019-07-01 05:24:26 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-07-03 14:38:06 +0200
commit8e8fe446a91caf4537f512572e4bf52f8f2154a9 (patch)
treef0e1bfaf77dd93762d81aa92e442db10738c30a7 /drivers/platform/x86/asus-wmi.c
parentDocumentation/ABI: Add new attribute for mlxreg-io sysfs interfaces (diff)
downloadlinux-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.c3
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;