[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <B567DBAB974C0544994013492B949F8E3812C6D0D1@EXMAIL03.scwf.nsc.com>
Date: Thu, 19 Jan 2012 17:50:25 -0800
From: "Kim, Milo" <Milo.Kim@...com>
To: "Linus Walleij" <linus.walleij@...aro.org>,
"shreshthakumar.sahu@...ricsson.com"
<shreshthakumar.sahu@...ricsson.com>
cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rpurdie@...ys.net" <rpurdie@...ys.net>
Subject: [PATCH 5/7] leds-lm3530: replace 'i2c_client' with
'led_classdev'
To get members of lm3530_data, use 'struct led_classdev' rather than
'struct i2c_client'.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@...com>
diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c
index 0a42207..89b667b 100644
--- a/drivers/leds/leds-lm3530.c
+++ b/drivers/leds/leds-lm3530.c
@@ -290,11 +290,10 @@ static ssize_t lm3530_mode_get(struct device *dev,
static ssize_t lm3530_mode_set(struct device *dev, struct device_attribute
*attr, const char *buf, size_t size)
{
- int err;
- struct i2c_client *client = container_of(
- dev->parent, struct i2c_client, dev);
- struct lm3530_data *drvdata = i2c_get_clientdata(client);
- int mode;
+ struct led_classdev *led_cdev = dev_get_drvdata(dev);
+ struct lm3530_data *drvdata =
+ container_of(led_cdev, struct lm3530_data, led_dev);
+ int mode, err;
mode = lm3530_get_mode_from_str(buf);
if (mode < 0) {
--
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