- simplify getting .drvdata
     From Wolfram Sang
 
   - delete mdelay in long_sleep
     From Jia-Ju Bai
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAltzIxcACgkQGXyLc2ht
 IW3+bQ//faS6ShoaOCdlcRb/05Voa2RfxHCxWpl11x/cYv4RF3MHVe3JhkpUe9Sn
 hO4fiJJc+I2KWwOELFEOyopHPCh5oYCn0kyvy087rwGcyg8/paXy2dD8atKVNJ6n
 nxlDTSwBiEV/B3Oc0KLwl8BosTgYp3ATscfpXMk18Ek6etrw9V2NIr2YXSWVLQfS
 /Pf2p0h9ivp7BF5uO3yv/3Td0FvV+43l9v6xL5ITOqfspAd72ZPWDRr0ZxdcD3Tv
 BK8/yKlXd11Le0RrNas22BQXraqXgdd4CuxW2dVKbzTJxfoXnetMA+A+bkk6tWsI
 EITkxM0UFO1umcGGEl5GiySOM/uoyNftq+psfWMp53sSoL7dNmZ1nRs1JucwMY3M
 C1LvhD6EMWu1jXpam/leiyiipcQME7hid69w+7hogGIZLtxoSZVzXCAJwFbKJyd7
 I17fh+DO9Zj5rDlqkDZjafjcXer9WSTpj9KjEd21gLvrg2ShBWdb35wGeOEqtJbe
 aizto034Ldiik7YioGWkFSKk3k13wVWaenKUcVCYE6m7jKS4BiRxuKdqomjfeZcv
 ZDt9H1oQ8/VeB+QwDW2B53MxmNxk6Bm2Uk+9NwldEUIZMQ4szjdTHI1m1CcI1mqn
 LnobADE1MgLpJRMtYKB3G0Al+DTuzY6J1AfJmMMLth1qlPD4eZM=
 =BZWL
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2018-08-15 19:23:24 -07:00
Родитель 70b20dd7f8 ada953de44
Коммит 25ca1d74c6
2 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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 */