Commit 8e8fe446 authored by Fuqian Huang's avatar Fuqian Huang Committed by Andy Shevchenko

platform/x86: asus-wmi: Use dev_get_drvdata()

Using dev_get_drvdata directly.
Signed-off-by: default avatarFuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent ba07e3aa
...@@ -1402,8 +1402,7 @@ static umode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj, ...@@ -1402,8 +1402,7 @@ static umode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj,
struct attribute *attr, int idx) struct attribute *attr, int idx)
{ {
struct device *dev = container_of(kobj, struct device, kobj); struct device *dev = container_of(kobj, struct device, kobj);
struct platform_device *pdev = to_platform_device(dev->parent); struct asus_wmi *asus = dev_get_drvdata(dev->parent);
struct asus_wmi *asus = platform_get_drvdata(pdev);
int dev_id = -1; int dev_id = -1;
int fan_attr = -1; int fan_attr = -1;
u32 value = ASUS_WMI_UNSUPPORTED_METHOD; u32 value = ASUS_WMI_UNSUPPORTED_METHOD;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment