From mboxrd@z Thu Jan 1 00:00:00 1970 From: arun.murthy@stericsson.com (Arun Murthy) Date: Tue, 28 Sep 2010 16:05:29 +0530 Subject: [PATCH 2/7] backlight:pwm: add an element 'name' to platform data In-Reply-To: <1285670134-18063-1-git-send-email-arun.murthy@stericsson.com> References: <1285670134-18063-1-git-send-email-arun.murthy@stericsson.com> Message-ID: <1285670134-18063-3-git-send-email-arun.murthy@stericsson.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org A new element 'name' is added to pwm backlight platform data structure. This is required to identify the pwm device. Signed-off-by: Arun Murthy Acked-by: Linus Walleij --- drivers/video/backlight/pwm_bl.c | 4 +++- include/linux/pwm_backlight.h | 1 + 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 5504435..b0978a8 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -94,7 +94,9 @@ static int pwm_backlight_probe(struct platform_device *pdev) pb->notify = data->notify; pb->dev = &pdev->dev; - pb->pwm = pwm_request(data->pwm_id, "backlight"); + if (!data->name) + data->name = "backlight"; + pb->pwm = pwm_request(data->pwm_id, data->name); if (IS_ERR(pb->pwm)) { dev_err(&pdev->dev, "unable to request PWM for backlight\n"); ret = PTR_ERR(pb->pwm); diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index 01b3d75..c2ce8f8 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h @@ -6,6 +6,7 @@ struct platform_pwm_backlight_data { int pwm_id; + char *name; unsigned int max_brightness; unsigned int dft_brightness; unsigned int pwm_period_ns; -- 1.7.2.dirty