Lines Matching refs:pdev_nr
63 static ssize_t status_show_vhci(int pdev_nr, char *out) in status_show_vhci() argument
65 struct platform_device *pdev = vhcis[pdev_nr].pdev; in status_show_vhci()
89 pdev_nr * VHCI_PORTS + i, vdev); in status_show_vhci()
98 pdev_nr * VHCI_PORTS + VHCI_HC_PORTS + i, vdev); in status_show_vhci()
107 static ssize_t status_show_not_ready(int pdev_nr, char *out) in status_show_not_ready() argument
114 (pdev_nr * VHCI_PORTS) + i, in status_show_not_ready()
122 (pdev_nr * VHCI_PORTS) + VHCI_HC_PORTS + i, in status_show_not_ready()
151 int pdev_nr; in status_show() local
156 pdev_nr = status_name_to_id(attr->attr.name); in status_show()
157 if (pdev_nr < 0) in status_show()
158 out += status_show_not_ready(pdev_nr, out); in status_show()
160 out += status_show_vhci(pdev_nr, out); in status_show()
216 static int valid_port(__u32 *pdev_nr, __u32 *rhport) in valid_port() argument
218 if (*pdev_nr >= vhci_num_controllers) { in valid_port()
219 pr_err("pdev %u\n", *pdev_nr); in valid_port()
222 *pdev_nr = array_index_nospec(*pdev_nr, vhci_num_controllers); in valid_port()
236 __u32 port = 0, pdev_nr = 0, rhport = 0; in detach_store() local
244 pdev_nr = port_to_pdev_nr(port); in detach_store()
247 if (!valid_port(&pdev_nr, &rhport)) in detach_store()
250 hcd = platform_get_drvdata(vhcis[pdev_nr].pdev); in detach_store()
273 static int valid_args(__u32 *pdev_nr, __u32 *rhport, in valid_args() argument
276 if (!valid_port(pdev_nr, rhport)) { in valid_args()
313 __u32 port = 0, pdev_nr = 0, rhport = 0, devid = 0, speed = 0; in attach_store() local
331 pdev_nr = port_to_pdev_nr(port); in attach_store()
335 port, pdev_nr, rhport); in attach_store()
340 if (!valid_args(&pdev_nr, &rhport, speed)) in attach_store()
343 hcd = platform_get_drvdata(vhcis[pdev_nr].pdev); in attach_store()
416 pdev_nr, rhport, sockfd); in attach_store()