diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 21:05:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 21:05:31 -0400 |
commit | 7d36014b972a3833b883a7ef41e6bd3b0d187850 (patch) | |
tree | 5c828b0de1cd357288135cc04461d31386b89c26 /drivers/video/backlight/tosa_lcd.c | |
parent | 442a9ffabb21f175027e93e72ea05159818271a6 (diff) | |
parent | ecb41a77411358d385e3fde5b4e98a5f3d9cfdd5 (diff) |
Merge branch 'akpm' (Andrew's patch-bomb)
Merge patches through Andrew Morton:
"180 patches - err 181 - listed below:
- most of MM. I held back the (large) "memcg: add hugetlb extension"
series because a bunfight has recently broken out.
- leds. After this, Bryan Wu will be handling drivers/leds/
- backlight
- lib/
- rtc"
* emailed from Andrew Morton <akpm@linux-foundation.org>: (181 patches)
drivers/rtc/rtc-s3c.c: fix compiler warning
drivers/rtc/rtc-tegra.c: clean up probe/remove routines
drivers/rtc/rtc-pl031.c: remove RTC timer interrupt handling
drivers/rtc/rtc-lpc32xx.c: add device tree support
drivers/rtc/rtc-m41t93.c: don't let get_time() reset M41T93_FLAG_OF
rtc: ds1307: add trickle charger support
rtc: ds1307: remove superfluous initialization
rtc: rename CONFIG_RTC_MXC to CONFIG_RTC_DRV_MXC
drivers/rtc/Kconfig: place RTC_DRV_IMXDI and RTC_MXC under "on-CPU RTC drivers"
drivers/rtc/rtc-pcf8563.c: add RTC_VL_READ/RTC_VL_CLR ioctl feature
rtc: add ioctl to get/clear battery low voltage status
drivers/rtc/rtc-ep93xx.c: convert to use module_platform_driver()
rtc/spear: add Device Tree probing capability
lib/vsprintf.c: "%#o",0 becomes '0' instead of '00'
radix-tree: fix preload vector size
spinlock_debug: print kallsyms name for lock
vsprintf: fix %ps on non symbols when using kallsyms
lib/bitmap.c: fix documentation for scnprintf() functions
lib/string_helpers.c: make arrays static
lib/test-kstrtox.c: mark const init data with __initconst instead of __initdata
...
Diffstat (limited to 'drivers/video/backlight/tosa_lcd.c')
-rw-r--r-- | drivers/video/backlight/tosa_lcd.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c index 2231aec23918..47823b8efff0 100644 --- a/drivers/video/backlight/tosa_lcd.c +++ b/drivers/video/backlight/tosa_lcd.c | |||
@@ -174,7 +174,8 @@ static int __devinit tosa_lcd_probe(struct spi_device *spi) | |||
174 | int ret; | 174 | int ret; |
175 | struct tosa_lcd_data *data; | 175 | struct tosa_lcd_data *data; |
176 | 176 | ||
177 | data = kzalloc(sizeof(struct tosa_lcd_data), GFP_KERNEL); | 177 | data = devm_kzalloc(&spi->dev, sizeof(struct tosa_lcd_data), |
178 | GFP_KERNEL); | ||
178 | if (!data) | 179 | if (!data) |
179 | return -ENOMEM; | 180 | return -ENOMEM; |
180 | 181 | ||
@@ -187,7 +188,7 @@ static int __devinit tosa_lcd_probe(struct spi_device *spi) | |||
187 | 188 | ||
188 | ret = spi_setup(spi); | 189 | ret = spi_setup(spi); |
189 | if (ret < 0) | 190 | if (ret < 0) |
190 | goto err_spi; | 191 | return ret; |
191 | 192 | ||
192 | data->spi = spi; | 193 | data->spi = spi; |
193 | dev_set_drvdata(&spi->dev, data); | 194 | dev_set_drvdata(&spi->dev, data); |
@@ -224,8 +225,6 @@ err_gpio_dir: | |||
224 | gpio_free(TOSA_GPIO_TG_ON); | 225 | gpio_free(TOSA_GPIO_TG_ON); |
225 | err_gpio_tg: | 226 | err_gpio_tg: |
226 | dev_set_drvdata(&spi->dev, NULL); | 227 | dev_set_drvdata(&spi->dev, NULL); |
227 | err_spi: | ||
228 | kfree(data); | ||
229 | return ret; | 228 | return ret; |
230 | } | 229 | } |
231 | 230 | ||
@@ -242,7 +241,6 @@ static int __devexit tosa_lcd_remove(struct spi_device *spi) | |||
242 | 241 | ||
243 | gpio_free(TOSA_GPIO_TG_ON); | 242 | gpio_free(TOSA_GPIO_TG_ON); |
244 | dev_set_drvdata(&spi->dev, NULL); | 243 | dev_set_drvdata(&spi->dev, NULL); |
245 | kfree(data); | ||
246 | 244 | ||
247 | return 0; | 245 | return 0; |
248 | } | 246 | } |