Skip to content

Commit

Permalink
[PATCH] better USB_MON dependencies
Browse files Browse the repository at this point in the history
This makes the USB_MON less confusing.

Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AdrianBunk authored and Linus Torvalds committed Jun 23, 2005
1 parent 24665cd commit 4749f32
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/core/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,7 @@ EXPORT_SYMBOL (usb_remove_hcd);

/*-------------------------------------------------------------------------*/

#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
#if defined(CONFIG_USB_MON)

struct usb_mon_operations *mon_ops;

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/core/hcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ static inline void usbfs_cleanup(void) { }

/*-------------------------------------------------------------------------*/

#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
#if defined(CONFIG_USB_MON)

struct usb_mon_operations {
void (*urb_submit)(struct usb_bus *bus, struct urb *urb);
Expand Down
13 changes: 4 additions & 9 deletions drivers/usb/mon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
# USB Monitor configuration
#

# In normal life, it makes little sense to have usbmon as a module, and in fact
# it is harmful, because there is no way to autoload the module.
# The 'm' option is allowed for hackers who debug the usbmon itself,
# and for those who have usbcore as a module.
config USB_MON
tristate "USB Monitor"
depends on USB
bool "USB Monitor"
depends on USB!=n
default y
help
If you say Y here, a component which captures the USB traffic
Expand All @@ -17,6 +13,5 @@ config USB_MON
Harding's USBMon.

This is somewhat experimental at this time, but it should be safe,
as long as you aren't building this as a module and then removing it.

If unsure, say Y. Do not say M.
as long as you aren't using modular USB and try to remove this
module.
2 changes: 1 addition & 1 deletion drivers/usb/mon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

usbmon-objs := mon_main.o mon_stat.o mon_text.o

obj-$(CONFIG_USB_MON) += usbmon.o
obj-$(CONFIG_USB) += usbmon.o
2 changes: 1 addition & 1 deletion include/linux/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ struct usb_bus {
struct class_device *class_dev; /* class device for this bus */
struct kref kref; /* handles reference counting this bus */
void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */
#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
#if defined(CONFIG_USB_MON)
struct mon_bus *mon_bus; /* non-null when associated */
int monitored; /* non-zero when monitored */
#endif
Expand Down

0 comments on commit 4749f32

Please sign in to comment.