diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-04-19 16:05:33 +0200 |
---|---|---|
committer | Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | 2018-08-01 18:58:09 +0200 |
commit | ada953de4486a3e2a42c3b8146adb36d0dcbded2 (patch) | |
tree | ea49b47fb5abda14166afe642f47c0e04d94c537 /drivers/auxdisplay/arm-charlcd.c | |
parent | auxdisplay: charlcd: delete mdelay in long_sleep (diff) | |
download | linux-ada953de4486a3e2a42c3b8146adb36d0dcbded2.tar.xz linux-ada953de4486a3e2a42c3b8146adb36d0dcbded2.zip |
auxdisplay: 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>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Diffstat (limited to 'drivers/auxdisplay/arm-charlcd.c')
-rw-r--r-- | drivers/auxdisplay/arm-charlcd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c index 296fb30dfa00..dea031484cc4 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -331,8 +331,7 @@ out_no_resource: static int charlcd_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct charlcd *lcd = platform_get_drvdata(pdev); + struct charlcd *lcd = dev_get_drvdata(dev); /* Power the display off */ charlcd_4bit_command(lcd, HD_DISPCTRL); @@ -341,8 +340,7 @@ static int charlcd_suspend(struct device *dev) static int charlcd_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct charlcd *lcd = platform_get_drvdata(pdev); + struct charlcd *lcd = dev_get_drvdata(dev); /* Turn the display back on */ charlcd_4bit_command(lcd, HD_DISPCTRL | HD_DISPCTRL_ON); |