aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 16:23:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 16:23:01 -0400
commitd9a807461fc8cc0d6ba589ea0730d139122af012 (patch)
tree9d8c7a044659d821748dd40718a22557c04e4299 /tools
parent3498d13b8090c0b0ef911409fbc503a7c4cca6ef (diff)
parent70c048a238c780c226eb4b115ebaa908cb3b34ec (diff)
Merge tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB changes from Greg Kroah-Hartman: "Here is the big USB pull request for 3.7-rc1 There are lots of gadget driver changes (including copying a bunch of files into the drivers/staging/ccg/ directory so that the other gadget drivers can be fixed up properly without breaking that driver), and we remove the old obsolete ub.c driver from the tree. There are also the usual XHCI set of updates, and other various driver changes and updates. We also are trying hard to remove the old dbg() macro, but the final bits of that removal will be coming in through the networking tree before we can delete it for good. All of these patches have been in the linux-next tree. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up several annoying - but fairly mindless - conflicts due to the termios structure having moved into the tty device, and often clashing with dbg -> dev_dbg conversion. * tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (339 commits) USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc USB: uas: fix gcc warning USB: uas: fix locking USB: Fix race condition when removing host controllers USB: uas: add locking USB: uas: fix abort USB: uas: remove aborted field, replace with status bit. USB: uas: fix task management USB: uas: keep track of command urbs xhci: Intel Panther Point BEI quirk. powerpc/usb: remove checking PHY_CLK_VALID for UTMI PHY USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support Revert "usb : Add sysfs files to control port power." USB: serial: remove vizzini driver usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems Increase XHCI suspend timeout to 16ms USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq USB: sierra_ms: don't keep unused variable fsl/usb: Add support for USB controller version 2.4 USB: qcaux: add Pantech vendor class match ...
Diffstat (limited to 'tools')
-rw-r--r--tools/usb/testusb.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/tools/usb/testusb.c b/tools/usb/testusb.c
index b0adb2710c02..68d0734b2081 100644
--- a/tools/usb/testusb.c
+++ b/tools/usb/testusb.c
@@ -253,9 +253,6 @@ static int find_testdev(const char *name, const struct stat *sb, int flag)
253 253
254 if (flag != FTW_F) 254 if (flag != FTW_F)
255 return 0; 255 return 0;
256 /* ignore /proc/bus/usb/{devices,drivers} */
257 if (strrchr(name, '/')[1] == 'd')
258 return 0;
259 256
260 fd = fopen(name, "rb"); 257 fd = fopen(name, "rb");
261 if (!fd) { 258 if (!fd) {
@@ -356,28 +353,8 @@ restart:
356 353
357static const char *usbfs_dir_find(void) 354static const char *usbfs_dir_find(void)
358{ 355{
359 static char usbfs_path_0[] = "/dev/usb/devices";
360 static char usbfs_path_1[] = "/proc/bus/usb/devices";
361 static char udev_usb_path[] = "/dev/bus/usb"; 356 static char udev_usb_path[] = "/dev/bus/usb";
362 357
363 static char *const usbfs_paths[] = {
364 usbfs_path_0, usbfs_path_1
365 };
366
367 static char *const *
368 end = usbfs_paths + sizeof usbfs_paths / sizeof *usbfs_paths;
369
370 char *const *it = usbfs_paths;
371 do {
372 int fd = open(*it, O_RDONLY);
373 close(fd);
374 if (fd >= 0) {
375 strrchr(*it, '/')[0] = '\0';
376 return *it;
377 }
378 } while (++it != end);
379
380 /* real device-nodes managed by udev */
381 if (access(udev_usb_path, F_OK) == 0) 358 if (access(udev_usb_path, F_OK) == 0)
382 return udev_usb_path; 359 return udev_usb_path;
383 360
@@ -489,7 +466,7 @@ usage:
489 goto usage; 466 goto usage;
490 if (!all && !device) { 467 if (!all && !device) {
491 fprintf (stderr, "must specify '-a' or '-D dev', " 468 fprintf (stderr, "must specify '-a' or '-D dev', "
492 "or DEVICE=/proc/bus/usb/BBB/DDD in env\n"); 469 "or DEVICE=/dev/bus/usb/BBB/DDD in env\n");
493 goto usage; 470 goto usage;
494 } 471 }
495 472