mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[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 <[email protected]>
This commit is contained in:
parent
ec1fdc24c2
commit
67a061a191
2 changed files with 15 additions and 12 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue