From 6ee567902c0d155eedcfd279c39eb7b0d1e0199d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 30 Jun 2003 23:30:15 -0700 Subject: [PATCH] USB: make struct usb_bus a struct class_device This creates sys/class/usb_host/ which lists all usb hosts in the system. --- include/linux/usb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/usb.h b/include/linux/usb.h index 735735d663d6..b5eec5fc1d09 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -207,8 +207,10 @@ struct usb_bus { struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ struct dentry *usbdevfs_dentry; /* usbdevfs dentry entry for the bus */ - atomic_t refcnt; + struct class_device class_dev; /* class device for this bus */ + void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */ }; +#define to_usb_bus(d) container_of(d, struct usb_bus, class_dev) /* -------------------------------------------------------------------------- */ -- cgit v1.2.3