The patch titled drivers/video/backlight/l4f00242t03.c: use gpio_request_one() to simplify error handling has been added to the -mm tree. Its filename is drivers-video-backlight-l4f00242t03c-use-gpio_request_one-to-simplify-error-handling.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 *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: drivers/video/backlight/l4f00242t03.c: use gpio_request_one() to simplify error handling From: Fabio Estevam <festevam@xxxxxxxxx> Using gpio_request_one can make the error handling simpler. Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> Cc: Richard Purdie <rpurdie@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/backlight/l4f00242t03.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff -puN drivers/video/backlight/l4f00242t03.c~drivers-video-backlight-l4f00242t03c-use-gpio_request_one-to-simplify-error-handling drivers/video/backlight/l4f00242t03.c --- a/drivers/video/backlight/l4f00242t03.c~drivers-video-backlight-l4f00242t03c-use-gpio_request_one-to-simplify-error-handling +++ a/drivers/video/backlight/l4f00242t03.c @@ -178,29 +178,22 @@ static int __devinit l4f00242t03_probe(s priv->spi = spi; - ret = gpio_request(pdata->reset_gpio, "lcd l4f00242t03 reset"); + ret = gpio_request_one(pdata->reset_gpio, GPIOF_OUT_INIT_HIGH, + "lcd l4f00242t03 reset"); if (ret) { dev_err(&spi->dev, "Unable to get the lcd l4f00242t03 reset gpio.\n"); goto err; } - ret = gpio_direction_output(pdata->reset_gpio, 1); - if (ret) - goto err2; - - ret = gpio_request(pdata->data_enable_gpio, - "lcd l4f00242t03 data enable"); + ret = gpio_request_one(pdata->data_enable_gpio, GPIOF_OUT_INIT_LOW, + "lcd l4f00242t03 data enable"); if (ret) { dev_err(&spi->dev, "Unable to get the lcd l4f00242t03 data en gpio.\n"); goto err2; } - ret = gpio_direction_output(pdata->data_enable_gpio, 0); - if (ret) - goto err3; - if (pdata->io_supply) { priv->io_reg = regulator_get(NULL, pdata->io_supply); _ Patches currently in -mm which might be from festevam@xxxxxxxxx are linux-next.patch drivers-video-backlight-l4f00242t03c-use-gpio_request_one-to-simplify-error-handling.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