Commit 90e6a689 authored by Linus Torvalds's avatar Linus Torvalds

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
parents b9358b24 4dacad61
...@@ -440,13 +440,14 @@ static int clcdfb_register(struct clcd_fb *fb) ...@@ -440,13 +440,14 @@ static int clcdfb_register(struct clcd_fb *fb)
fb->off_ienb = CLCD_PL111_IENB; fb->off_ienb = CLCD_PL111_IENB;
fb->off_cntl = CLCD_PL111_CNTL; fb->off_cntl = CLCD_PL111_CNTL;
} else { } else {
#ifdef CONFIG_ARCH_VERSATILE if (of_machine_is_compatible("arm,versatile-ab") ||
fb->off_ienb = CLCD_PL111_IENB; of_machine_is_compatible("arm,versatile-pb")) {
fb->off_cntl = CLCD_PL111_CNTL; fb->off_ienb = CLCD_PL111_IENB;
#else fb->off_cntl = CLCD_PL111_CNTL;
fb->off_ienb = CLCD_PL110_IENB; } else {
fb->off_cntl = CLCD_PL110_CNTL; fb->off_ienb = CLCD_PL110_IENB;
#endif fb->off_cntl = CLCD_PL110_CNTL;
}
} }
fb->clk = clk_get(&fb->dev->dev, NULL); fb->clk = clk_get(&fb->dev->dev, NULL);
......
...@@ -200,20 +200,16 @@ static struct omap_dss_driver sharp_ls_ops = { ...@@ -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, static int sharp_ls_get_gpio(struct device *dev, int gpio, unsigned long flags,
char *desc, struct gpio_desc **gpiod) char *desc, struct gpio_desc **gpiod)
{ {
struct gpio_desc *gd;
int r; int r;
*gpiod = NULL;
r = devm_gpio_request_one(dev, gpio, flags, desc); r = devm_gpio_request_one(dev, gpio, flags, desc);
if (r) if (r) {
*gpiod = NULL;
return r == -ENOENT ? 0 : r; return r == -ENOENT ? 0 : r;
}
gd = gpio_to_desc(gpio); *gpiod = gpio_to_desc(gpio);
if (IS_ERR(gd))
return PTR_ERR(gd) == -ENOENT ? 0 : PTR_ERR(gd);
*gpiod = gd;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment