@@ -204,7 +204,7 @@ static void rt2400pci_brightness_set(struct led_classdev *led_cdev,
{
struct rt2x00_led *led =
container_of(led_cdev, struct rt2x00_led, led_dev);
- unsigned int enabled = brightness != LED_OFF;
+ unsigned int enabled = brightness != 0;
u32 reg;
reg = rt2x00mmio_register_read(led->rt2x00dev, LEDCSR);
@@ -204,7 +204,7 @@ static void rt2500pci_brightness_set(struct led_classdev *led_cdev,
{
struct rt2x00_led *led =
container_of(led_cdev, struct rt2x00_led, led_dev);
- unsigned int enabled = brightness != LED_OFF;
+ unsigned int enabled = brightness != 0;
u32 reg;
reg = rt2x00mmio_register_read(led->rt2x00dev, LEDCSR);
@@ -267,7 +267,7 @@ static void rt2500usb_brightness_set(struct led_classdev *led_cdev,
{
struct rt2x00_led *led =
container_of(led_cdev, struct rt2x00_led, led_dev);
- unsigned int enabled = brightness != LED_OFF;
+ unsigned int enabled = brightness != 0;
u16 reg;
reg = rt2500usb_register_read(led->rt2x00dev, MAC_CSR20);
@@ -1521,7 +1521,7 @@ static void rt2800_brightness_set(struct led_classdev *led_cdev,
{
struct rt2x00_led *led =
container_of(led_cdev, struct rt2x00_led, led_dev);
- unsigned int enabled = brightness != LED_OFF;
+ unsigned int enabled = brightness != 0;
unsigned int bg_mode =
(enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ);
unsigned int polarity =
@@ -1570,7 +1570,7 @@ static void rt2800_brightness_set(struct led_classdev *led_cdev,
* (1 << level) - 1
*/
rt2800_mcu_request(led->rt2x00dev, MCU_LED_STRENGTH, 0xff,
- (1 << brightness / (LED_FULL / 6)) - 1,
+ (1 << brightness / (255 / 6)) - 1,
polarity);
}
}
@@ -52,7 +52,7 @@ void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi)
* is going to calculate the value and might use it in a
* division.
*/
- brightness = ((LED_FULL / 6) * rssi) + 1;
+ brightness = ((255 / 6) * rssi) + 1;
if (brightness != led->led_dev.brightness) {
led->led_dev.brightness_set(&led->led_dev, brightness);
led->led_dev.brightness = brightness;
@@ -61,7 +61,7 @@ void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi)
static void rt2x00led_led_simple(struct rt2x00_led *led, bool enabled)
{
- unsigned int brightness = enabled ? LED_FULL : LED_OFF;
+ unsigned int brightness = enabled ? 255 : 0;
if (!(led->flags & LED_REGISTERED))
return;
@@ -96,7 +96,7 @@ static int rt2x00leds_register_led(struct rt2x00_dev *rt2x00dev,
int retval;
led->led_dev.name = name;
- led->led_dev.brightness = LED_OFF;
+ led->led_dev.brightness = 0;
retval = led_classdev_register(device, &led->led_dev);
if (retval) {
@@ -179,7 +179,7 @@ static void rt2x00leds_unregister_led(struct rt2x00_led *led)
* possible yet.
*/
if (!(led->led_dev.flags & LED_SUSPENDED))
- led->led_dev.brightness_set(&led->led_dev, LED_OFF);
+ led->led_dev.brightness_set(&led->led_dev, 0);
led->flags &= ~LED_REGISTERED;
}
@@ -199,8 +199,8 @@ static inline void rt2x00leds_suspend_led(struct rt2x00_led *led)
led_classdev_suspend(&led->led_dev);
/* This shouldn't be needed, but just to be safe */
- led->led_dev.brightness_set(&led->led_dev, LED_OFF);
- led->led_dev.brightness = LED_OFF;
+ led->led_dev.brightness_set(&led->led_dev, 0);
+ led->led_dev.brightness = 0;
}
void rt2x00leds_suspend(struct rt2x00_dev *rt2x00dev)
@@ -218,8 +218,8 @@ static inline void rt2x00leds_resume_led(struct rt2x00_led *led)
led_classdev_resume(&led->led_dev);
/* Device might have enabled the LEDS during resume */
- led->led_dev.brightness_set(&led->led_dev, LED_OFF);
- led->led_dev.brightness = LED_OFF;
+ led->led_dev.brightness_set(&led->led_dev, 0);
+ led->led_dev.brightness = 0;
}
void rt2x00leds_resume(struct rt2x00_dev *rt2x00dev)
@@ -242,7 +242,7 @@ static void rt61pci_brightness_set(struct led_classdev *led_cdev,
{
struct rt2x00_led *led =
container_of(led_cdev, struct rt2x00_led, led_dev);
- unsigned int enabled = brightness != LED_OFF;
+ unsigned int enabled = brightness != 0;
unsigned int a_mode =
(enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ);
unsigned int bg_mode =
@@ -271,7 +271,7 @@ static void rt61pci_brightness_set(struct led_classdev *led_cdev,
* argument into the matching level within that range.
*/
rt61pci_mcu_request(led->rt2x00dev, MCU_LED_STRENGTH, 0xff,
- brightness / (LED_FULL / 6), 0);
+ brightness / (255 / 6), 0);
}
}
@@ -187,7 +187,7 @@ static void rt73usb_brightness_set(struct led_classdev *led_cdev,
{
struct rt2x00_led *led =
container_of(led_cdev, struct rt2x00_led, led_dev);
- unsigned int enabled = brightness != LED_OFF;
+ unsigned int enabled = brightness != 0;
unsigned int a_mode =
(enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ);
unsigned int bg_mode =
@@ -216,7 +216,7 @@ static void rt73usb_brightness_set(struct led_classdev *led_cdev,
* argument into the matching level within that range.
*/
rt2x00usb_vendor_request_sw(led->rt2x00dev, USB_LED_CONTROL,
- brightness / (LED_FULL / 6),
+ brightness / (255 / 6),
led->rt2x00dev->led_mcu_reg,
REGISTER_TIMEOUT);
}