]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
backlight/lv5207lp: Rename struct lv5207lp_platform_data.fbdev to 'dev'
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 13 Jun 2023 11:06:41 +0000 (13:06 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 27 Jun 2023 07:58:48 +0000 (09:58 +0200)
Rename struct lv5207lp_platform_data.fbdev to 'dev', as it stores a
pointer to the Linux platform device; not the fbdev device. Makes
the code easier to understand.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Lee Jones <lee@kernel.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: linux-sh@vger.kernel.org
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-7-tzimmermann@suse.de
arch/sh/boards/mach-kfr2r09/setup.c
drivers/video/backlight/lv5207lp.c
include/linux/platform_data/lv5207lp.h

index 20f4db778ed6aee279fb3fc79668aa7076fa5db8..a18e80394aedca6bb27d133374094bc739b4c0ea 100644 (file)
@@ -202,7 +202,7 @@ static struct platform_device kfr2r09_sh_lcdc_device = {
 };
 
 static struct lv5207lp_platform_data kfr2r09_backlight_data = {
-       .fbdev = &kfr2r09_sh_lcdc_device.dev,
+       .dev = &kfr2r09_sh_lcdc_device.dev,
        .def_value = 13,
        .max_value = 13,
 };
index 99ba4bc0a500d94ebb2a9d6552132950223758e8..739f45cd2d381aebc1f7cb39cdc6752f8838d265 100644 (file)
@@ -67,7 +67,7 @@ static int lv5207lp_backlight_check_fb(struct backlight_device *backlight,
 {
        struct lv5207lp *lv = bl_get_data(backlight);
 
-       return lv->pdata->fbdev == NULL || lv->pdata->fbdev == info->device;
+       return !lv->pdata->dev || lv->pdata->dev == info->device;
 }
 
 static const struct backlight_ops lv5207lp_backlight_ops = {
index c9da8d4027504fbd7b45e72c10d93b4b489bea97..95d85c1394bcaf2e9e64e78e7bac115cd74825bf 100644 (file)
@@ -8,7 +8,7 @@
 struct device;
 
 struct lv5207lp_platform_data {
-       struct device *fbdev;
+       struct device *dev;
        unsigned int max_value;
        unsigned int def_value;
 };