| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Backlight driver for Analog Devices ADP8870 Backlight Devices |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2009-2011 Analog Devices Inc. |
|---|
| 5 | | - * |
|---|
| 6 | | - * Licensed under the GPL-2 or later. |
|---|
| 7 | 6 | */ |
|---|
| 8 | 7 | |
|---|
| 9 | 8 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 400 | 399 | |
|---|
| 401 | 400 | static int adp8870_bl_update_status(struct backlight_device *bl) |
|---|
| 402 | 401 | { |
|---|
| 403 | | - int brightness = bl->props.brightness; |
|---|
| 404 | | - |
|---|
| 405 | | - if (bl->props.power != FB_BLANK_UNBLANK) |
|---|
| 406 | | - brightness = 0; |
|---|
| 407 | | - |
|---|
| 408 | | - if (bl->props.fb_blank != FB_BLANK_UNBLANK) |
|---|
| 409 | | - brightness = 0; |
|---|
| 410 | | - |
|---|
| 411 | | - return adp8870_bl_set(bl, brightness); |
|---|
| 402 | + return adp8870_bl_set(bl, backlight_get_brightness(bl)); |
|---|
| 412 | 403 | } |
|---|
| 413 | 404 | |
|---|
| 414 | 405 | static int adp8870_bl_get_brightness(struct backlight_device *bl) |
|---|
| .. | .. |
|---|
| 992 | 983 | module_i2c_driver(adp8870_driver); |
|---|
| 993 | 984 | |
|---|
| 994 | 985 | MODULE_LICENSE("GPL v2"); |
|---|
| 995 | | -MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
|---|
| 986 | +MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>"); |
|---|
| 996 | 987 | MODULE_DESCRIPTION("ADP8870 Backlight driver"); |
|---|