| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Backlight Driver for the KB3886 Backlight |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2007-2008 Claudio Nieder |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Based on corgi_bl.c by Richard Purdie and kb3886 driver by Robert Woerle |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 10 | | - * published by the Free Software Foundation. |
|---|
| 11 | | - * |
|---|
| 12 | 8 | */ |
|---|
| 13 | 9 | |
|---|
| 14 | 10 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 91 | 87 | |
|---|
| 92 | 88 | static int kb3886bl_send_intensity(struct backlight_device *bd) |
|---|
| 93 | 89 | { |
|---|
| 94 | | - int intensity = bd->props.brightness; |
|---|
| 90 | + int intensity = backlight_get_brightness(bd); |
|---|
| 95 | 91 | |
|---|
| 96 | | - if (bd->props.power != FB_BLANK_UNBLANK) |
|---|
| 97 | | - intensity = 0; |
|---|
| 98 | | - if (bd->props.fb_blank != FB_BLANK_UNBLANK) |
|---|
| 99 | | - intensity = 0; |
|---|
| 100 | 92 | if (kb3886bl_flags & KB3886BL_SUSPENDED) |
|---|
| 101 | 93 | intensity = 0; |
|---|
| 102 | 94 | |
|---|