lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <B567DBAB974C0544994013492B949F8E3812DEC931@EXMAIL03.scwf.nsc.com>
Date:	Mon, 30 Jan 2012 23:33:28 -0800
From:	"Kim, Milo" <Milo.Kim@...com>
To:	"Andrew Morton" <akpm@...ux-foundation.org>
cc:	"Linus Walleij" <linus.walleij@...aro.org>,
	"shreshthakumar.sahu@...ricsson.com" 
	<shreshthakumar.sahu@...ricsson.com>,
	"rpurdie@...ys.net" <rpurdie@...ys.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH v3 2/6] leds-lm3530: add 'name' in lm3530_platform_data

The led device name can be configurable.
For the compatibility, the name is set to default value(LM3530_LED_DEV)
when 'name' is not defined.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@...com>
Acked-by: Linus Walleij <linus.walleij@...aro.org>
---
 drivers/leds/leds-lm3530.c |    2 +-
 include/linux/led-lm3530.h |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c
index 3135734..963a1db 100644
--- a/drivers/leds/leds-lm3530.c
+++ b/drivers/leds/leds-lm3530.c
@@ -341,7 +341,7 @@ static int __devinit lm3530_probe(struct i2c_client *client,
 	drvdata->pdata = pdata;
 	drvdata->brightness = LED_OFF;
 	drvdata->enable = false;
-	drvdata->led_dev.name = LM3530_LED_DEV;
+	drvdata->led_dev.name = pdata->name ? pdata->name : LM3530_LED_DEV;
 	drvdata->led_dev.brightness_set = lm3530_brightness_set;
 
 	i2c_set_clientdata(client, drvdata);
diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h
index 5534d1e..513e9c3 100644
--- a/include/linux/led-lm3530.h
+++ b/include/linux/led-lm3530.h
@@ -91,6 +91,7 @@ struct lm3530_pwm_data {
  * @als1_resistor_sel: internal resistance from ALS1 input to ground
  * @als2_resistor_sel: internal resistance from ALS2 input to ground
  * @brt_val: brightness value (0-255)
+ * @name: led device name
  * @pwm_data: PWM control functions. only valid when the mode is PWM.
  */
 struct lm3530_platform_data {
@@ -110,6 +111,7 @@ struct lm3530_platform_data {
 
 	u8 brt_val;
 
+	const char *name;
 	struct lm3530_pwm_data pwm_data;
 };
 
-- 
1.7.4.1


Best Regards,
Milo (Woogyom) Kim
Texas Instruments Incorporated




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ