From: Kefeng Wang Date: Tue, 23 Apr 2019 07:49:56 +0000 (+0800) Subject: ACPI / DPTF: Use dev_get_drvdata() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b0f65b917987dee71d0b1d3c65c0b52db00a55e0;p=linux.git ACPI / DPTF: Use dev_get_drvdata() Skip conversion to platform_device and use dev_get_drvdata() directly. Signed-off-by: Kefeng Wang [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/dptf/dptf_power.c b/drivers/acpi/dptf/dptf_power.c index e1c242568341d..0c081390930a7 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;\ \