Skip to content

Commit 397b749

Browse files
Thomas Zimmermannlag-linaro
authored andcommitted
backlight: pwm-backlight: Remove struct backlight_ops.check_fb
The internal check_fb callback from struct pwm_bl_data is never implemented. The driver's implementation of check_fb always returns true, which is the backlight core's default if no implementation has been set. So remove the code from the driver. v2: * reword commit message Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Uwe Kleine-König <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 0133952 commit 397b749

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

drivers/video/backlight/pwm_bl.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <linux/kernel.h>
1212
#include <linux/init.h>
1313
#include <linux/platform_device.h>
14-
#include <linux/fb.h>
1514
#include <linux/backlight.h>
1615
#include <linux/err.h>
1716
#include <linux/pwm.h>
@@ -34,7 +33,6 @@ struct pwm_bl_data {
3433
int brightness);
3534
void (*notify_after)(struct device *,
3635
int brightness);
37-
int (*check_fb)(struct device *, struct fb_info *);
3836
void (*exit)(struct device *);
3937
};
4038

@@ -129,17 +127,8 @@ static int pwm_backlight_update_status(struct backlight_device *bl)
129127
return 0;
130128
}
131129

132-
static int pwm_backlight_check_fb(struct backlight_device *bl,
133-
struct fb_info *info)
134-
{
135-
struct pwm_bl_data *pb = bl_get_data(bl);
136-
137-
return !pb->check_fb || pb->check_fb(pb->dev, info);
138-
}
139-
140130
static const struct backlight_ops pwm_backlight_ops = {
141131
.update_status = pwm_backlight_update_status,
142-
.check_fb = pwm_backlight_check_fb,
143132
};
144133

145134
#ifdef CONFIG_OF
@@ -482,7 +471,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
482471

483472
pb->notify = data->notify;
484473
pb->notify_after = data->notify_after;
485-
pb->check_fb = data->check_fb;
486474
pb->exit = data->exit;
487475
pb->dev = &pdev->dev;
488476
pb->enabled = false;

include/linux/pwm_backlight.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct platform_pwm_backlight_data {
1919
int (*notify)(struct device *dev, int brightness);
2020
void (*notify_after)(struct device *dev, int brightness);
2121
void (*exit)(struct device *dev);
22-
int (*check_fb)(struct device *dev, struct fb_info *info);
2322
};
2423

2524
#endif

0 commit comments

Comments
 (0)