summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorFuqian Huang <huangfq.daxian@gmail.com>2019-07-01 06:24:26 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-07-03 15:38:06 +0300
commit8e8fe446a91caf4537f512572e4bf52f8f2154a9 (patch)
treef0e1bfaf77dd93762d81aa92e442db10738c30a7 /drivers/platform
parentba07e3aacc08de2e6f6cd199c3618fbbc2c45f0c (diff)
downloadlinux-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.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;