]> Git Repo - linux.git/blobdiff - drivers/usb/mon/mon_text.c
ixgbe: Look up MAC address in Open Firmware or IDPROM
[linux.git] / drivers / usb / mon / mon_text.c
index c302e1983c70dfa6fd911614b09664450b298b95..ad408251d9557c2504bd35dcd53ae416344bf08d 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/usb.h>
 #include <linux/slab.h>
 #include <linux/time.h>
+#include <linux/export.h>
 #include <linux/mutex.h>
 #include <linux/debugfs.h>
 #include <linux/scatterlist.h>
@@ -670,6 +671,9 @@ int mon_text_add(struct mon_bus *mbus, const struct usb_bus *ubus)
        int busnum = ubus? ubus->busnum: 0;
        int rc;
 
+       if (mon_dir == NULL)
+               return 0;
+
        if (ubus != NULL) {
                rc = snprintf(name, NAMESZ, "%dt", busnum);
                if (rc <= 0 || rc >= NAMESZ)
@@ -740,12 +744,12 @@ int __init mon_text_init(void)
 
        mondir = debugfs_create_dir("usbmon", usb_debug_root);
        if (IS_ERR(mondir)) {
-               printk(KERN_NOTICE TAG ": debugfs is not available\n");
-               return -ENODEV;
+               /* debugfs not available, but we can use usbmon without it */
+               return 0;
        }
        if (mondir == NULL) {
                printk(KERN_NOTICE TAG ": unable to create usbmon directory\n");
-               return -ENODEV;
+               return -ENOMEM;
        }
        mon_dir = mondir;
        return 0;
This page took 0.039851 seconds and 4 git commands to generate.