mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-06 02:24:14 +08:00
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>
This commit is contained in:
parent
ba07e3aacc
commit
8e8fe446a9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user