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
This commit is contained in:
parent
7b91d017f7
commit
ed369def91
3 changed files with 5 additions and 5 deletions
|
@ -386,7 +386,7 @@ static struct property_entry gpio_backlight_props[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct gpio_backlight_platform_data gpio_backlight_data = {
|
static struct gpio_backlight_platform_data gpio_backlight_data = {
|
||||||
.fbdev = &lcdc_device.dev,
|
.dev = &lcdc_device.dev,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct platform_device_info gpio_backlight_device_info = {
|
static const struct platform_device_info gpio_backlight_device_info = {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
struct gpio_backlight {
|
struct gpio_backlight {
|
||||||
struct device *fbdev;
|
struct device *dev;
|
||||||
struct gpio_desc *gpiod;
|
struct gpio_desc *gpiod;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ static int gpio_backlight_check_fb(struct backlight_device *bl,
|
||||||
{
|
{
|
||||||
struct gpio_backlight *gbl = bl_get_data(bl);
|
struct gpio_backlight *gbl = bl_get_data(bl);
|
||||||
|
|
||||||
return gbl->fbdev == NULL || gbl->fbdev == info->device;
|
return !gbl->dev || gbl->dev == info->device;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct backlight_ops gpio_backlight_ops = {
|
static const struct backlight_ops gpio_backlight_ops = {
|
||||||
|
@ -59,7 +59,7 @@ static int gpio_backlight_probe(struct platform_device *pdev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
if (pdata)
|
if (pdata)
|
||||||
gbl->fbdev = pdata->fbdev;
|
gbl->dev = pdata->dev;
|
||||||
|
|
||||||
def_value = device_property_read_bool(dev, "default-on");
|
def_value = device_property_read_bool(dev, "default-on");
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
struct device;
|
struct device;
|
||||||
|
|
||||||
struct gpio_backlight_platform_data {
|
struct gpio_backlight_platform_data {
|
||||||
struct device *fbdev;
|
struct device *dev;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue