From 27e4aea3860707cf80717f85185189b6b2b230dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Tue, 25 Feb 2014 16:55:47 +0800 Subject: [PATCH] pwm-backlight: reset to unpstream version --- drivers/video/backlight/pwm_bl.c | 26 ++------------------------ include/linux/pwm_backlight.h | 3 --- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 7dd9b2be7c85..1fea627394d7 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -20,8 +20,7 @@ #include #include #include -#include -#include + struct pwm_bl_data { struct pwm_device *pwm; struct device *dev; @@ -102,9 +101,7 @@ static int pwm_backlight_parse_dt(struct device *dev, struct property *prop; int length; u32 value; - int gpio,ret; - enum of_gpio_flags flags; - + int ret; if (!node) return -ENODEV; @@ -136,25 +133,6 @@ static int pwm_backlight_parse_dt(struct device *dev, &value); if (ret < 0) return ret; - data->gpio = devm_kzalloc(dev, - sizeof(struct gpio) * 1, - GFP_KERNEL); - gpio = of_get_named_gpio_flags(node, "gpios", 0, &flags); - data->gpio->gpio = gpio; - - - if (gpio != -1) { - ret = devm_gpio_request(dev, gpio, "gpio_pwm_bl_en"); - if(ret){ - data->gpio->gpio = -1; - printk("PWM_BL_EN request ERROR"); - } - ret = gpio_direction_output(data->gpio->gpio , !flags); - if(ret){ - printk("PWM_BL_EN request ERROR"); - } - - } data->dft_brightness = value; data->max_brightness--; diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index 0e80289481f5..56f4a866539a 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h @@ -13,9 +13,6 @@ struct platform_pwm_backlight_data { unsigned int lth_brightness; unsigned int pwm_period_ns; unsigned int *levels; - - struct gpio *gpio; - int (*init)(struct device *dev); int (*notify)(struct device *dev, int brightness); void (*notify_after)(struct device *dev, int brightness); -- 2.34.1