diff options
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/88pm860x_bl.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/adp5520_bl.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/adp8860_bl.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/adp8870_bl.c | 3 | ||||
-rw-r--r-- | drivers/video/backlight/ams369fg06.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/da903x_bl.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/ep93xx_bl.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/generic_bl.c | 4 | ||||
-rw-r--r-- | drivers/video/backlight/l4f00242t03.c | 71 | ||||
-rw-r--r-- | drivers/video/backlight/ld9040.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/lms283gf05.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/max8925_bl.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/s6e63m0.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight/wm831x_bl.c | 1 |
14 files changed, 36 insertions, 53 deletions
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index c04b94da81f7..1105fa1ed7f4 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c @@ -17,6 +17,7 @@ #include <linux/i2c.h> #include <linux/backlight.h> #include <linux/mfd/88pm860x.h> +#include <linux/module.h> #define MAX_BRIGHTNESS (0xFF) #define MIN_BRIGHTNESS (0) diff --git a/drivers/video/backlight/adp5520_bl.c b/drivers/video/backlight/adp5520_bl.c index d1aee730d7d8..dfb763e9147f 100644 --- a/drivers/video/backlight/adp5520_bl.c +++ b/drivers/video/backlight/adp5520_bl.c @@ -13,6 +13,7 @@ #include <linux/backlight.h> #include <linux/mfd/adp5520.h> #include <linux/slab.h> +#include <linux/module.h> struct adp5520_bl { struct device *master; diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c index 183b6f639852..66bc74d9ce2a 100644 --- a/drivers/video/backlight/adp8860_bl.c +++ b/drivers/video/backlight/adp8860_bl.c @@ -7,7 +7,6 @@ */ #include <linux/module.h> -#include <linux/version.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/pm.h> diff --git a/drivers/video/backlight/adp8870_bl.c b/drivers/video/backlight/adp8870_bl.c index d06886a2bfb5..6c68a6899e87 100644 --- a/drivers/video/backlight/adp8870_bl.c +++ b/drivers/video/backlight/adp8870_bl.c @@ -7,7 +7,6 @@ */ #include <linux/module.h> -#include <linux/version.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/pm.h> @@ -932,7 +931,6 @@ out: out1: backlight_device_unregister(bl); out2: - i2c_set_clientdata(client, NULL); kfree(data); return ret; @@ -952,7 +950,6 @@ static int __devexit adp8870_remove(struct i2c_client *client) &adp8870_bl_attr_group); backlight_device_unregister(data->bl); - i2c_set_clientdata(client, NULL); kfree(data); return 0; diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c index 9f0a491e2a05..7838a23fbdd1 100644 --- a/drivers/video/backlight/ams369fg06.c +++ b/drivers/video/backlight/ams369fg06.c @@ -22,6 +22,7 @@ */ #include <linux/wait.h> +#include <linux/module.h> #include <linux/fb.h> #include <linux/delay.h> #include <linux/gpio.h> diff --git a/drivers/video/backlight/da903x_bl.c b/drivers/video/backlight/da903x_bl.c index 62043f12a5a4..d68f14bbb687 100644 --- a/drivers/video/backlight/da903x_bl.c +++ b/drivers/video/backlight/da903x_bl.c @@ -19,6 +19,7 @@ #include <linux/backlight.h> #include <linux/mfd/da903x.h> #include <linux/slab.h> +#include <linux/module.h> #define DA9030_WLED_CONTROL 0x25 #define DA9030_WLED_CP_EN (1 << 6) diff --git a/drivers/video/backlight/ep93xx_bl.c b/drivers/video/backlight/ep93xx_bl.c index b0582917f0c8..c74a6f4baa12 100644 --- a/drivers/video/backlight/ep93xx_bl.c +++ b/drivers/video/backlight/ep93xx_bl.c @@ -13,6 +13,7 @@ #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/module.h> #include <linux/io.h> #include <linux/fb.h> #include <linux/backlight.h> diff --git a/drivers/video/backlight/generic_bl.c b/drivers/video/backlight/generic_bl.c index 8c6befd65a33..adb191466d64 100644 --- a/drivers/video/backlight/generic_bl.c +++ b/drivers/video/backlight/generic_bl.c @@ -56,7 +56,7 @@ static int genericbl_get_intensity(struct backlight_device *bd) * Called when the battery is low to limit the backlight intensity. * If limit==0 clear any limit, otherwise limit the intensity */ -void corgibl_limit_intensity(int limit) +void genericbl_limit_intensity(int limit) { struct backlight_device *bd = generic_backlight_device; @@ -68,7 +68,7 @@ void corgibl_limit_intensity(int limit) backlight_update_status(generic_backlight_device); mutex_unlock(&bd->ops_lock); } -EXPORT_SYMBOL(corgibl_limit_intensity); +EXPORT_SYMBOL(genericbl_limit_intensity); static const struct backlight_ops genericbl_ops = { .options = BL_CORE_SUSPENDRESUME, diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c index 98ad3e5f7c85..4f5d1c4cb6ab 100644 --- a/drivers/video/backlight/l4f00242t03.c +++ b/drivers/video/backlight/l4f00242t03.c @@ -14,6 +14,7 @@ #include <linux/device.h> #include <linux/kernel.h> #include <linux/delay.h> +#include <linux/module.h> #include <linux/gpio.h> #include <linux/lcd.h> #include <linux/slab.h> @@ -52,15 +53,11 @@ static void l4f00242t03_lcd_init(struct spi_device *spi) dev_dbg(&spi->dev, "initializing LCD\n"); - if (priv->io_reg) { - regulator_set_voltage(priv->io_reg, 1800000, 1800000); - regulator_enable(priv->io_reg); - } + regulator_set_voltage(priv->io_reg, 1800000, 1800000); + regulator_enable(priv->io_reg); - if (priv->core_reg) { - regulator_set_voltage(priv->core_reg, 2800000, 2800000); - regulator_enable(priv->core_reg); - } + regulator_set_voltage(priv->core_reg, 2800000, 2800000); + regulator_enable(priv->core_reg); l4f00242t03_reset(pdata->reset_gpio); @@ -78,11 +75,8 @@ static void l4f00242t03_lcd_powerdown(struct spi_device *spi) gpio_set_value(pdata->data_enable_gpio, 0); - if (priv->io_reg) - regulator_disable(priv->io_reg); - - if (priv->core_reg) - regulator_disable(priv->core_reg); + regulator_disable(priv->io_reg); + regulator_disable(priv->core_reg); } static int l4f00242t03_lcd_power_get(struct lcd_device *ld) @@ -178,47 +172,34 @@ static int __devinit l4f00242t03_probe(struct spi_device *spi) 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) + priv->io_reg = regulator_get(&spi->dev, "vdd"); + if (IS_ERR(priv->io_reg)) { + dev_err(&spi->dev, "%s: Unable to get the IO regulator\n", + __func__); goto err3; - - if (pdata->io_supply) { - priv->io_reg = regulator_get(NULL, pdata->io_supply); - - if (IS_ERR(priv->io_reg)) { - pr_err("%s: Unable to get the IO regulator\n", - __func__); - goto err3; - } } - if (pdata->core_supply) { - priv->core_reg = regulator_get(NULL, pdata->core_supply); - - if (IS_ERR(priv->core_reg)) { - pr_err("%s: Unable to get the core regulator\n", - __func__); - goto err4; - } + priv->core_reg = regulator_get(&spi->dev, "vcore"); + if (IS_ERR(priv->core_reg)) { + dev_err(&spi->dev, "%s: Unable to get the core regulator\n", + __func__); + goto err4; } priv->ld = lcd_device_register("l4f00242t03", @@ -238,11 +219,9 @@ static int __devinit l4f00242t03_probe(struct spi_device *spi) return 0; err5: - if (priv->core_reg) - regulator_put(priv->core_reg); + regulator_put(priv->core_reg); err4: - if (priv->io_reg) - regulator_put(priv->io_reg); + regulator_put(priv->io_reg); err3: gpio_free(pdata->data_enable_gpio); err2: @@ -266,10 +245,8 @@ static int __devexit l4f00242t03_remove(struct spi_device *spi) gpio_free(pdata->data_enable_gpio); gpio_free(pdata->reset_gpio); - if (priv->io_reg) - regulator_put(priv->io_reg); - if (priv->core_reg) - regulator_put(priv->core_reg); + regulator_put(priv->io_reg); + regulator_put(priv->core_reg); kfree(priv); diff --git a/drivers/video/backlight/ld9040.c b/drivers/video/backlight/ld9040.c index 5934655eb1ff..da9a5ce0ccb8 100644 --- a/drivers/video/backlight/ld9040.c +++ b/drivers/video/backlight/ld9040.c @@ -30,6 +30,7 @@ #include <linux/kernel.h> #include <linux/lcd.h> #include <linux/backlight.h> +#include <linux/module.h> #include "ld9040_gamma.h" diff --git a/drivers/video/backlight/lms283gf05.c b/drivers/video/backlight/lms283gf05.c index 5d3cf33953ac..4ec78cfe26ea 100644 --- a/drivers/video/backlight/lms283gf05.c +++ b/drivers/video/backlight/lms283gf05.c @@ -17,6 +17,7 @@ #include <linux/spi/spi.h> #include <linux/spi/lms283gf05.h> +#include <linux/module.h> struct lms283gf05_state { struct spi_device *spi; diff --git a/drivers/video/backlight/max8925_bl.c b/drivers/video/backlight/max8925_bl.c index 07e8e273ced0..7bbc802560ea 100644 --- a/drivers/video/backlight/max8925_bl.c +++ b/drivers/video/backlight/max8925_bl.c @@ -17,6 +17,7 @@ #include <linux/backlight.h> #include <linux/mfd/max8925.h> #include <linux/slab.h> +#include <linux/module.h> #define MAX_BRIGHTNESS (0xff) #define MIN_BRIGHTNESS (0) diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index 694e5aab0d69..e132157d8545 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c @@ -30,6 +30,7 @@ #include <linux/kernel.h> #include <linux/lcd.h> #include <linux/backlight.h> +#include <linux/module.h> #include "s6e63m0_gamma.h" diff --git a/drivers/video/backlight/wm831x_bl.c b/drivers/video/backlight/wm831x_bl.c index d4c6eb248ff9..fbe9e9316f3b 100644 --- a/drivers/video/backlight/wm831x_bl.c +++ b/drivers/video/backlight/wm831x_bl.c @@ -11,6 +11,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> +#include <linux/module.h> #include <linux/fb.h> #include <linux/backlight.h> #include <linux/slab.h> |