@@ -290,7 +290,7 @@ static int cap11xx_init_leds(struct device *dev,
led->cdev.flags = 0;
led->cdev.brightness_set_blocking = cap11xx_led_set;
led->cdev.max_brightness = 1;
- led->cdev.brightness = LED_OFF;
+ led->cdev.brightness = 0;
error = of_property_read_u32(child, "reg", ®);
if (error != 0 || reg >= num_leds) {
@@ -78,7 +78,7 @@ static int qt2160_led_set(struct led_classdev *cdev,
if (value != led->brightness) {
drive = qt2160_read(client, QT2160_CMD_DRIVE_X);
pwmen = qt2160_read(client, QT2160_CMD_PWMEN_X);
- if (value != LED_OFF) {
+ if (value != 0) {
drive |= BIT(led->id);
pwmen |= BIT(led->id);
@@ -93,7 +93,7 @@ static int qt2160_led_set(struct led_classdev *cdev,
* Changing this register will change the brightness
* of every LED in the qt2160. It's a HW limitation.
*/
- if (value != LED_OFF)
+ if (value != 0)
qt2160_write(client, QT2160_CMD_PWM_DUTY, value);
led->brightness = value;
@@ -269,7 +269,7 @@ static int qt2160_register_leds(struct qt2160_data *qt2160)
snprintf(led->name, sizeof(led->name), "qt2160:x%d", i);
led->cdev.name = led->name;
led->cdev.brightness_set_blocking = qt2160_led_set;
- led->cdev.brightness = LED_OFF;
+ led->cdev.brightness = 0;
led->id = i;
led->qt2160 = qt2160;
@@ -91,7 +91,7 @@ static int tm2_touchkey_led_brightness_set(struct led_classdev *led_dev,
u32 volt;
u8 data;
- if (brightness == LED_OFF) {
+ if (brightness == 0) {
volt = TM2_TOUCHKEY_LED_VOLTAGE_MIN;
data = touchkey->variant->cmd_led_off;
} else {
@@ -173,9 +173,9 @@ static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid)
if (touchkey->variant->fixed_regulator &&
data & TM2_TOUCHKEY_BIT_PRESS_EV) {
/* touch turns backlight on, so make sure we're in sync */
- if (touchkey->led_dev.brightness == LED_OFF)
+ if (touchkey->led_dev.brightness == 0)
tm2_touchkey_led_brightness_set(&touchkey->led_dev,
- LED_OFF);
+ 0);
}
return IRQ_HANDLED;
@@ -280,8 +280,8 @@ static int tm2_touchkey_probe(struct i2c_client *client,
/* led device */
touchkey->led_dev.name = TM2_TOUCHKEY_DEV_NAME;
- touchkey->led_dev.brightness = LED_ON;
- touchkey->led_dev.max_brightness = LED_ON;
+ touchkey->led_dev.brightness = 1;
+ touchkey->led_dev.max_brightness = 1;
touchkey->led_dev.brightness_set_blocking =
tm2_touchkey_led_brightness_set;
@@ -293,7 +293,7 @@ static int tm2_touchkey_probe(struct i2c_client *client,
}
if (touchkey->variant->fixed_regulator)
- tm2_touchkey_led_brightness_set(&touchkey->led_dev, LED_ON);
+ tm2_touchkey_led_brightness_set(&touchkey->led_dev, 1);
return 0;
}