···4040 * remote host.4141 */4242#define MAX_BUSID 164343-static char busid_table[MAX_BUSID][BUS_ID_SIZE];4343+#define BUSID_SIZE 204444+static char busid_table[MAX_BUSID][BUSID_SIZE];4445static spinlock_t busid_table_lock;454646474747-int match_busid(char *busid)4848+int match_busid(const char *busid)4849{4950 int i;5051···53525453 for (i = 0; i < MAX_BUSID; i++)5554 if (busid_table[i][0])5656- if (!strncmp(busid_table[i], busid, BUS_ID_SIZE)) {5555+ if (!strncmp(busid_table[i], busid, BUSID_SIZE)) {5756 /* already registerd */5857 spin_unlock(&busid_table_lock);5958 return 0;···93929493 for (i = 0; i < MAX_BUSID; i++)9594 if (!busid_table[i][0]) {9696- strncpy(busid_table[i], busid, BUS_ID_SIZE);9595+ strncpy(busid_table[i], busid, BUSID_SIZE);9796 spin_unlock(&busid_table_lock);9897 return 0;9998 }···110109 spin_lock(&busid_table_lock);111110112111 for (i = 0; i < MAX_BUSID; i++)113113- if (!strncmp(busid_table[i], busid, BUS_ID_SIZE)) {112112+ if (!strncmp(busid_table[i], busid, BUSID_SIZE)) {114113 /* found */115115- memset(busid_table[i], 0, BUS_ID_SIZE);114114+ memset(busid_table[i], 0, BUSID_SIZE);116115 spin_unlock(&busid_table_lock);117116 return 0;118117 }···126125 size_t count)127126{128127 int len;129129- char busid[BUS_ID_SIZE];128128+ char busid[BUSID_SIZE];130129131130 if (count < 5)132131 return -EINVAL;133132134133 /* strnlen() does not include \0 */135135- len = strnlen(buf + 4, BUS_ID_SIZE);134134+ len = strnlen(buf + 4, BUSID_SIZE);136135137136 /* busid needs to include \0 termination */138138- if (!(len < BUS_ID_SIZE))137137+ if (!(len < BUSID_SIZE))139138 return -EINVAL;140139141141- strncpy(busid, buf + 4, BUS_ID_SIZE);140140+ strncpy(busid, buf + 4, BUSID_SIZE);142141143142144143 if (!strncmp(buf, "add ", 4)) {
+2-2
drivers/staging/usbip/stub_rx.c
···157157 * A user may need to set a special configuration value before158158 * exporting the device.159159 */160160- uinfo("set_configuration (%d) to %s\n", config, urb->dev->dev.bus_id);160160+ uinfo("set_configuration (%d) to %s\n", config, dev_name(&urb->dev->dev));161161 uinfo("but, skip!\n");162162163163 return 0;···175175 value = le16_to_cpu(req->wValue);176176 index = le16_to_cpu(req->wIndex);177177178178- uinfo("reset_device (port %d) to %s\n", index, urb->dev->dev.bus_id);178178+ uinfo("reset_device (port %d) to %s\n", index, dev_name(&urb->dev->dev));179179180180 /* all interfaces should be owned by usbip driver, so just reset it. */181181 ret = usb_lock_device_for_reset(urb->dev, NULL);
+1-1
drivers/staging/usbip/vhci_hcd.c
···10911091 * Allocate and initialize hcd.10921092 * Our private data is also allocated automatically.10931093 */10941094- hcd = usb_create_hcd(&vhci_hc_driver, &pdev->dev, pdev->dev.bus_id);10941094+ hcd = usb_create_hcd(&vhci_hc_driver, &pdev->dev, dev_name(&pdev->dev));10951095 if (!hcd) {10961096 uerr("create hcd failed\n");10971097 return -ENOMEM;
+1-1
drivers/staging/usbip/vhci_sysfs.c
···6060 out += sprintf(out, "%03u %08x ",6161 vdev->speed, vdev->devid);6262 out += sprintf(out, "%16p ", vdev->ud.tcp_socket);6363- out += sprintf(out, "%s", vdev->udev->dev.bus_id);6363+ out += sprintf(out, "%s", dev_name(&vdev->udev->dev));64646565 } else6666 out += sprintf(out, "000 000 000 0000000000000000 0-0");