[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04f0f8c7-43cd-f774-c952-eb1cf3494bd8@csgroup.eu>
Date: Mon, 9 Jan 2023 17:44:46 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: "sam@...nborg.org" <sam@...nborg.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Helge Deller <deller@....de>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
Antonino Daplas <adaplas@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Robin van der Gracht <robin@...tonic.nl>,
Miguel Ojeda <ojeda@...nel.org>, Lee Jones <lee@...nel.org>,
Daniel Thompson <daniel.thompson@...aro.org>,
Jingoo Han <jingoohan1@...il.com>
CC: "linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
Stephen Kitt <steve@....org>, Arnd Bergmann <arnd@...db.de>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Jani Nikula <jani.nikula@...el.com>,
"linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
Jason Yan <yanaijie@...wei.com>,
Souptick Joarder <jrdr.linux@...il.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 02/15] video: fbdev: atyfb: Introduce
backlight_get_brightness()
Le 07/01/2023 à 19:26, Sam Ravnborg via B4 Submission Endpoint a écrit :
> From: Sam Ravnborg <sam@...nborg.org>
>
> Introduce backlight_get_brightness() to simplify logic
> and avoid direct access to backlight properties.
When I read 'introduce' I understand that you are adding a new function.
In fact backlight_get_brightness() already exists, so maybe replace
'introduce' by 'use'
>
> Signed-off-by: Sam Ravnborg <sam@...nborg.org>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> Cc: Sam Ravnborg <sam@...nborg.org>
> Cc: Daniel Vetter <daniel.vetter@...ll.ch>
> Cc: Souptick Joarder <jrdr.linux@...il.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
> Cc: Jason Yan <yanaijie@...wei.com>
> Cc: Jani Nikula <jani.nikula@...el.com>
> Cc: Arnd Bergmann <arnd@...db.de>
> ---
> drivers/video/fbdev/aty/atyfb_base.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
> index 0ccf5d401ecb..ca361e215904 100644
> --- a/drivers/video/fbdev/aty/atyfb_base.c
> +++ b/drivers/video/fbdev/aty/atyfb_base.c
> @@ -2219,13 +2219,7 @@ static int aty_bl_update_status(struct backlight_device *bd)
> {
> struct atyfb_par *par = bl_get_data(bd);
> unsigned int reg = aty_ld_lcd(LCD_MISC_CNTL, par);
> - int level;
> -
> - if (bd->props.power != FB_BLANK_UNBLANK ||
> - bd->props.fb_blank != FB_BLANK_UNBLANK)
> - level = 0;
> - else
> - level = bd->props.brightness;
> + int level = backlight_get_brightness(bd);
>
> reg |= (BLMOD_EN | BIASMOD_EN);
> if (level > 0) {
>
> --
> 2.34.1
Powered by blists - more mailing lists