Skip to contentSkip to conversation

led: enable led in 88pm860x

PATCH New Haojian Zhuang 2 participants 4 messages Nov 13, 2009 – Nov 20, 2009

lore
Share & tools
lore
#1 lore raw

PATCH 8/10 led: enable led in 88pm860x

Review

Quoted 12 lines · Haojian Zhuang
(quoted diff) +12 -0
+
+static void pm860x_led_set(struct led_classdev *cdev,
+			   enum led_brightness value)
+{
+	struct pm860x_led *data = container_of(cdev, struct pm860x_led, cdev);
+	struct pm860x_chip *chip = data->chip;
+	unsigned char brightness;
+	int offset;
+	int ret = -EINVAL;
+
+	if (data->port < 0)
+		return;

Same here - if port is negative why even bother with creating led device?

Signature · 1 line
Dmitry
#2 lore raw

PATCH 8/10 led: enable led in 88pm860x

Quoted 17 lines · Dmitry Torokhov

Review

Quoted 12 lines · Haojian Zhuang
(quoted diff) +12 -0
+
+static void pm860x_led_set(struct led_classdev *cdev,
+ ? ? ? ? ? ? ? ? ? ? ? ?enum led_brightness value)
+{
+ ? ? struct pm860x_led *data = container_of(cdev, struct pm860x_led, cdev);
+ ? ? struct pm860x_chip *chip = data->chip;
+ ? ? unsigned char brightness;
+ ? ? int offset;
+ ? ? int ret = -EINVAL;
+
+ ? ? if (data->port < 0)
+ ? ? ? ? ? ? return;

Same here - if port is negative why even bother with creating led device?

Quoted 3 lines

--
Dmitry

Right. I update code now.

Haojian