diff options
author | Sven Wegener <sven.wegener@stealer.net> | 2008-08-01 21:57:16 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-04 15:09:11 -0400 |
commit | 5cbbb376d65ed181ed290cea505ba37a0425ee25 (patch) | |
tree | cd4f4f596032cbbf996e6d2ae660bdeecadd38b3 /drivers/net/wireless/iwlwifi/iwl-3945-led.h | |
parent | 4fc22b21b3fcb3580c32b70605ef114178f8e611 (diff) | |
download | blackbird-op-linux-5cbbb376d65ed181ed290cea505ba37a0425ee25.tar.gz blackbird-op-linux-5cbbb376d65ed181ed290cea505ba37a0425ee25.zip |
iwlwifi: Don't use buffer allocated on the stack for led names
Having the buffer on the stack and even re-using it for all led devices is bad.
Not being able to resolve the name member of the led device structure to a
meaningful value leads to confusion during ad-hoc debugging and potential
breakage in the future, if we ever decide to access the name member outside of
the registration function. Move the buffer to our private per led device
structures so that it is accessible after registration.
A quick grep didn't yield any occurence of using the led device name parameter
outside of the led device registration function, so currently we should already
be safe for normal operation.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-led.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-led.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.h b/drivers/net/wireless/iwlwifi/iwl-3945-led.h index 47b7e0bac802..2fbd126c1347 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-led.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.h @@ -50,6 +50,7 @@ enum led_type { struct iwl3945_led { struct iwl3945_priv *priv; struct led_classdev led_dev; + char name[32]; int (*led_on) (struct iwl3945_priv *priv, int led_id); int (*led_off) (struct iwl3945_priv *priv, int led_id); |