summaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_msghandler.c
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2014-10-09 14:20:32 +0200
committerCorey Minyard <cminyard@mvista.com>2014-12-11 22:04:04 +0100
commit7e50387bceda4d5542e4ba87097f69071b425fe5 (patch)
tree383b6cf15706e747097288c01ee6566b82e2cbba /drivers/char/ipmi/ipmi_msghandler.c
parentipmi: Ignore SSIF in the PNP handling (diff)
downloadlinux-7e50387bceda4d5542e4ba87097f69071b425fe5.tar.xz
linux-7e50387bceda4d5542e4ba87097f69071b425fe5.zip
ipmi: Move the address source to string to ipmi-generic code
It was in the system interface driver, but is generic functionality. Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index f816211f062f..e5d7c0b6fe3d 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -474,6 +474,18 @@ static DEFINE_MUTEX(smi_watchers_mutex);
#define ipmi_get_stat(intf, stat) \
((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
+static char *addr_src_to_str[] = { "invalid", "hotmod", "hardcoded", "SPMI",
+ "ACPI", "SMBIOS", "PCI",
+ "device-tree", "default" };
+
+const char *ipmi_addr_src_to_str(enum ipmi_addr_src src)
+{
+ if (src > SI_DEFAULT)
+ src = 0; /* Invalid */
+ return addr_src_to_str[src];
+}
+EXPORT_SYMBOL(ipmi_addr_src_to_str);
+
static int is_lan_addr(struct ipmi_addr *addr)
{
return addr->addr_type == IPMI_LAN_ADDR_TYPE;