All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@nokia.com>
To: linux-omap@vger.kernel.org
Cc: Felipe Balbi <felipe.balbi@nokia.com>,
	Richard Purdie <rpurdie@rpsys.net>
Subject: [PATCH 1/8] i2c: lp5521: remove dead code
Date: Tue, 14 Oct 2008 16:01:33 +0300	[thread overview]
Message-ID: <1223989300-27294-2-git-send-email-felipe.balbi@nokia.com> (raw)
In-Reply-To: <1223989300-27294-1-git-send-email-felipe.balbi@nokia.com>

That LED_CONNECTED_WRONG was never defined so removing.
If someone needs those hooks, add back via proper
platform_data instead of nasty ifdefery.

Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
---
 drivers/i2c/chips/lp5521.c |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/drivers/i2c/chips/lp5521.c b/drivers/i2c/chips/lp5521.c
index c0862d9..7fb8091 100644
--- a/drivers/i2c/chips/lp5521.c
+++ b/drivers/i2c/chips/lp5521.c
@@ -28,13 +28,8 @@
 
 #define LP5521_DRIVER_NAME		"lp5521"
 
-#ifdef LED_CONNECTED_WRONG
-#define LP5521_REG_R_PWM		0x04
-#define LP5521_REG_B_PWM		0x02
-#else
 #define LP5521_REG_R_PWM		0x02
 #define LP5521_REG_B_PWM		0x04
-#endif
 #define LP5521_REG_ENABLE		0x00
 #define LP5521_REG_OP_MODE		0x01
 #define LP5521_REG_G_PWM		0x03
@@ -200,22 +195,12 @@ static ssize_t show_active_channels(struct device *dev,
 	char channels[4];
 	int pos = 0;
 
-#ifdef LED_CONNECTED_WRONG
-	if (chip->blue)
-		pos += sprintf(channels + pos, "r");
-	if (chip->green)
-		pos += sprintf(channels + pos, "g");
-	if (chip->red)
-		pos += sprintf(channels + pos, "b");
-
-#else
 	if (chip->red)
 		pos += sprintf(channels + pos, "r");
 	if (chip->green)
 		pos += sprintf(channels + pos, "g");
 	if (chip->blue)
 		pos += sprintf(channels + pos, "b");
-#endif
 
 	channels[pos] = '\0';
 
@@ -232,17 +217,10 @@ static ssize_t store_active_channels(struct device *dev,
 	chip->green = 0;
 	chip->blue = 0;
 
-#ifdef LED_CONNECTED_WRONG
-	if (strchr(buf, 'r') != NULL)
-		chip->blue = 1;
-	if (strchr(buf, 'b') != NULL)
-		chip->red = 1;
-#else
 	if (strchr(buf, 'r') != NULL)
 		chip->red = 1;
 	if (strchr(buf, 'b') != NULL)
 		chip->blue = 1;
-#endif
 	if (strchr(buf, 'g') != NULL)
 		chip->green = 1;
 
-- 
1.6.0.2.307.gc427


  reply	other threads:[~2008-10-14 13:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-14 13:01 [PATCH 0/8] updtes to few nokia drivers Felipe Balbi
2008-10-14 13:01 ` Felipe Balbi [this message]
2008-10-14 13:01   ` [PATCH 2/8] i2c: lp5521: cosmetic fixes Felipe Balbi
2008-10-14 13:01     ` [PATCH 3/8] lp5521: move to drivers/leds Felipe Balbi
2008-10-14 13:01       ` [PATCH 4/8] leds: lp5521: simplify mode setting Felipe Balbi
2008-10-14 13:01         ` [PATCH 5/8] leds: lp5521: register separate leds Felipe Balbi
2008-10-14 13:01           ` [PATCH 6/8] tsl2563: move tsl2563 to drivers/hwmon Felipe Balbi
2008-10-14 13:01             ` [PATCH 7/8] input: lm8323: get rid of global pdata pointer Felipe Balbi
2008-10-14 13:01               ` [PATCH 8/8] input: tsc2005: move to gpiolib Felipe Balbi
2008-10-14 13:38             ` [PATCH 6/8] tsl2563: move tsl2563 to drivers/hwmon Jean Delvare
2008-10-14 13:52               ` Felipe Balbi
2008-10-14 14:14                 ` Jean Delvare
2008-10-14 14:38                   ` Felipe Balbi
2008-10-14 16:00                 ` David Brownell
2008-10-14 21:20                   ` Felipe Balbi
2008-10-14 21:44                     ` David Brownell
2008-10-14 21:50                       ` Felipe Balbi
2008-10-15  8:26                       ` Jean Delvare
2008-10-14 15:55           ` [PATCH 5/8] leds: lp5521: register separate leds David Brownell
2008-10-14 17:09             ` Felipe Balbi
2008-10-14 15:53       ` [PATCH 3/8] lp5521: move to drivers/leds David Brownell
2008-10-14 17:11         ` Felipe Balbi
2008-10-14 17:19           ` David Brownell
2008-10-14 17:32             ` Felipe Balbi
2009-02-10 12:15 [PATCH 0/8] updates to two nokia drivers Felipe Balbi
2009-02-10 12:15 ` [PATCH 1/8] i2c: lp5521: remove dead code Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1223989300-27294-2-git-send-email-felipe.balbi@nokia.com \
    --to=felipe.balbi@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.