linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] usb: ohci-at91: Use dynamic device name for OHCI HCD creation
@ 2025-06-16  6:18 Mihai Sain
  2025-06-16 14:22 ` Alan Stern
  0 siblings, 1 reply; 2+ messages in thread
From: Mihai Sain @ 2025-06-16  6:18 UTC (permalink / raw)
  To: stern, gregkh, nicolas.ferre, alexandre.belloni, claudiu.beznea,
	linux-usb, linux-arm-kernel, linux-kernel
  Cc: Mihai Sain

Use the dynamic device name instead of the hardcoded string "at91"
when creating the OHCI host controller driver.
This ensures that the device name is more flexible
and correctly reflects the actual device in the system.
This will be in sync with ehci at91 driver.

Before this patch:

[root@sam9x75eb ~]$ dmesg | grep usb
[    1.464487] usb usb1: Manufacturer: Linux 6.16.0-rc2 ehci_hcd
[    1.470210] usb usb1: SerialNumber: 700000.usb-ehci
[    1.595683] usb usb2: Manufacturer: Linux 6.16.0-rc2 ohci_hcd
[    1.601406] usb usb2: SerialNumber: at91

After this patch:

[root@sam9x75eb ~]$ dmesg | grep usb
[    1.464487] usb usb1: Manufacturer: Linux 6.16.0-rc2 ehci_hcd
[    1.470210] usb usb1: SerialNumber: 700000.usb-ehci
[    1.595683] usb usb2: Manufacturer: Linux 6.16.0-rc2 ohci_hcd
[    1.601406] usb usb2: SerialNumber: 600000.usb-ohci

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
 drivers/usb/host/ohci-at91.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 5df793dcb25d..12fdb18934cf 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -193,7 +193,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
 	if (irq < 0)
 		return irq;
 
-	hcd = usb_create_hcd(driver, dev, "at91");
+	hcd = usb_create_hcd(driver, dev, dev_name(dev));
 	if (!hcd)
 		return -ENOMEM;
 	ohci_at91 = hcd_to_ohci_at91_priv(hcd);

base-commit: e04c78d86a9699d136910cfc0bdcf01087e3267e
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] usb: ohci-at91: Use dynamic device name for OHCI HCD creation
  2025-06-16  6:18 [PATCH v2] usb: ohci-at91: Use dynamic device name for OHCI HCD creation Mihai Sain
@ 2025-06-16 14:22 ` Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2025-06-16 14:22 UTC (permalink / raw)
  To: Mihai Sain
  Cc: gregkh, nicolas.ferre, alexandre.belloni, claudiu.beznea,
	linux-usb, linux-arm-kernel, linux-kernel

On Mon, Jun 16, 2025 at 09:18:00AM +0300, Mihai Sain wrote:
> Use the dynamic device name instead of the hardcoded string "at91"
> when creating the OHCI host controller driver.
> This ensures that the device name is more flexible
> and correctly reflects the actual device in the system.
> This will be in sync with ehci at91 driver.
> 
> Before this patch:
> 
> [root@sam9x75eb ~]$ dmesg | grep usb
> [    1.464487] usb usb1: Manufacturer: Linux 6.16.0-rc2 ehci_hcd
> [    1.470210] usb usb1: SerialNumber: 700000.usb-ehci
> [    1.595683] usb usb2: Manufacturer: Linux 6.16.0-rc2 ohci_hcd
> [    1.601406] usb usb2: SerialNumber: at91
> 
> After this patch:
> 
> [root@sam9x75eb ~]$ dmesg | grep usb
> [    1.464487] usb usb1: Manufacturer: Linux 6.16.0-rc2 ehci_hcd
> [    1.470210] usb usb1: SerialNumber: 700000.usb-ehci
> [    1.595683] usb usb2: Manufacturer: Linux 6.16.0-rc2 ohci_hcd
> [    1.601406] usb usb2: SerialNumber: 600000.usb-ohci
> 
> Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
> ---

Acked-by: Alan Stern <stern@rowland.harvard.edu>

>  drivers/usb/host/ohci-at91.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
> index 5df793dcb25d..12fdb18934cf 100644
> --- a/drivers/usb/host/ohci-at91.c
> +++ b/drivers/usb/host/ohci-at91.c
> @@ -193,7 +193,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
>  	if (irq < 0)
>  		return irq;
>  
> -	hcd = usb_create_hcd(driver, dev, "at91");
> +	hcd = usb_create_hcd(driver, dev, dev_name(dev));
>  	if (!hcd)
>  		return -ENOMEM;
>  	ohci_at91 = hcd_to_ohci_at91_priv(hcd);
> 
> base-commit: e04c78d86a9699d136910cfc0bdcf01087e3267e
> -- 
> 2.49.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-16 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16  6:18 [PATCH v2] usb: ohci-at91: Use dynamic device name for OHCI HCD creation Mihai Sain
2025-06-16 14:22 ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).