소스 검색

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
Linus Torvalds 15 년 전
부모
커밋
3026a9b051
3개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 0
      drivers/leds/leds-gpio.c
  2. 3 2
      drivers/video/backlight/corgi_lcd.c
  3. 1 1
      drivers/video/backlight/lcd.c

+ 2 - 0
drivers/leds/leds-gpio.c

@@ -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",

+ 3 - 2
drivers/video/backlight/corgi_lcd.c

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

+ 1 - 1
drivers/video/backlight/lcd.c

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