27 #include <linux/ctype.h>
35 struct usb_device *usb_dev;
40 if (
sscanf(buf,
"%u", &command) != 1)
44 usb_dev = to_usb_device(dev);
45 wusbhc = wusbhc_get_by_usb_dev(usb_dev);
50 port_idx = wusb_port_no_to_idx(usb_dev->portnum);
64 wusb_dev = wusb_dev_get_by_usb_dev(to_usb_device(dev));
69 wusb_dev_put(wusb_dev);
76 const char *buf,
size_t size)
79 struct usb_device *usb_dev;
80 struct wusbhc *wusbhc;
84 "%02hhx %02hhx %02hhx %02hhx "
85 "%02hhx %02hhx %02hhx %02hhx "
86 "%02hhx %02hhx %02hhx %02hhx "
87 "%02hhx %02hhx %02hhx %02hhx\n",
88 &ck.data[0] , &ck.data[1],
89 &ck.data[2] , &ck.data[3],
90 &ck.data[4] , &ck.data[5],
91 &ck.data[6] , &ck.data[7],
92 &ck.data[8] , &ck.data[9],
93 &ck.data[10], &ck.data[11],
94 &ck.data[12], &ck.data[13],
95 &ck.data[14], &ck.data[15]);
99 usb_dev = to_usb_device(dev);
100 wusbhc = wusbhc_get_by_usb_dev(usb_dev);
104 memset(&ck, 0,
sizeof(ck));
106 return result < 0 ? result :
size;
110 static struct attribute *wusb_dev_attrs[] = {
111 &dev_attr_wusb_disconnect.attr,
112 &dev_attr_wusb_cdid.attr,
113 &dev_attr_wusb_ck.attr,
119 .attrs = wusb_dev_attrs,
123 struct wusb_dev *wusb_dev)
126 &wusb_dev_attr_group);
127 struct device *dev = &usb_dev->dev;
129 dev_err(dev,
"Cannot register WUSB-dev attributes: %d\n",
136 struct usb_device *usb_dev = wusb_dev->
usb_dev;