aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle McMartin <kyle@parisc-linux.org>2006-06-21 19:27:29 +0000
committerKyle McMartin <kyle@hera.kernel.org>2006-06-27 23:28:42 +0000
commitec1fdc24c2ae012b078ba0187ceef208e08a3aec (patch)
treee615b4d1fe299ff835d9c21d6ae93214d22d67b3
parenta9d2d386c42b816a81eb1d02dfb7b502ba8cea82 (diff)
[PARISC] OS_ID_LINUX == 0x0006
We were assigned an OS_ID of 0x0006. Consistently use OS_ID_LINUX instead of using the magic number. Also update the OS_ID_ defines in asm/pdc.h to reflect this. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
-rw-r--r--arch/parisc/kernel/firmware.c4
-rw-r--r--arch/parisc/kernel/setup.c2
-rw-r--r--drivers/parisc/pdc_stable.c4
-rw-r--r--include/asm-parisc/pdc.h3
4 files changed, 7 insertions, 6 deletions
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c
index c80c277454f..4398d2a9578 100644
--- a/arch/parisc/kernel/firmware.c
+++ b/arch/parisc/kernel/firmware.c
@@ -407,7 +407,9 @@ int pdc_model_info(struct pdc_model *model)
* pdc_model_sysmodel - Get the system model name.
* @name: A char array of at least 81 characters.
*
- * Get system model name from PDC ROM (e.g. 9000/715 or 9000/778/B160L)
+ * Get system model name from PDC ROM (e.g. 9000/715 or 9000/778/B160L).
+ * Using OS_ID_HPUX will return the equivalent of the 'modelname' command
+ * on HP/UX.
*/
int pdc_model_sysmodel(char *name)
{
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index 8471486a756..278f4b9f6a3 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -303,7 +303,7 @@ extern void eisa_init(void);
static int __init parisc_init(void)
{
- u32 osid = (0x0006 << 16);
+ u32 osid = (OS_ID_LINUX << 16);
parisc_proc_mkdir();
parisc_init_resources();
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index a1094210cd1..97b34585804 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -884,7 +884,7 @@ pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count)
if (!entry || !buf || !count)
return -EINVAL;
- if (unlikely(pdcs_osid != 0x0006))
+ if (unlikely(pdcs_osid != OS_ID_LINUX))
return -EPERM;
if (count > 16)
@@ -926,7 +926,7 @@ pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count)
if (unlikely(pdcs_size <= 224))
return -ENOSYS;
- if (unlikely(pdcs_osid != 0x0006))
+ if (unlikely(pdcs_osid != OS_ID_LINUX))
return -EPERM;
size = pdcs_size - 224;
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h
index 3d3446ec207..33bff615d6e 100644
--- a/include/asm-parisc/pdc.h
+++ b/include/asm-parisc/pdc.h
@@ -278,12 +278,11 @@ typedef struct {
/* constants for OS (NVM...) */
#define OS_ID_NONE 0 /* Undefined OS ID */
#define OS_ID_HPUX 1 /* HP-UX OS */
-#define OS_ID_LINUX OS_ID_HPUX /* just use the same value as hpux */
#define OS_ID_MPEXL 2 /* MPE XL OS */
#define OS_ID_OSF 3 /* OSF OS */
#define OS_ID_HPRT 4 /* HP-RT OS */
#define OS_ID_NOVEL 5 /* NOVELL OS */
-#define OS_ID_NT 6 /* NT OS */
+#define OS_ID_LINUX 6 /* Linux */
/* constants for PDC_CHASSIS */