ACPI / DPTF: Use dev_get_drvdata()

Skip conversion to platform_device and use dev_get_drvdata() directly.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Kefeng Wang 2019-04-23 15:49:56 +08:00 committed by Rafael J. Wysocki
parent c7d5f21e8d
commit b0f65b9179
1 changed files with 1 additions and 2 deletions

View File

@ -31,8 +31,7 @@ static ssize_t name##_show(struct device *dev,\
struct device_attribute *attr,\ struct device_attribute *attr,\
char *buf)\ char *buf)\
{\ {\
struct platform_device *pdev = to_platform_device(dev);\ struct acpi_device *acpi_dev = dev_get_drvdata(dev);\
struct acpi_device *acpi_dev = platform_get_drvdata(pdev);\
unsigned long long val;\ unsigned long long val;\
acpi_status status;\ acpi_status status;\
\ \