Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319919
b: refs/heads/master
c: 04e961f
h: refs/heads/master
i:
  319917: 9becd57
  319915: 72d4b75
  319911: 679613b
  319903: 6c37ff6
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Jul 31, 2012
1 parent 263a376 commit 657800d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 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: f5b71941a5359cd6702be26715fd57d47187c0d9
refs/heads/master: 04e961fb1da31258f7bf4480a59518c3de3caa60
24 changes: 6 additions & 18 deletions trunk/drivers/video/backlight/lms283gf05.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,29 +158,27 @@ static int __devinit lms283gf05_probe(struct spi_device *spi)
int ret = 0;

if (pdata != NULL) {
ret = gpio_request(pdata->reset_gpio, "LMS285GF05 RESET");
ret = devm_gpio_request(&spi->dev, pdata->reset_gpio,
"LMS285GF05 RESET");
if (ret)
return ret;

ret = gpio_direction_output(pdata->reset_gpio,
!pdata->reset_inverted);
if (ret)
goto err;
return ret;
}

st = devm_kzalloc(&spi->dev, sizeof(struct lms283gf05_state),
GFP_KERNEL);
if (st == NULL) {
dev_err(&spi->dev, "No memory for device state\n");
ret = -ENOMEM;
goto err;
return -ENOMEM;
}

ld = lcd_device_register("lms283gf05", &spi->dev, st, &lms_ops);
if (IS_ERR(ld)) {
ret = PTR_ERR(ld);
goto err;
}
if (IS_ERR(ld))
return PTR_ERR(ld);

st->spi = spi;
st->ld = ld;
Expand All @@ -193,24 +191,14 @@ static int __devinit lms283gf05_probe(struct spi_device *spi)
lms283gf05_toggle(spi, disp_initseq, ARRAY_SIZE(disp_initseq));

return 0;

err:
if (pdata != NULL)
gpio_free(pdata->reset_gpio);

return ret;
}

static int __devexit lms283gf05_remove(struct spi_device *spi)
{
struct lms283gf05_state *st = dev_get_drvdata(&spi->dev);
struct lms283gf05_pdata *pdata = st->spi->dev.platform_data;

lcd_device_unregister(st->ld);

if (pdata != NULL)
gpio_free(pdata->reset_gpio);

return 0;
}

Expand Down

0 comments on commit 657800d

Please sign in to comment.