backlight: lms283gf05: use devm_gpio_request_one
[profile/ivi/kernel-adaptation-intel-automotive.git] / drivers / video / backlight / lms283gf05.c
index e77fd1c..b7ad0d5 100644 (file)
@@ -158,13 +158,9 @@ static int lms283gf05_probe(struct spi_device *spi)
        int ret = 0;
 
        if (pdata != NULL) {
-               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);
+               ret = devm_gpio_request_one(&spi->dev, pdata->reset_gpio,
+                               GPIOF_DIR_OUT | !pdata->reset_inverted,
+                               "LMS285GF05 RESET");
                if (ret)
                        return ret;
        }
@@ -193,7 +189,7 @@ static int lms283gf05_probe(struct spi_device *spi)
        return 0;
 }
 
-static int __devexit lms283gf05_remove(struct spi_device *spi)
+static int lms283gf05_remove(struct spi_device *spi)
 {
        struct lms283gf05_state *st = dev_get_drvdata(&spi->dev);