iwlwifi: Don't use buffer allocated on the stack for led names
authorSven Wegener <sven.wegener@stealer.net>
Fri, 1 Aug 2008 19:57:16 +0000 (21:57 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 Aug 2008 19:09:11 +0000 (15:09 -0400)
commit5cbbb376d65ed181ed290cea505ba37a0425ee25
treecd4f4f596032cbbf996e6d2ae660bdeecadd38b3
parent4fc22b21b3fcb3580c32b70605ef114178f8e611
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>
drivers/net/wireless/iwlwifi/iwl-3945-led.c
drivers/net/wireless/iwlwifi/iwl-3945-led.h
drivers/net/wireless/iwlwifi/iwl-led.c
drivers/net/wireless/iwlwifi/iwl-led.h