Merge tag 'backlight-for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones: "Changes to existing drivers: - supply MODULE_DEVICE_TABLE() to ensure probing - constify struct; da9052_bl - enable compile test; lcd_l4f00242t03, lcd_lms283fg05, backlight_gpio - suspend/resume bugfix; lp855x_bl - devm_gpiod_get_optional() API fixup; pwm_bl - error handling fixup; backlight" * tag 'backlight-for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: Change the return type of backlight_update_status() to int backlight: pwm_bl: Simplify usage of devm_gpiod_get_optional backlight: lp855x: Don't clear level on suspend/blank backlight: Allow compile test of GPIO consumers if !GPIOLIB video: backlight: da9052: Constify platform_device_id gpio-backlight: Discover driver during boot time
This commit is contained in:
@@ -117,12 +117,16 @@ struct backlight_device {
|
||||
int use_count;
|
||||
};
|
||||
|
||||
static inline void backlight_update_status(struct backlight_device *bd)
|
||||
static inline int backlight_update_status(struct backlight_device *bd)
|
||||
{
|
||||
int ret = -ENOENT;
|
||||
|
||||
mutex_lock(&bd->update_lock);
|
||||
if (bd->ops && bd->ops->update_status)
|
||||
bd->ops->update_status(bd);
|
||||
ret = bd->ops->update_status(bd);
|
||||
mutex_unlock(&bd->update_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern struct backlight_device *backlight_device_register(const char *name,
|
||||
|
Reference in New Issue
Block a user