summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2019-04-23 15:49:56 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-04-23 10:57:12 +0200
commitb0f65b917987dee71d0b1d3c65c0b52db00a55e0 (patch)
tree906adcfd538a2de6b022088cc5e7f5ca149370ff /drivers/acpi
parentc7d5f21e8d184f255785e02760139037a97fd796 (diff)
downloadlinux-b0f65b917987dee71d0b1d3c65c0b52db00a55e0.tar.bz2
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/dptf/dptf_power.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/dptf/dptf_power.c b/drivers/acpi/dptf/dptf_power.c
index e1c242568341..0c081390930a 100644
--- a/drivers/acpi/dptf/dptf_power.c
+++ b/drivers/acpi/dptf/dptf_power.c
@@ -31,8 +31,7 @@ static ssize_t name##_show(struct device *dev,\
struct device_attribute *attr,\
char *buf)\
{\
- struct platform_device *pdev = to_platform_device(dev);\
- struct acpi_device *acpi_dev = platform_get_drvdata(pdev);\
+ struct acpi_device *acpi_dev = dev_get_drvdata(dev);\
unsigned long long val;\
acpi_status status;\
\