Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath9k: add a helper to get the string representation of ath_bus_type

This can be used when the ath_bus_type has to be presented in a log
message or firmware filename.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>

authored by

Martin Blumenstingl and committed by
Kalle Valo
b40ded2a fc383ffd

+13
+6
drivers/net/wireless/ath/ath.h
··· 327 327 } 328 328 #endif 329 329 330 + extern const char *ath_bus_type_strings[]; 331 + static inline const char *ath_bus_type_to_string(enum ath_bus_type bustype) 332 + { 333 + return ath_bus_type_strings[bustype]; 334 + } 335 + 330 336 #endif /* ATH_H */
+7
drivers/net/wireless/ath/main.c
··· 90 90 va_end(args); 91 91 } 92 92 EXPORT_SYMBOL(ath_printk); 93 + 94 + const char *ath_bus_type_strings[] = { 95 + [ATH_PCI] = "pci", 96 + [ATH_AHB] = "ahb", 97 + [ATH_USB] = "usb", 98 + }; 99 + EXPORT_SYMBOL(ath_bus_type_strings);