From ce7cd137fced114d49178b73d468b82096a107fb Mon Sep 17 00:00:00 2001 From: Pete Zaitcev Date: Thu, 3 May 2007 16:51:16 -0700 Subject: usbmon: Add class for binary interface Add a class which allows for an easier integration with udev. This code was originally written by Paolo Abeni, and arrived to my tree as a part of big patch to add binary API on December 18. As I understand, Paolo always meant the class to be a part of the whole thing. This is his udev rule to go along with the patch: KERNEL=="usbmon[0-9]*", NAME="usbmon%n", MODE="0440",OWNER="root",GROUP="bin" Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman --- drivers/usb/mon/usb_mon.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/usb/mon/usb_mon.h') diff --git a/drivers/usb/mon/usb_mon.h b/drivers/usb/mon/usb_mon.h index 13d63255283..f68ad6d99ad 100644 --- a/drivers/usb/mon/usb_mon.h +++ b/drivers/usb/mon/usb_mon.h @@ -20,9 +20,11 @@ struct mon_bus { struct usb_bus *u_bus; int text_inited; + int bin_inited; struct dentry *dent_s; /* Debugging file */ struct dentry *dent_t; /* Text interface file */ struct dentry *dent_u; /* Second text interface file */ + struct device *classdev; /* Device in usbmon class */ /* Ref */ int nreaders; /* Under mon_lock AND mbus->lock */ @@ -52,9 +54,10 @@ void mon_reader_del(struct mon_bus *mbus, struct mon_reader *r); struct mon_bus *mon_bus_lookup(unsigned int num); -int /*bool*/ mon_text_add(struct mon_bus *mbus, int busnum); +int /*bool*/ mon_text_add(struct mon_bus *mbus, const struct usb_bus *ubus); void mon_text_del(struct mon_bus *mbus); -// void mon_bin_add(struct mon_bus *); +int /*bool*/ mon_bin_add(struct mon_bus *mbus, const struct usb_bus *ubus); +void mon_bin_del(struct mon_bus *mbus); int __init mon_text_init(void); void mon_text_exit(void); -- cgit v1.2.3