* [merged] leds-lm3530-replace-i2c_client-with-led_classdev.patch removed from -mm tree
@ 2012-03-26 19:29 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2012-03-26 19:29 UTC (permalink / raw)
To: Milo.Kim, linus.walleij, milo.kim, rpurdie, mm-commits
The patch titled
Subject: leds-lm3530: replace i2c_client with led_classdev
has been removed from the -mm tree. Its filename was
leds-lm3530-replace-i2c_client-with-led_classdev.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: "Kim, Milo" <Milo.Kim@ti.com>
Subject: leds-lm3530: replace i2c_client with led_classdev
To get members of lm3530_data, use 'struct led_classdev' rather than
'struct i2c_client'.
[akpm@linux-foundation.org: fix 80-column fixes more nicely]
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/leds/leds-lm3530.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff -puN drivers/leds/leds-lm3530.c~leds-lm3530-replace-i2c_client-with-led_classdev drivers/leds/leds-lm3530.c
--- a/drivers/leds/leds-lm3530.c~leds-lm3530-replace-i2c_client-with-led_classdev
+++ a/drivers/leds/leds-lm3530.c
@@ -297,11 +297,11 @@ static void lm3530_brightness_set(struct
static ssize_t lm3530_mode_get(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct i2c_client *client = container_of(
- dev->parent, struct i2c_client, dev);
- struct lm3530_data *drvdata = i2c_get_clientdata(client);
+ struct led_classdev *led_cdev = dev_get_drvdata(dev);
+ struct lm3530_data *drvdata;
int i, len = 0;
+ drvdata = container_of(led_cdev, struct lm3530_data, led_dev);
for (i = 0; i < ARRAY_SIZE(mode_map); i++)
if (drvdata->mode == mode_map[i].mode_val)
len += sprintf(buf + len, "[%s] ", mode_map[i].mode);
@@ -316,12 +316,11 @@ static ssize_t lm3530_mode_get(struct de
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;
+ int mode, err;
+ drvdata = container_of(led_cdev, struct lm3530_data, led_dev);
mode = lm3530_get_mode_from_str(buf);
if (mode < 0) {
dev_err(dev, "Invalid mode\n");
_
Patches currently in -mm which might be from Milo.Kim@ti.com are
origin.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-26 19:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-26 19:29 [merged] leds-lm3530-replace-i2c_client-with-led_classdev.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).