提交 b0f65b91 编写于 作者: K Kefeng Wang 提交者: Rafael J. Wysocki

ACPI / DPTF: Use dev_get_drvdata()

Skip conversion to platform_device and use dev_get_drvdata() directly.
Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com>
[ rjw: Changelog ]
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 c7d5f21e
......@@ -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;\
\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册