mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
- Core Frameworks
- Report correct error status to user - Fix-ups - Move Backlight headers out of I2C; adp8860, adp8870 -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJZXgAWAAoJEFGvii+H/HdhlrQP/j+PXYo6jgYg+uoNvlKpgBWD bkx2JM9fXA6ZFaEhcvU1LWCt+CqnBeL6ujDb7GBJTRrazws1vZ2Snjrbl/go+6Y2 h4thCecO9AJG1YaDXsWdDjLu9Flx+ZqKS7r+fyp/0O+s+G78SiQZHfoPKNplfrD3 TQpw4MIMRPqeYILgIzOXkBg+HEa2L5oQD1zyr6wIUyqNQIQIR7cUHdVutd241BTD JitNk39e8CW8jw9zpYJKb7KxdwLtgm7iU6Lf+DWBffVtzh4CY7vJC0WZla7W6lhL uzBH5mgvmfpRg8/FL37dgQrmal1MHzkXJ5EHQk+08D+Yk6b2vqw6PBDSQ2ZZJmr5 SLyLZK1Y1s2+wX+X7fit71QrcUWDUSYOhh+9GKDwcVfNqacWzro1i2p2ovOTntW4 JbGx8u+UU9pcz1sY1qljjYKxi6G1EAvHbwwobe3syleqh7I09RsnSKqi6ZEXbLAE Nfxe4K+djnoirtjFL8vpIy0rXFGQKccIAisid5rFnXjL9rVB/7FiQWGovav+9YuG rpr+dQJe5FlLaeTx9CDZeFeefwVyaDOBVJsVC0yghJoz3o2tz/et5zhBEAtLtMQP DkS+mEFYLv3ZkXy2Wu4jU7y4jPoeRwTQrGaaUnsh/H+/dAmY6LH6Ccl2My+H0RBi wAFUl1yW8G+qgr8mhT7y =QD8S -----END PGP SIGNATURE----- Merge tag 'backlight-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Core Framework: - Report correct error status to user Fix-ups: - Move Backlight headers out of I2C (adp8860, adp8870)" * tag 'backlight-next-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: video: adp8870: move header file out of I2C realm backlight: adp8860: Move header file out of I2C realm backlight: Report error on failure
This commit is contained in:
commit
df7cb187ed
@ -1995,7 +1995,7 @@ static struct adp5588_gpio_platform_data adp5588_gpio_data = {
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_BACKLIGHT_ADP8870)
|
||||
#include <linux/i2c/adp8870.h>
|
||||
#include <linux/platform_data/adp8870.h>
|
||||
static struct led_info adp8870_leds[] = {
|
||||
{
|
||||
.name = "adp8870-led7",
|
||||
@ -2047,7 +2047,7 @@ static struct adp8870_backlight_platform_data adp8870_pdata = {
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_BACKLIGHT_ADP8860)
|
||||
#include <linux/i2c/adp8860.h>
|
||||
#include <linux/platform_data/adp8860.h>
|
||||
static struct led_info adp8860_leds[] = {
|
||||
{
|
||||
.name = "adp8860-led7",
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#include <linux/i2c/adp8860.h>
|
||||
#include <linux/platform_data/adp8860.h>
|
||||
#define ADP8860_EXT_FEATURES
|
||||
#define ADP8860_USE_LEDS
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <linux/i2c/adp8870.h>
|
||||
#include <linux/platform_data/adp8870.h>
|
||||
#define ADP8870_EXT_FEATURES
|
||||
#define ADP8870_USE_LEDS
|
||||
|
||||
|
@ -134,7 +134,7 @@ static ssize_t bl_power_store(struct device *dev, struct device_attribute *attr,
|
||||
{
|
||||
int rc;
|
||||
struct backlight_device *bd = to_backlight_device(dev);
|
||||
unsigned long power;
|
||||
unsigned long power, old_power;
|
||||
|
||||
rc = kstrtoul(buf, 0, &power);
|
||||
if (rc)
|
||||
@ -145,10 +145,16 @@ static ssize_t bl_power_store(struct device *dev, struct device_attribute *attr,
|
||||
if (bd->ops) {
|
||||
pr_debug("set power to %lu\n", power);
|
||||
if (bd->props.power != power) {
|
||||
old_power = bd->props.power;
|
||||
bd->props.power = power;
|
||||
backlight_update_status(bd);
|
||||
rc = backlight_update_status(bd);
|
||||
if (rc)
|
||||
bd->props.power = old_power;
|
||||
else
|
||||
rc = count;
|
||||
} else {
|
||||
rc = count;
|
||||
}
|
||||
rc = count;
|
||||
}
|
||||
mutex_unlock(&bd->ops_lock);
|
||||
|
||||
@ -176,8 +182,7 @@ int backlight_device_set_brightness(struct backlight_device *bd,
|
||||
else {
|
||||
pr_debug("set brightness to %lu\n", brightness);
|
||||
bd->props.brightness = brightness;
|
||||
backlight_update_status(bd);
|
||||
rc = 0;
|
||||
rc = backlight_update_status(bd);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&bd->ops_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user