linux-mips
[Top] [All Lists]

[PATCH 2/7] backlight:pwm: add an element 'name' to platform data

To: <eric.y.miao@gmail.com>, <linux@arm.linux.org.uk>, <grinberg@compulab.co.il>, <mike@compulab.co.il>, <robert.jarzmik@free.fr>, <marek.vasut@gmail.com>, <drwyrm@gmail.com>, <stefan@openezx.org>, <laforge@openezx.org>, <ospite@studenti.unina.it>, <philipp.zabel@gmail.com>, <mad_soft@inbox.ru>, <maz@misterjones.org>, <daniel@caiaq.de>, <haojian.zhuang@marvell.com>, <timur@freescale.com>, <ben-linux@fluff.org>, <support@simtec.co.uk>, <arnaud.patard@rtp-net.org>, <dgreenday@gmail.com>, <anarsoul@gmail.com>, <akpm@linux-foundation.org>, <mcuelenaere@gmail.com>, <kernel@pengutronix.de>, <andre.goddard@gmail.com>, <jkosina@suse.cz>, <tj@kernel.org>, <hsweeten@visionengravers.com>, <u.kleine-koenig@pengutronix.de>, <kgene.kim@samsung.com>, <ralf@linux-mips.org>, <lars@metafoo.de>, <dilinger@collabora.co.uk>, <mroth@nessie.de>, <randy.dunlap@oracle.com>, <lethal@linux-sh.org>, <rusty@rustcorp.com.au>, <damm@opensource.se>, <mst@redhat.com>, <rpurdie@rpsys.net>, <sguinot@lacie.co>, <sameo@linux.intel.com>, <broonie@opensource.wolfsonmicro.com>, <balajitk@ti.com>, <rnayak@ti.com>, <santosh.shilimkar@ti.com>, <hemanthv@ti.com>, <michael.hennerich@analog.com>, <vapier@gentoo.org>, <khali@linux-fr.org>, <jic23@cam.ac.uk>, <re.emese@gmail.com>, <linux@simtec.co.uk>
Subject: [PATCH 2/7] backlight:pwm: add an element 'name' to platform data
From: Arun Murthy <arun.murthy@stericsson.com>
Date: Tue, 28 Sep 2010 13:10:43 +0530
Cc: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-mips@linux-mips.org>, <arun.murthy@stericsson.com>, <linus.walleij@stericsson.com>, <mattias.wallin@stericsson.com>
In-reply-to: <1285659648-21409-1-git-send-email-arun.murthy@stericsson.com>
References: <1285659648-21409-1-git-send-email-arun.murthy@stericsson.com>
Sender: linux-mips-bounce@linux-mips.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 <arun.murthy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
---
 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


<Prev in Thread] Current Thread [Next in Thread>