Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308955
b: refs/heads/master
c: 80629ef
h: refs/heads/master
i:
  308953: 2cea331
  308951: 180114e
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed May 29, 2012
1 parent a1d8fe8 commit a95a1d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 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: 91cdb239905ea98fbcd373254ea0de86ca16c1e0
refs/heads/master: 80629efcae09c5d80a9fdeea5226cd81b4fec7f3
15 changes: 5 additions & 10 deletions trunk/drivers/video/backlight/ams369fg06.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static int __devinit ams369fg06_probe(struct spi_device *spi)
struct backlight_device *bd = NULL;
struct backlight_properties props;

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

Expand All @@ -492,7 +492,7 @@ static int __devinit ams369fg06_probe(struct spi_device *spi)
ret = spi_setup(spi);
if (ret < 0) {
dev_err(&spi->dev, "spi setup failed.\n");
goto out_free_lcd;
return ret;
}

lcd->spi = spi;
Expand All @@ -501,15 +501,13 @@ static int __devinit ams369fg06_probe(struct spi_device *spi)
lcd->lcd_pd = spi->dev.platform_data;
if (!lcd->lcd_pd) {
dev_err(&spi->dev, "platform data is NULL\n");
goto out_free_lcd;
return -EFAULT;
}

ld = lcd_device_register("ams369fg06", &spi->dev, lcd,
&ams369fg06_lcd_ops);
if (IS_ERR(ld)) {
ret = PTR_ERR(ld);
goto out_free_lcd;
}
if (IS_ERR(ld))
return PTR_ERR(ld);

lcd->ld = ld;

Expand Down Expand Up @@ -547,8 +545,6 @@ static int __devinit ams369fg06_probe(struct spi_device *spi)

out_lcd_unregister:
lcd_device_unregister(ld);
out_free_lcd:
kfree(lcd);
return ret;
}

Expand All @@ -559,7 +555,6 @@ static int __devexit ams369fg06_remove(struct spi_device *spi)
ams369fg06_power(lcd, FB_BLANK_POWERDOWN);
backlight_device_unregister(lcd->bd);
lcd_device_unregister(lcd->ld);
kfree(lcd);

return 0;
}
Expand Down

0 comments on commit a95a1d0

Please sign in to comment.