backlight: lms283gf05: use devm_gpio_request_one
[profile/ivi/kernel-adaptation-intel-automotive.git] / drivers / video / backlight / lms283gf05.c
index ea43f22..b7ad0d5 100644 (file)
@@ -150,7 +150,7 @@ static struct lcd_ops lms_ops = {
        .get_power      = NULL,
 };
 
-static int __devinit lms283gf05_probe(struct spi_device *spi)
+static int lms283gf05_probe(struct spi_device *spi)
 {
        struct lms283gf05_state *st;
        struct lms283gf05_pdata *pdata = spi->dev.platform_data;
@@ -158,13 +158,9 @@ static int __devinit 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 __devinit 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);
 
@@ -208,7 +204,7 @@ static struct spi_driver lms283gf05_driver = {
                .owner  = THIS_MODULE,
        },
        .probe          = lms283gf05_probe,
-       .remove         = __devexit_p(lms283gf05_remove),
+       .remove         = lms283gf05_remove,
 };
 
 module_spi_driver(lms283gf05_driver);