Return-path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:36804 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751210AbcFXMfB (ORCPT ); Fri, 24 Jun 2016 08:35:01 -0400 Received: by mail-wm0-f65.google.com with SMTP id c82so4612316wme.3 for ; Fri, 24 Jun 2016 05:35:00 -0700 (PDT) From: Martin Blumenstingl To: ath9k-devel@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org Cc: nbd@nbd.name, chunkeey@googlemail.com, mark.rutland@arm.com, robh+dt@kernel.org, arend.vanspriel@broadcom.com, Martin Blumenstingl Subject: [PATCH v3 2/3] ath9k: add a helper to get the string representation of ath_bus_type Date: Fri, 24 Jun 2016 14:34:29 +0200 Message-Id: <20160624123430.4097-3-martin.blumenstingl@googlemail.com> (sfid-20160624_143509_469375_F0C90486) In-Reply-To: <20160624123430.4097-1-martin.blumenstingl@googlemail.com> References: <20160624123430.4097-1-martin.blumenstingl@googlemail.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: Signed-off-by: Martin Blumenstingl --- this is a new patch which didn't exist in v2 yet, it prepares the new function ath_bus_type_to_string which will be used in patch #3 drivers/net/wireless/ath/ath.h | 2 ++ drivers/net/wireless/ath/main.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index da7a7c8..be0d292 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -327,4 +327,6 @@ static inline const char *ath_opmode_to_string(enum nl80211_iftype opmode) } #endif +const char *ath_bus_type_to_string(enum ath_bus_type bustype); + #endif /* ATH_H */ diff --git a/drivers/net/wireless/ath/main.c b/drivers/net/wireless/ath/main.c index 338d723..90427cb 100644 --- a/drivers/net/wireless/ath/main.c +++ b/drivers/net/wireless/ath/main.c @@ -90,3 +90,18 @@ void ath_printk(const char *level, const struct ath_common* common, va_end(args); } EXPORT_SYMBOL(ath_printk); + +const char *ath_bus_type_to_string(enum ath_bus_type bustype) +{ + switch (bustype) { + case ATH_PCI: + return "pci"; + case ATH_AHB: + return "ahb"; + case ATH_USB: + return "usb"; + default: + return "unknown"; + } +} +EXPORT_SYMBOL(ath_bus_type_to_string); -- 2.9.0