From 67a061a191017f984a1ef0ff73ae988b9b15f6d3 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Sun, 25 Jun 2006 16:58:57 +0000 Subject: [PARISC] Add os_id_to_string helper Add a helper to asm/pdc.h to translate OS_ID values to strings and use it in the pdc_stable driver. Signed-off-by: Kyle McMartin --- drivers/parisc/pdc_stable.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'drivers') diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 97b345858043..ea1b7a63598e 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c @@ -622,22 +622,12 @@ static ssize_t pdcs_osid_read(struct subsystem *entry, char *buf) { char *out = buf; - char *tmpstr = NULL; if (!entry || !buf) return -EINVAL; - switch (pdcs_osid) { - case 0x0000: tmpstr = "No OS"; break; - case 0x0001: tmpstr = "HP-UX"; break; - case 0x0002: tmpstr = "MPE-iX"; break; - case 0x0003: tmpstr = "OSF"; break; - case 0x0004: tmpstr = "HP-RT"; break; - case 0x0005: tmpstr = "Novell Netware"; break; - case 0x0006: tmpstr = "Linux"; break; - default: tmpstr = "Unknown"; break; - } - out += sprintf(out, "%s dependent data (0x%.4x)\n", tmpstr, pdcs_osid); + out += sprintf(out, "%s dependent data (0x%.4x)\n", + os_id_to_string(pdcs_osid), pdcs_osid); return out - buf; } -- cgit v1.2.2