summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/pwm_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/pwm_bl.c')
-rw-r--r--drivers/video/backlight/pwm_bl.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index ffcebf6aa76a..237d3d3f3bb1 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -11,7 +11,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/fb.h>
#include <linux/backlight.h>
#include <linux/err.h>
#include <linux/pwm.h>
@@ -34,7 +33,6 @@ struct pwm_bl_data {
int brightness);
void (*notify_after)(struct device *,
int brightness);
- int (*check_fb)(struct device *, struct fb_info *);
void (*exit)(struct device *);
};
@@ -129,17 +127,8 @@ static int pwm_backlight_update_status(struct backlight_device *bl)
return 0;
}
-static int pwm_backlight_check_fb(struct backlight_device *bl,
- struct fb_info *info)
-{
- struct pwm_bl_data *pb = bl_get_data(bl);
-
- return !pb->check_fb || pb->check_fb(pb->dev, info);
-}
-
static const struct backlight_ops pwm_backlight_ops = {
.update_status = pwm_backlight_update_status,
- .check_fb = pwm_backlight_check_fb,
};
#ifdef CONFIG_OF
@@ -437,7 +426,7 @@ static int pwm_backlight_initial_power_state(const struct pwm_bl_data *pb)
/* Not booted with device tree or no phandle link to the node */
if (!node || !node->phandle)
- return FB_BLANK_UNBLANK;
+ return BACKLIGHT_POWER_ON;
/*
* If the driver is probed from the device tree and there is a
@@ -445,7 +434,7 @@ static int pwm_backlight_initial_power_state(const struct pwm_bl_data *pb)
* assume that another driver will enable the backlight at the
* appropriate time. Therefore, if it is disabled, keep it so.
*/
- return active ? FB_BLANK_UNBLANK: FB_BLANK_POWERDOWN;
+ return active ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
}
static int pwm_backlight_probe(struct platform_device *pdev)
@@ -482,7 +471,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
pb->notify = data->notify;
pb->notify_after = data->notify_after;
- pb->check_fb = data->check_fb;
pb->exit = data->exit;
pb->dev = &pdev->dev;
pb->enabled = false;
@@ -709,7 +697,7 @@ static struct platform_driver pwm_backlight_driver = {
.of_match_table = of_match_ptr(pwm_backlight_of_match),
},
.probe = pwm_backlight_probe,
- .remove_new = pwm_backlight_remove,
+ .remove = pwm_backlight_remove,
.shutdown = pwm_backlight_shutdown,
};