diff options
author | mdodd <mdodd@FreeBSD.org> | 1999-12-03 08:41:24 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 1999-12-03 08:41:24 +0000 |
commit | 87e31f4b90cff07f3812e55d1980e47ac53a3904 (patch) | |
tree | 45f3bb4d1df765c421992403379a9575229036d0 /sys/pccard | |
parent | d7c9e9ad5f8564f402794c5a8175fffea1a5376e (diff) | |
download | FreeBSD-src-87e31f4b90cff07f3812e55d1980e47ac53a3904.zip FreeBSD-src-87e31f4b90cff07f3812e55d1980e47ac53a3904.tar.gz |
Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered(). 'ivars' may now be set using the
device_set_ivars() function.
This makes it easier for us to change how arbitrary data structures are
associated with a device_t. Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.
Despite my best efforts I've probably forgotten something so let me know
if this breaks anything. I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.
Reviewed by: peter, dfr
Diffstat (limited to 'sys/pccard')
-rw-r--r-- | sys/pccard/pccard.c | 3 | ||||
-rw-r--r-- | sys/pccard/pcic.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 8eecad8..ec56bf5 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -366,8 +366,9 @@ allocate_driver(struct slot *slt, struct dev_desc *desc) bcopy(desc->misc, devi->misc, sizeof(desc->misc)); resource_list_init(&devi->resources); child = devi->isahd.id_device = device_add_child(pccarddev, devi->name, - desc->unit, devi); + desc->unit); device_set_flags(child, desc->flags); + device_set_ivars(child, devi); err = bus_set_resource(child, SYS_RES_IOPORT, 0, desc->iobase, desc->iosize); if (err) diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index 530601d..f4514a5 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -512,7 +512,7 @@ pcic_probe(device_t dev) pcictimeout_ch = timeout(pcictimeout, 0, hz/2); if (validslots) { for (i = 0; i < validslots; i++) { - device_add_child(dev, NULL, -1, NULL); + device_add_child(dev, NULL, -1); } } return(validslots ? 0 : ENXIO); |