[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/28] chips/busses.h: use boolean instead of a char
From: |
Marin Ramesa |
Subject: |
[PATCH 01/28] chips/busses.h: use boolean instead of a char |
Date: |
Sun, 8 Dec 2013 12:40:03 +0100 |
A struct member which tracks if the device has been probed. It should
really be a boolean instead of a char.
* chips/busses.c (alive): Use boolean values.
* chips/busses.h (alive): Use boolean instead of a char.
* i386/i386at/autoconf.c (bus_device_init): Use boolean values in
initialization.
---
chips/busses.c | 6 +++---
chips/busses.h | 4 ++--
i386/i386at/autoconf.c | 12 ++++++------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/chips/busses.c b/chips/busses.c
index f9f6f1b..870358b 100644
--- a/chips/busses.c
+++ b/chips/busses.c
@@ -96,7 +96,7 @@ boolean_t configure_bus_master(
if ((*driver->probe) (virt, master) == 0)
return FALSE;
- master->alive = 1;
+ master->alive = TRUE;
master->adaptor = adpt_no;
/*
@@ -128,7 +128,7 @@ boolean_t configure_bus_master(
continue;
}
- device->alive = 1;
+ device->alive = TRUE;
device->adaptor = adpt_no;
device->ctlr = master->unit;
@@ -211,7 +211,7 @@ boolean_t configure_bus_device(
if ((*driver->probe) (virt, (struct bus_ctlr *)device) == 0)
return FALSE;
- device->alive = 1;
+ device->alive = TRUE;
device->adaptor = adpt_no;
printf("%s%d: at %s%d", device->name, device->unit, bus_name, adpt_no);
diff --git a/chips/busses.h b/chips/busses.h
index 49c0e44..982f7ad 100644
--- a/chips/busses.h
+++ b/chips/busses.h
@@ -78,7 +78,7 @@ struct bus_ctlr {
int am; /* address modifier */
vm_offset_t phys_address;/* device phys address */
char adaptor; /* slot where found */
- char alive; /* probed successfully */
+ boolean_t alive; /* probed successfully */
char flags; /* any special conditions */
vm_offset_t sysdep; /* On some systems, queue of
* operations in-progress */
@@ -98,7 +98,7 @@ struct bus_device {
int am; /* address modifier */
vm_offset_t phys_address;/* device phys address */
char adaptor;
- char alive;
+ boolean_t alive;
char ctlr;
char slave;
int flags;
diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c
index 31bb73c..93d6b99 100644
--- a/i386/i386at/autoconf.c
+++ b/i386/i386at/autoconf.c
@@ -62,21 +62,21 @@ struct bus_device bus_device_init[] = {
#if NCOM > 0
{&comdriver, "com", 0, comintr, 0x3f8, 8, 0x3f8,
- '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 4},
+ '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 4},
{&comdriver, "com", 1, comintr, 0x2f8, 8, 0x2f8,
- '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 3},
+ '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 3},
{&comdriver, "com", 2, comintr, 0x3e8, 8, 0x3e8,
- '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 5},
+ '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 5},
#endif /* NCOM > 0 */
#ifdef MACH_LPR
#if NLPR > 0
{&lprdriver, "lpr", 0, lprintr, 0x378, 3, 0x378,
- '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
+ '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 7},
{&lprdriver, "lpr", 0, lprintr, 0x278, 3, 0x278,
- '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
+ '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 7},
{&lprdriver, "lpr", 0, lprintr, 0x3bc, 3, 0x3bc,
- '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
+ '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 7},
#endif /* NLPR > 0 */
#endif /* MACH_LPR */
--
1.8.1.4
- [PATCH 01/28] chips/busses.h: use boolean instead of a char,
Marin Ramesa <=
[PATCH 05/28] i386/i386/db_interface.c: remove forward declaration, Marin Ramesa, 2013/12/08