The patch titled Subject: backlight: lms283gf05: use devm_gpio_request() has been added to the -mm tree. Its filename is backlight-lms283gf05-use-devm_gpio_request.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jingoo Han <jg1.han@xxxxxxxxxxx> Subject: backlight: lms283gf05: use devm_gpio_request() The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_gpio_request() for these functions. Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx> Acked-by: Marek Vasut <marek.vasut@xxxxxxxxx> Cc: Richard Purdie <rpurdie@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/backlight/lms283gf05.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff -puN drivers/video/backlight/lms283gf05.c~backlight-lms283gf05-use-devm_gpio_request drivers/video/backlight/lms283gf05.c --- a/drivers/video/backlight/lms283gf05.c~backlight-lms283gf05-use-devm_gpio_request +++ a/drivers/video/backlight/lms283gf05.c @@ -158,29 +158,27 @@ static int __devinit lms283gf05_probe(st 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; @@ -193,24 +191,14 @@ static int __devinit lms283gf05_probe(st 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; } _ Subject: Subject: backlight: lms283gf05: use devm_gpio_request() Patches currently in -mm which might be from jg1.han@xxxxxxxxxxx are drivers-video-backlight-atmel-pwm-blc-use-devm_-functions.patch drivers-video-backlight-ot200_blc-use-devm_-functions.patch drivers-video-backlight-lm3533_blc-use-devm_-functions.patch backlight-atmel-pwm-bl-use-devm_gpio_request.patch backlight-ot200_bl-use-devm_gpio_request.patch backlight-tosa_lcd-use-devm_gpio_request.patch backlight-tosa_bl-use-devm_gpio_request.patch backlight-lms283gf05-use-devm_gpio_request.patch backlight-corgi_lcd-use-devm_gpio_request.patch backlight-l4f00242t03-use-devm_gpio_request_one.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html