From 358791033f39d138bf64e5544937345f4a7cf83a Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Tue, 16 Aug 2016 17:10:12 +0200 Subject: backlight-tosa: Delete unnecessary assignment for the field "owner" The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Lee Jones diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c index 83742d8..9706759 100644 --- a/drivers/video/backlight/tosa_bl.c +++ b/drivers/video/backlight/tosa_bl.c @@ -163,7 +163,6 @@ MODULE_DEVICE_TABLE(i2c, tosa_bl_id); static struct i2c_driver tosa_bl_driver = { .driver = { .name = "tosa-bl", - .owner = THIS_MODULE, .pm = &tosa_bl_pm_ops, }, .probe = tosa_bl_probe, -- cgit v0.10.2 From 0c9501f823a40a061f755d3789c4705c9fe85f14 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 31 Aug 2016 10:18:12 +0200 Subject: backlight: pwm_bl: Handle gpio that can sleep Some backlight GPIOs might be connected to some i2c based expanders whose access might sleep. Since it's not in any critical path, use the cansleep variant of the GPIO API. Signed-off-by: Maxime Ripard Signed-off-by: Lee Jones diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index b2b366b..1261400 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -55,7 +55,7 @@ static void pwm_backlight_power_on(struct pwm_bl_data *pb, int brightness) dev_err(pb->dev, "failed to enable power supply\n"); if (pb->enable_gpio) - gpiod_set_value(pb->enable_gpio, 1); + gpiod_set_value_cansleep(pb->enable_gpio, 1); pwm_enable(pb->pwm); pb->enabled = true; @@ -70,7 +70,7 @@ static void pwm_backlight_power_off(struct pwm_bl_data *pb) pwm_disable(pb->pwm); if (pb->enable_gpio) - gpiod_set_value(pb->enable_gpio, 0); + gpiod_set_value_cansleep(pb->enable_gpio, 0); regulator_disable(pb->power_supply); pb->enabled = false; -- cgit v0.10.2