Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
Browse files Browse the repository at this point in the history
* '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
  • Loading branch information
Linus Torvalds committed Nov 17, 2009
2 parents a2eb473 + 0b4634f commit 3026a9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions drivers/leds/leds-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions drivers/video/backlight/corgi_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/backlight/lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3026a9b

Please sign in to comment.