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

Configure Feed

Select the types of activity you want to include in your feed.

backlight/gpio_backlight: Rename field 'fbdev' to 'dev'

Rename the field 'fbdev' in struct gpio_backlight_platform_data and
struct gpio_backlight to 'dev', as they store pointers to the Linux
platform device; not the fbdev device. Makes the code easier to
understand.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
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: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-5-tzimmermann@suse.de

+5 -5
+1 -1
arch/sh/boards/mach-ecovec24/setup.c
··· 386 386 }; 387 387 388 388 static struct gpio_backlight_platform_data gpio_backlight_data = { 389 - .fbdev = &lcdc_device.dev, 389 + .dev = &lcdc_device.dev, 390 390 }; 391 391 392 392 static const struct platform_device_info gpio_backlight_device_info = {
+3 -3
drivers/video/backlight/gpio_backlight.c
··· 17 17 #include <linux/slab.h> 18 18 19 19 struct gpio_backlight { 20 - struct device *fbdev; 20 + struct device *dev; 21 21 struct gpio_desc *gpiod; 22 22 }; 23 23 ··· 35 35 { 36 36 struct gpio_backlight *gbl = bl_get_data(bl); 37 37 38 - return gbl->fbdev == NULL || gbl->fbdev == info->device; 38 + return !gbl->dev || gbl->dev == info->device; 39 39 } 40 40 41 41 static const struct backlight_ops gpio_backlight_ops = { ··· 59 59 return -ENOMEM; 60 60 61 61 if (pdata) 62 - gbl->fbdev = pdata->fbdev; 62 + gbl->dev = pdata->dev; 63 63 64 64 def_value = device_property_read_bool(dev, "default-on"); 65 65
+1 -1
include/linux/platform_data/gpio_backlight.h
··· 8 8 struct device; 9 9 10 10 struct gpio_backlight_platform_data { 11 - struct device *fbdev; 11 + struct device *dev; 12 12 }; 13 13 14 14 #endif