summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/asus-laptop.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-04-19 17:06:10 +0300
committerDarren Hart (VMware) <dvhart@infradead.org>2018-04-23 18:52:59 +0300
commitd605ca29c35d9ebc0c32c386d95336d5339f61f7 (patch)
treee4f93049b7326fc08e98e31513a05c0f8422c997 /drivers/platform/x86/asus-laptop.c
parent06b8b00b33a145ef5d708ff971cfdb83c8e480c0 (diff)
downloadlinux-d605ca29c35d9ebc0c32c386d95336d5339f61f7.tar.xz
platform/x86: Simplify getting .drvdata
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Diffstat (limited to 'drivers/platform/x86/asus-laptop.c')
-rw-r--r--drivers/platform/x86/asus-laptop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index c4768be24ba9..700c48ddfa7c 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -1593,8 +1593,7 @@ static umode_t asus_sysfs_is_visible(struct kobject *kobj,
int idx)
{
struct device *dev = container_of(kobj, struct device, kobj);
- struct platform_device *pdev = to_platform_device(dev);
- struct asus_laptop *asus = platform_get_drvdata(pdev);
+ struct asus_laptop *asus = dev_get_drvdata(dev);
acpi_handle handle = asus->handle;
bool supported;