diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-07-17 12:30:17 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:24 -0400 |
commit | 5e215169f466e48561e40d1fa142f02e0e44a3d0 (patch) | |
tree | e738f130f9a4559417a87cd58e6b68c0ca4af0c2 | |
parent | cc0f555d511a5fe9d4519334c8f674a1dbab9e3a (diff) |
iwlwifi: make led functions generic
Led functions are generic for all the devices except 3945, so remove the
reference to 4965
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index 5e64252f80f6..36d88a045043 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
@@ -104,7 +104,7 @@ static int iwl_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | /* Set led pattern command */ | 106 | /* Set led pattern command */ |
107 | static int iwl4965_led_pattern(struct iwl_priv *priv, int led_id, | 107 | static int iwl_led_pattern(struct iwl_priv *priv, int led_id, |
108 | unsigned int idx) | 108 | unsigned int idx) |
109 | { | 109 | { |
110 | struct iwl_led_cmd led_cmd = { | 110 | struct iwl_led_cmd led_cmd = { |
@@ -121,7 +121,7 @@ static int iwl4965_led_pattern(struct iwl_priv *priv, int led_id, | |||
121 | } | 121 | } |
122 | 122 | ||
123 | /* Set led register off */ | 123 | /* Set led register off */ |
124 | static int iwl4965_led_on_reg(struct iwl_priv *priv, int led_id) | 124 | static int iwl_led_on_reg(struct iwl_priv *priv, int led_id) |
125 | { | 125 | { |
126 | IWL_DEBUG_LED(priv, "led on %d\n", led_id); | 126 | IWL_DEBUG_LED(priv, "led on %d\n", led_id); |
127 | iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_ON); | 127 | iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_ON); |
@@ -130,7 +130,7 @@ static int iwl4965_led_on_reg(struct iwl_priv *priv, int led_id) | |||
130 | 130 | ||
131 | #if 0 | 131 | #if 0 |
132 | /* Set led on command */ | 132 | /* Set led on command */ |
133 | static int iwl4965_led_on(struct iwl_priv *priv, int led_id) | 133 | static int iwl_led_on(struct iwl_priv *priv, int led_id) |
134 | { | 134 | { |
135 | struct iwl_led_cmd led_cmd = { | 135 | struct iwl_led_cmd led_cmd = { |
136 | .id = led_id, | 136 | .id = led_id, |
@@ -142,7 +142,7 @@ static int iwl4965_led_on(struct iwl_priv *priv, int led_id) | |||
142 | } | 142 | } |
143 | 143 | ||
144 | /* Set led off command */ | 144 | /* Set led off command */ |
145 | int iwl4965_led_off(struct iwl_priv *priv, int led_id) | 145 | int iwl_led_off(struct iwl_priv *priv, int led_id) |
146 | { | 146 | { |
147 | struct iwl_led_cmd led_cmd = { | 147 | struct iwl_led_cmd led_cmd = { |
148 | .id = led_id, | 148 | .id = led_id, |
@@ -157,7 +157,7 @@ int iwl4965_led_off(struct iwl_priv *priv, int led_id) | |||
157 | 157 | ||
158 | 158 | ||
159 | /* Set led register off */ | 159 | /* Set led register off */ |
160 | static int iwl4965_led_off_reg(struct iwl_priv *priv, int led_id) | 160 | static int iwl_led_off_reg(struct iwl_priv *priv, int led_id) |
161 | { | 161 | { |
162 | IWL_DEBUG_LED(priv, "LED Reg off\n"); | 162 | IWL_DEBUG_LED(priv, "LED Reg off\n"); |
163 | iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_OFF); | 163 | iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_OFF); |
@@ -171,7 +171,7 @@ static int iwl_led_associate(struct iwl_priv *priv, int led_id) | |||
171 | { | 171 | { |
172 | IWL_DEBUG_LED(priv, "Associated\n"); | 172 | IWL_DEBUG_LED(priv, "Associated\n"); |
173 | priv->allow_blinking = 1; | 173 | priv->allow_blinking = 1; |
174 | return iwl4965_led_on_reg(priv, led_id); | 174 | return iwl_led_on_reg(priv, led_id); |
175 | } | 175 | } |
176 | static int iwl_led_disassociate(struct iwl_priv *priv, int led_id) | 176 | static int iwl_led_disassociate(struct iwl_priv *priv, int led_id) |
177 | { | 177 | { |
@@ -314,7 +314,7 @@ void iwl_leds_background(struct iwl_priv *priv) | |||
314 | priv->last_blink_time = 0; | 314 | priv->last_blink_time = 0; |
315 | if (priv->last_blink_rate != IWL_SOLID_BLINK_IDX) { | 315 | if (priv->last_blink_rate != IWL_SOLID_BLINK_IDX) { |
316 | priv->last_blink_rate = IWL_SOLID_BLINK_IDX; | 316 | priv->last_blink_rate = IWL_SOLID_BLINK_IDX; |
317 | iwl4965_led_pattern(priv, IWL_LED_LINK, | 317 | iwl_led_pattern(priv, IWL_LED_LINK, |
318 | IWL_SOLID_BLINK_IDX); | 318 | IWL_SOLID_BLINK_IDX); |
319 | } | 319 | } |
320 | return; | 320 | return; |
@@ -328,7 +328,7 @@ void iwl_leds_background(struct iwl_priv *priv) | |||
328 | 328 | ||
329 | /* call only if blink rate change */ | 329 | /* call only if blink rate change */ |
330 | if (blink_idx != priv->last_blink_rate) | 330 | if (blink_idx != priv->last_blink_rate) |
331 | iwl4965_led_pattern(priv, IWL_LED_LINK, blink_idx); | 331 | iwl_led_pattern(priv, IWL_LED_LINK, blink_idx); |
332 | 332 | ||
333 | priv->last_blink_time = jiffies; | 333 | priv->last_blink_time = jiffies; |
334 | priv->last_blink_rate = blink_idx; | 334 | priv->last_blink_rate = blink_idx; |
@@ -351,8 +351,8 @@ int iwl_leds_register(struct iwl_priv *priv) | |||
351 | sizeof(priv->led[IWL_LED_TRG_RADIO].name), "iwl-%s::radio", | 351 | sizeof(priv->led[IWL_LED_TRG_RADIO].name), "iwl-%s::radio", |
352 | wiphy_name(priv->hw->wiphy)); | 352 | wiphy_name(priv->hw->wiphy)); |
353 | 353 | ||
354 | priv->led[IWL_LED_TRG_RADIO].led_on = iwl4965_led_on_reg; | 354 | priv->led[IWL_LED_TRG_RADIO].led_on = iwl_led_on_reg; |
355 | priv->led[IWL_LED_TRG_RADIO].led_off = iwl4965_led_off_reg; | 355 | priv->led[IWL_LED_TRG_RADIO].led_off = iwl_led_off_reg; |
356 | priv->led[IWL_LED_TRG_RADIO].led_pattern = NULL; | 356 | priv->led[IWL_LED_TRG_RADIO].led_pattern = NULL; |
357 | 357 | ||
358 | ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_RADIO], | 358 | ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_RADIO], |
@@ -386,7 +386,7 @@ int iwl_leds_register(struct iwl_priv *priv) | |||
386 | 386 | ||
387 | priv->led[IWL_LED_TRG_RX].led_on = iwl_led_associated; | 387 | priv->led[IWL_LED_TRG_RX].led_on = iwl_led_associated; |
388 | priv->led[IWL_LED_TRG_RX].led_off = iwl_led_associated; | 388 | priv->led[IWL_LED_TRG_RX].led_off = iwl_led_associated; |
389 | priv->led[IWL_LED_TRG_RX].led_pattern = iwl4965_led_pattern; | 389 | priv->led[IWL_LED_TRG_RX].led_pattern = iwl_led_pattern; |
390 | 390 | ||
391 | if (ret) | 391 | if (ret) |
392 | goto exit_fail; | 392 | goto exit_fail; |
@@ -401,7 +401,7 @@ int iwl_leds_register(struct iwl_priv *priv) | |||
401 | 401 | ||
402 | priv->led[IWL_LED_TRG_TX].led_on = iwl_led_associated; | 402 | priv->led[IWL_LED_TRG_TX].led_on = iwl_led_associated; |
403 | priv->led[IWL_LED_TRG_TX].led_off = iwl_led_associated; | 403 | priv->led[IWL_LED_TRG_TX].led_off = iwl_led_associated; |
404 | priv->led[IWL_LED_TRG_TX].led_pattern = iwl4965_led_pattern; | 404 | priv->led[IWL_LED_TRG_TX].led_pattern = iwl_led_pattern; |
405 | 405 | ||
406 | if (ret) | 406 | if (ret) |
407 | goto exit_fail; | 407 | goto exit_fail; |