aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_bus.c
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2010-09-04 17:28:29 +0000
committerAndriy Gapon <avg@FreeBSD.org>2010-09-04 17:28:29 +0000
commitef3b7ba04f6dcde4d2f4dc1f01ad5a8ec224ba7b (patch)
tree4aa22e26aa346ac95236fb14935f4b703e51d501 /sys/kern/subr_bus.c
parent3887319477b208035499054233c6be71321f6991 (diff)
downloadsrc-ef3b7ba04f6dcde4d2f4dc1f01ad5a8ec224ba7b.tar.gz
src-ef3b7ba04f6dcde4d2f4dc1f01ad5a8ec224ba7b.zip
struct device: widen type of flags and order fields to u_int
Also change int -> u_int for order parameter in device_add_child_ordered. There should not be any ABI change as struct device is private to subr_bus.c and the API change should be compatible. To do: change int -> u_int for order parameter of bus_add_child method and its implementations. The change should also be API compatible, but is a bit more churn. Suggested by: imp, jhb MFC after: 1 week
Notes
Notes: svn path=/head/; revision=212213
Diffstat (limited to 'sys/kern/subr_bus.c')
-rw-r--r--sys/kern/subr_bus.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 39398c4d1f26..8714b5f0c7ae 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -121,7 +121,7 @@ struct device {
int busy; /**< count of calls to device_busy() */
device_state_t state; /**< current device state */
uint32_t devflags; /**< api level flags for device_get_flags() */
- u_short flags; /**< internal device flags */
+ u_int flags; /**< internal device flags */
#define DF_ENABLED 1 /* device should be probed/attached */
#define DF_FIXEDCLASS 2 /* devclass specified at create time */
#define DF_WILDCARD 4 /* unit was originally wildcard */
@@ -130,8 +130,7 @@ struct device {
#define DF_DONENOMATCH 32 /* don't execute DEVICE_NOMATCH again */
#define DF_EXTERNALSOFTC 64 /* softc not allocated by us */
#define DF_REBID 128 /* Can rebid after attach */
- u_char order; /**< order from device_add_child_ordered() */
- u_char pad;
+ u_int order; /**< order from device_add_child_ordered() */
void *ivars; /**< instance variables */
void *softc; /**< current driver's variables */
@@ -1790,12 +1789,12 @@ device_add_child(device_t dev, const char *name, int unit)
* @returns the new device
*/
device_t
-device_add_child_ordered(device_t dev, int order, const char *name, int unit)
+device_add_child_ordered(device_t dev, u_int order, const char *name, int unit)
{
device_t child;
device_t place;
- PDEBUG(("%s at %s with order %d as unit %d",
+ PDEBUG(("%s at %s with order %u as unit %d",
name, DEVICENAME(dev), order, unit));
child = make_device(dev, name, unit);