On Mon, 18 Dec 2006 22:42:25 +0100, Paolo Abeni <[EMAIL PROTECTED]> wrote:
> I have modified the usbmon patch as described in my previous mail. Now a > new device class is created: "usbmon". This class hold the sysfs entry > for usbmon devices. This entries are created dynamically when the usb > buses are registered, and destroyed accordingly. The whole thing > integrate nicely with udev, with the following rule: > > KERNEL=="usbmon[0-9]*", NAME="usbmon%n", MODE="0440",OWNER="root",GROUP="bin" OK, this is great. A couple of notes follow. > + dev = class_device_create(mon_bin_class, 0, > + mon_bin_dev0, 0, "usbmon0"); > + if (IS_ERR(dev)) { > + rc = PTR_ERR(dev); > + goto err_cdev; > + } .... > + class_device_destroy(mon_bin_class, mon_bin_dev0); But what is usbmon0 for? We do not have it implemented yet, so there's no reason to advertise it in the class. Or is there? > + mon_bin_class = class_create(THIS_MODULE, "usbmon"); > + if (!mon_bin_class) > + { > + rc = -ENOMEM; > + goto err_class; > + } I changed this to IS_ERR. -- Pete ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel