diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-05 22:37:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-05 22:37:42 -0400 |
commit | e63e03273b89f7248baa56cf242474f661e776e1 (patch) | |
tree | 7e0a000ed3b252849b9002306ba479074c165330 /drivers/net/wireless/iwlwifi/iwl-3945-led.c | |
parent | 37193fb4639fa94f91cbbab1e8aca596300e1d94 (diff) | |
parent | ffb208479bd62ab26c29a242faeb1de1c6d5fcdc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (78 commits)
AX.25: Fix sysctl registration if !CONFIG_AX25_DAMA_SLAVE
pktgen: mac count
pktgen: random flow
bridge: Eliminate unnecessary forward delay
bridge: fix compile warning in net/bridge/br_netfilter.c
ipv4: remove unused field in struct flowi (include/net/flow.h).
tg3: Fix 'scheduling while atomic' errors
net: Kill plain NET_XMIT_BYPASS.
net_sched: Add qdisc __NET_XMIT_BYPASS flag
net_sched: Add qdisc __NET_XMIT_STOLEN flag
iwl3945: fix merge mistake for packet injection
iwlwifi: grap nic access before accessing periphery registers
iwlwifi: decrement rx skb counter in scan abort handler
iwlwifi: fix unhandled interrupt when HW rfkill is on
iwlwifi: implement iwl5000_calc_rssi
iwlwifi: memory allocation optimization
iwlwifi: HW bug fixes
p54: Fix potential concurrent access to private data
rt2x00: Disable link tuning in rt2500usb
iwlwifi: Don't use buffer allocated on the stack for led names
...
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-led.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-led.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.c b/drivers/net/wireless/iwlwifi/iwl-3945-led.c index 6be1fe13fa57..d3336966b6b5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.c | |||
@@ -206,12 +206,12 @@ static void iwl3945_led_brightness_set(struct led_classdev *led_cdev, | |||
206 | static int iwl3945_led_register_led(struct iwl3945_priv *priv, | 206 | static int iwl3945_led_register_led(struct iwl3945_priv *priv, |
207 | struct iwl3945_led *led, | 207 | struct iwl3945_led *led, |
208 | enum led_type type, u8 set_led, | 208 | enum led_type type, u8 set_led, |
209 | const char *name, char *trigger) | 209 | char *trigger) |
210 | { | 210 | { |
211 | struct device *device = wiphy_dev(priv->hw->wiphy); | 211 | struct device *device = wiphy_dev(priv->hw->wiphy); |
212 | int ret; | 212 | int ret; |
213 | 213 | ||
214 | led->led_dev.name = name; | 214 | led->led_dev.name = led->name; |
215 | led->led_dev.brightness_set = iwl3945_led_brightness_set; | 215 | led->led_dev.brightness_set = iwl3945_led_brightness_set; |
216 | led->led_dev.default_trigger = trigger; | 216 | led->led_dev.default_trigger = trigger; |
217 | 217 | ||
@@ -308,7 +308,6 @@ void iwl3945_led_background(struct iwl3945_priv *priv) | |||
308 | int iwl3945_led_register(struct iwl3945_priv *priv) | 308 | int iwl3945_led_register(struct iwl3945_priv *priv) |
309 | { | 309 | { |
310 | char *trigger; | 310 | char *trigger; |
311 | char name[32]; | ||
312 | int ret; | 311 | int ret; |
313 | 312 | ||
314 | priv->last_blink_rate = 0; | 313 | priv->last_blink_rate = 0; |
@@ -318,7 +317,8 @@ int iwl3945_led_register(struct iwl3945_priv *priv) | |||
318 | priv->allow_blinking = 0; | 317 | priv->allow_blinking = 0; |
319 | 318 | ||
320 | trigger = ieee80211_get_radio_led_name(priv->hw); | 319 | trigger = ieee80211_get_radio_led_name(priv->hw); |
321 | snprintf(name, sizeof(name), "iwl-%s:radio", | 320 | snprintf(priv->led[IWL_LED_TRG_RADIO].name, |
321 | sizeof(priv->led[IWL_LED_TRG_RADIO].name), "iwl-%s:radio", | ||
322 | wiphy_name(priv->hw->wiphy)); | 322 | wiphy_name(priv->hw->wiphy)); |
323 | 323 | ||
324 | priv->led[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on; | 324 | priv->led[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on; |
@@ -327,19 +327,20 @@ int iwl3945_led_register(struct iwl3945_priv *priv) | |||
327 | 327 | ||
328 | ret = iwl3945_led_register_led(priv, | 328 | ret = iwl3945_led_register_led(priv, |
329 | &priv->led[IWL_LED_TRG_RADIO], | 329 | &priv->led[IWL_LED_TRG_RADIO], |
330 | IWL_LED_TRG_RADIO, 1, | 330 | IWL_LED_TRG_RADIO, 1, trigger); |
331 | name, trigger); | 331 | |
332 | if (ret) | 332 | if (ret) |
333 | goto exit_fail; | 333 | goto exit_fail; |
334 | 334 | ||
335 | trigger = ieee80211_get_assoc_led_name(priv->hw); | 335 | trigger = ieee80211_get_assoc_led_name(priv->hw); |
336 | snprintf(name, sizeof(name), "iwl-%s:assoc", | 336 | snprintf(priv->led[IWL_LED_TRG_ASSOC].name, |
337 | sizeof(priv->led[IWL_LED_TRG_ASSOC].name), "iwl-%s:assoc", | ||
337 | wiphy_name(priv->hw->wiphy)); | 338 | wiphy_name(priv->hw->wiphy)); |
338 | 339 | ||
339 | ret = iwl3945_led_register_led(priv, | 340 | ret = iwl3945_led_register_led(priv, |
340 | &priv->led[IWL_LED_TRG_ASSOC], | 341 | &priv->led[IWL_LED_TRG_ASSOC], |
341 | IWL_LED_TRG_ASSOC, 0, | 342 | IWL_LED_TRG_ASSOC, 0, trigger); |
342 | name, trigger); | 343 | |
343 | /* for assoc always turn led on */ | 344 | /* for assoc always turn led on */ |
344 | priv->led[IWL_LED_TRG_ASSOC].led_on = iwl3945_led_on; | 345 | priv->led[IWL_LED_TRG_ASSOC].led_on = iwl3945_led_on; |
345 | priv->led[IWL_LED_TRG_ASSOC].led_off = iwl3945_led_on; | 346 | priv->led[IWL_LED_TRG_ASSOC].led_off = iwl3945_led_on; |
@@ -349,14 +350,13 @@ int iwl3945_led_register(struct iwl3945_priv *priv) | |||
349 | goto exit_fail; | 350 | goto exit_fail; |
350 | 351 | ||
351 | trigger = ieee80211_get_rx_led_name(priv->hw); | 352 | trigger = ieee80211_get_rx_led_name(priv->hw); |
352 | snprintf(name, sizeof(name), "iwl-%s:RX", | 353 | snprintf(priv->led[IWL_LED_TRG_RX].name, |
354 | sizeof(priv->led[IWL_LED_TRG_RX].name), "iwl-%s:RX", | ||
353 | wiphy_name(priv->hw->wiphy)); | 355 | wiphy_name(priv->hw->wiphy)); |
354 | 356 | ||
355 | |||
356 | ret = iwl3945_led_register_led(priv, | 357 | ret = iwl3945_led_register_led(priv, |
357 | &priv->led[IWL_LED_TRG_RX], | 358 | &priv->led[IWL_LED_TRG_RX], |
358 | IWL_LED_TRG_RX, 0, | 359 | IWL_LED_TRG_RX, 0, trigger); |
359 | name, trigger); | ||
360 | 360 | ||
361 | priv->led[IWL_LED_TRG_RX].led_on = iwl3945_led_associated; | 361 | priv->led[IWL_LED_TRG_RX].led_on = iwl3945_led_associated; |
362 | priv->led[IWL_LED_TRG_RX].led_off = iwl3945_led_associated; | 362 | priv->led[IWL_LED_TRG_RX].led_off = iwl3945_led_associated; |
@@ -366,13 +366,14 @@ int iwl3945_led_register(struct iwl3945_priv *priv) | |||
366 | goto exit_fail; | 366 | goto exit_fail; |
367 | 367 | ||
368 | trigger = ieee80211_get_tx_led_name(priv->hw); | 368 | trigger = ieee80211_get_tx_led_name(priv->hw); |
369 | snprintf(name, sizeof(name), "iwl-%s:TX", | 369 | snprintf(priv->led[IWL_LED_TRG_TX].name, |
370 | sizeof(priv->led[IWL_LED_TRG_TX].name), "iwl-%s:TX", | ||
370 | wiphy_name(priv->hw->wiphy)); | 371 | wiphy_name(priv->hw->wiphy)); |
371 | 372 | ||
372 | ret = iwl3945_led_register_led(priv, | 373 | ret = iwl3945_led_register_led(priv, |
373 | &priv->led[IWL_LED_TRG_TX], | 374 | &priv->led[IWL_LED_TRG_TX], |
374 | IWL_LED_TRG_TX, 0, | 375 | IWL_LED_TRG_TX, 0, trigger); |
375 | name, trigger); | 376 | |
376 | priv->led[IWL_LED_TRG_TX].led_on = iwl3945_led_associated; | 377 | priv->led[IWL_LED_TRG_TX].led_on = iwl3945_led_associated; |
377 | priv->led[IWL_LED_TRG_TX].led_off = iwl3945_led_associated; | 378 | priv->led[IWL_LED_TRG_TX].led_off = iwl3945_led_associated; |
378 | priv->led[IWL_LED_TRG_TX].led_pattern = iwl3945_led_pattern; | 379 | priv->led[IWL_LED_TRG_TX].led_pattern = iwl3945_led_pattern; |