diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-15 19:23:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-15 19:23:24 -0700 |
commit | 25ca1d74c6731d9d5f8e660195235050252a33ef (patch) | |
tree | 60cc82b19a3aca33ec789994a2c5ef43c85d0993 /drivers | |
parent | 70b20dd7f897c6c14ab9e0d8400aed520ab5f09b (diff) | |
parent | ada953de4486a3e2a42c3b8146adb36d0dcbded2 (diff) |
Merge tag 'auxdisplay-for-linus-v4.19' of git://github.com/ojeda/linux
Pull auxdisplay updates from Miguel Ojeda:
"Two cleanups for char_lcd:
- simplify getting .drvdata (Wolfram Sang)
- delete mdelay in long_sleep (Jia-Ju Bai)"
* tag 'auxdisplay-for-linus-v4.19' of git://github.com/ojeda/linux:
auxdisplay: simplify getting .drvdata
auxdisplay: charlcd: delete mdelay in long_sleep
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/auxdisplay/arm-charlcd.c | 6 | ||||
-rw-r--r-- | drivers/auxdisplay/charlcd.c | 5 |
2 files changed, 3 insertions, 8 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); diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 8673fc2b9eb8..81c22d20d9d9 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -99,10 +99,7 @@ static atomic_t charlcd_available = ATOMIC_INIT(1); /* sleeps that many milliseconds with a reschedule */ static void long_sleep(int ms) { - if (in_interrupt()) - mdelay(ms); - else - schedule_timeout_interruptible(msecs_to_jiffies(ms)); + schedule_timeout_interruptible(msecs_to_jiffies(ms)); } /* turn the backlight on or off */ |