diff options
Diffstat (limited to 'drivers/video/backlight/lcd.c')
-rw-r--r-- | drivers/video/backlight/lcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index a482dd7b0311..71a11cadffc4 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/ctype.h> | 13 | #include <linux/ctype.h> |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ | 18 | #if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ |
18 | defined(CONFIG_LCD_CLASS_DEVICE_MODULE)) | 19 | defined(CONFIG_LCD_CLASS_DEVICE_MODULE)) |
@@ -101,7 +102,7 @@ static ssize_t lcd_store_power(struct device *dev, | |||
101 | int power = simple_strtoul(buf, &endp, 0); | 102 | int power = simple_strtoul(buf, &endp, 0); |
102 | size_t size = endp - buf; | 103 | size_t size = endp - buf; |
103 | 104 | ||
104 | if (*endp && isspace(*endp)) | 105 | if (isspace(*endp)) |
105 | size++; | 106 | size++; |
106 | if (size != count) | 107 | if (size != count) |
107 | return -EINVAL; | 108 | return -EINVAL; |
@@ -140,7 +141,7 @@ static ssize_t lcd_store_contrast(struct device *dev, | |||
140 | int contrast = simple_strtoul(buf, &endp, 0); | 141 | int contrast = simple_strtoul(buf, &endp, 0); |
141 | size_t size = endp - buf; | 142 | size_t size = endp - buf; |
142 | 143 | ||
143 | if (*endp && isspace(*endp)) | 144 | if (isspace(*endp)) |
144 | size++; | 145 | size++; |
145 | if (size != count) | 146 | if (size != count) |
146 | return -EINVAL; | 147 | return -EINVAL; |