[PATCH 08/10] led: enable led in 88pm860x

Haojian Zhuang haojian.zhuang at gmail.com
Tue Nov 17 01:29:18 EST 2009


On Sat, Nov 14, 2009 at 12:06 AM, Dmitry Torokhov
<dmitry.torokhov at gmail.com> wrote:
> On Fri, Nov 13, 2009 at 04:03:35AM -0500, Haojian Zhuang wrote:
>> +
>> +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?
>
> --
> Dmitry
>

Right. I update code now.

Haojian


More information about the linux-arm-kernel mailing list