Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight/bd6107: Rename struct bd6107_platform_data.fbdev to 'dev'

Rename struct bd6107_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: Lee Jones <lee@kernel.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
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-3-tzimmermann@suse.de

+2 -2
+1 -1
drivers/video/backlight/bd6107.c
··· 104 104 { 105 105 struct bd6107 *bd = bl_get_data(backlight); 106 106 107 - return bd->pdata->fbdev == NULL || bd->pdata->fbdev == info->device; 107 + return !bd->pdata->dev || bd->pdata->dev == info->device; 108 108 } 109 109 110 110 static const struct backlight_ops bd6107_backlight_ops = {
+1 -1
include/linux/platform_data/bd6107.h
··· 8 8 struct device; 9 9 10 10 struct bd6107_platform_data { 11 - struct device *fbdev; 11 + struct device *dev; 12 12 unsigned int def_value; 13 13 }; 14 14