forked from Minki/linux
fbdev fixes for 4.6
* ARM CLCD: fix regression on multiplatform kernels * panel-sharp-ls037v7dw01: fix possible NULL deref -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXGOiKAAoJEPo9qoy8lh71554P/2q4RX1osVZgeSCkvwHGvrEi BtArOAjH4t2Ea/pI3kskceNEtjFNp+7NxNp1oSJQcVft3DOYJJw94qd68ObkX6rz KJrwn71rdYrG4i31QK6blrJQrPbyykEiMtqjiny5w1NYErpipuOEByKRYWIuWUQM E2fZaMNHRrPT0AjtfhNSd//bwuG5wWsHIgI33Gg/CLGEyG1VOppMzj1EnOri7nrn 1sZOm69tCBUHzuZyxutkNBAyubu9zRTO8Rfjg+IpL2BWSsAV4Xe2ptw16/7LYZ+N ycwksszhVIlXIemgNRgufE6IHMcoPOmsegdUHLDTqLvqRx3qjYFuU5HDgk2ESoti 9+rIPFx9pKECMDjGMkfix/nZpEJkWsyRuTMp3ofGGWP4Wn6cjv3HAnD3ith6LT0r 2Vqk8h1QbUMP+JaHq4fPgS3RNT1qR9UobJI4rpPp20ja/b198h3Nl7Bdjatzv5tm 1LxeRLAdl5YaQTO4K1zsLhJjZKfXyZJ2rmO9Eo9GZJObR3fVWsib8Jp6DHH75Ba+ gcSMaQ+OX8J/C0LjS5aLNywZsENS/PEk5utpoRcJQ5TnZ327J3nY2JFOL8nXsDoP HmhbKETZNjAhPD8jmUMUEeh7hMBPhwkc1HiXIi4v08I1QyQ/EKG3pPl9FplTUKMC 7uLx6SIrVe1SuJnFtQls =Le6u -----END PGP SIGNATURE----- Merge tag 'fbdev-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev fixes from Tomi Valkeinen: - ARM CLCD: fix regression on multiplatform kernels - panel-sharp-ls037v7dw01: fix possible NULL deref * tag 'fbdev-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: omapfb: panel-sharp-ls037v7dw01: fix check of gpio_to_desc() return value video: ARM CLCD: runtime check for Versatile
This commit is contained in:
commit
90e6a6894b
@ -440,13 +440,14 @@ static int clcdfb_register(struct clcd_fb *fb)
|
||||
fb->off_ienb = CLCD_PL111_IENB;
|
||||
fb->off_cntl = CLCD_PL111_CNTL;
|
||||
} else {
|
||||
#ifdef CONFIG_ARCH_VERSATILE
|
||||
fb->off_ienb = CLCD_PL111_IENB;
|
||||
fb->off_cntl = CLCD_PL111_CNTL;
|
||||
#else
|
||||
fb->off_ienb = CLCD_PL110_IENB;
|
||||
fb->off_cntl = CLCD_PL110_CNTL;
|
||||
#endif
|
||||
if (of_machine_is_compatible("arm,versatile-ab") ||
|
||||
of_machine_is_compatible("arm,versatile-pb")) {
|
||||
fb->off_ienb = CLCD_PL111_IENB;
|
||||
fb->off_cntl = CLCD_PL111_CNTL;
|
||||
} else {
|
||||
fb->off_ienb = CLCD_PL110_IENB;
|
||||
fb->off_cntl = CLCD_PL110_CNTL;
|
||||
}
|
||||
}
|
||||
|
||||
fb->clk = clk_get(&fb->dev->dev, NULL);
|
||||
|
@ -200,20 +200,16 @@ static struct omap_dss_driver sharp_ls_ops = {
|
||||
static int sharp_ls_get_gpio(struct device *dev, int gpio, unsigned long flags,
|
||||
char *desc, struct gpio_desc **gpiod)
|
||||
{
|
||||
struct gpio_desc *gd;
|
||||
int r;
|
||||
|
||||
*gpiod = NULL;
|
||||
|
||||
r = devm_gpio_request_one(dev, gpio, flags, desc);
|
||||
if (r)
|
||||
if (r) {
|
||||
*gpiod = NULL;
|
||||
return r == -ENOENT ? 0 : r;
|
||||
}
|
||||
|
||||
gd = gpio_to_desc(gpio);
|
||||
if (IS_ERR(gd))
|
||||
return PTR_ERR(gd) == -ENOENT ? 0 : PTR_ERR(gd);
|
||||
*gpiod = gpio_to_desc(gpio);
|
||||
|
||||
*gpiod = gd;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user