aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_subr.c
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>1999-12-03 08:41:24 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>1999-12-03 08:41:24 +0000
commitfe0d408987b42b531420ff2de76d534dbe7ecee7 (patch)
tree6196b778a0e888c9c44157e090059018b00a3080 /sys/dev/usb/usb_subr.c
parentb06e7af6ddadc3933a558d3e3ab7c76125611445 (diff)
downloadsrc-fe0d408987b42b531420ff2de76d534dbe7ecee7.tar.gz
src-fe0d408987b42b531420ff2de76d534dbe7ecee7.zip
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
Notes
Notes: svn path=/head/; revision=54073
Diffstat (limited to 'sys/dev/usb/usb_subr.c')
-rw-r--r--sys/dev/usb/usb_subr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index 0aedc6238645..46c2e8b0ac99 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -747,7 +747,8 @@ usbd_probe_and_attach(parent, dev, port, addr)
* during probe and attach. Should be changed however.
*/
device_t bdev;
- bdev = device_add_child(parent, NULL, -1, &uaa);
+ bdev = device_add_child(parent, NULL, -1);
+ device_set_ivars(bdev, &uaa);
if (!bdev) {
printf("%s: Device creation failed\n", USBDEVNAME(dev->bus->bdev));
return (USBD_INVAL);
@@ -828,8 +829,9 @@ usbd_probe_and_attach(parent, dev, port, addr)
ifaces[i] = 0; /* consumed */
#if defined(__FreeBSD__)
- /* create another child for the next iface */
- bdev = device_add_child(parent, NULL, -1,&uaa);
+ /* create another device for the next iface */
+ bdev = device_add_child(parent, NULL, -1);
+ device_set_ivars(bdev, &uaa);
if (!bdev) {
printf("%s: Device creation failed\n",
USBDEVNAME(dev->bus->bdev));