Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308961
b: refs/heads/master
c: ab03e04
h: refs/heads/master
i:
  308959: 9537140
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed May 29, 2012
1 parent e76edae commit 9fcde95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26f2b35c1e1463c851be23c9774bd24caae7b517
refs/heads/master: ab03e04741fc7a5747daabc57d15cb1a3e2fd289
23 changes: 7 additions & 16 deletions trunk/drivers/video/backlight/ltv350qv.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,23 +232,20 @@ static int __devinit ltv350qv_probe(struct spi_device *spi)
struct lcd_device *ld;
int ret;

lcd = kzalloc(sizeof(struct ltv350qv), GFP_KERNEL);
lcd = devm_kzalloc(&spi->dev, sizeof(struct ltv350qv), GFP_KERNEL);
if (!lcd)
return -ENOMEM;

lcd->spi = spi;
lcd->power = FB_BLANK_POWERDOWN;
lcd->buffer = kzalloc(8, GFP_KERNEL);
if (!lcd->buffer) {
ret = -ENOMEM;
goto out_free_lcd;
}
lcd->buffer = devm_kzalloc(&spi->dev, 8, GFP_KERNEL);
if (!lcd->buffer)
return -ENOMEM;

ld = lcd_device_register("ltv350qv", &spi->dev, lcd, &ltv_ops);
if (IS_ERR(ld)) {
ret = PTR_ERR(ld);
goto out_free_buffer;
}
if (IS_ERR(ld))
return PTR_ERR(ld);

lcd->ld = ld;

ret = ltv350qv_power(lcd, FB_BLANK_UNBLANK);
Expand All @@ -261,10 +258,6 @@ static int __devinit ltv350qv_probe(struct spi_device *spi)

out_unregister:
lcd_device_unregister(ld);
out_free_buffer:
kfree(lcd->buffer);
out_free_lcd:
kfree(lcd);
return ret;
}

Expand All @@ -274,8 +267,6 @@ static int __devexit ltv350qv_remove(struct spi_device *spi)

ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
lcd_device_unregister(lcd->ld);
kfree(lcd->buffer);
kfree(lcd);

return 0;
}
Expand Down

0 comments on commit 9fcde95

Please sign in to comment.