From 8e8fe446a91caf4537f512572e4bf52f8f2154a9 Mon Sep 17 00:00:00 2001 From: Fuqian Huang Date: Mon, 1 Jul 2019 11:24:26 +0800 Subject: [PATCH] platform/x86: asus-wmi: Use dev_get_drvdata() Using dev_get_drvdata directly. Signed-off-by: Fuqian Huang Signed-off-by: Andy Shevchenko --- 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 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; -- 2.30.2