Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds: leds-gpio: fix possible crash on OF device unbinding backlight: Fix backlight limiting on spitz/corgi devices backlight: lcd - Fix wrong sizeof
This commit is contained in:
commit
3026a9b051
3 changed files with 6 additions and 3 deletions
|
@ -78,6 +78,8 @@ static int __devinit create_gpio_led(const struct gpio_led *template,
|
|||
{
|
||||
int ret, state;
|
||||
|
||||
led_dat->gpio = -1;
|
||||
|
||||
/* skip leds that aren't available */
|
||||
if (!gpio_is_valid(template->gpio)) {
|
||||
printk(KERN_INFO "Skipping unavailable LED gpio %d (%s)\n",
|
||||
|
|
|
@ -433,8 +433,9 @@ static int corgi_bl_update_status(struct backlight_device *bd)
|
|||
|
||||
if (corgibl_flags & CORGIBL_SUSPENDED)
|
||||
intensity = 0;
|
||||
if (corgibl_flags & CORGIBL_BATTLOW)
|
||||
intensity &= lcd->limit_mask;
|
||||
|
||||
if ((corgibl_flags & CORGIBL_BATTLOW) && intensity > lcd->limit_mask)
|
||||
intensity = lcd->limit_mask;
|
||||
|
||||
return corgi_bl_set_intensity(lcd, intensity);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ static int fb_notifier_callback(struct notifier_block *self,
|
|||
|
||||
static int lcd_register_fb(struct lcd_device *ld)
|
||||
{
|
||||
memset(&ld->fb_notif, 0, sizeof(&ld->fb_notif));
|
||||
memset(&ld->fb_notif, 0, sizeof(ld->fb_notif));
|
||||
ld->fb_notif.notifier_call = fb_notifier_callback;
|
||||
return fb_register_client(&ld->fb_notif);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue