| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for the Cirrus EP93xx lcd backlight |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2010 H Hartley Sweeten <hsweeten@visionengravers.com> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | 6 | * |
|---|
| 10 | 7 | * This driver controls the pulse width modulated brightness control output, |
|---|
| 11 | 8 | * BRIGHT, on the Cirrus EP9307, EP9312, and EP9315 processors. |
|---|
| .. | .. |
|---|
| 39 | 36 | |
|---|
| 40 | 37 | static int ep93xxbl_update_status(struct backlight_device *bl) |
|---|
| 41 | 38 | { |
|---|
| 42 | | - int brightness = bl->props.brightness; |
|---|
| 43 | | - |
|---|
| 44 | | - if (bl->props.power != FB_BLANK_UNBLANK || |
|---|
| 45 | | - bl->props.fb_blank != FB_BLANK_UNBLANK) |
|---|
| 46 | | - brightness = 0; |
|---|
| 47 | | - |
|---|
| 48 | | - return ep93xxbl_set(bl, brightness); |
|---|
| 39 | + return ep93xxbl_set(bl, backlight_get_brightness(bl)); |
|---|
| 49 | 40 | } |
|---|
| 50 | 41 | |
|---|
| 51 | 42 | static int ep93xxbl_get_brightness(struct backlight_device *bl) |
|---|