[PATCH v2 06/16] usb: hub: Pass |struct usb_port*| to usb_port_is_power_on()

Bartosz Golaszewski brgl at kernel.org
Thu Jun 11 01:25:29 PDT 2026


On Wed, 10 Jun 2026 10:40:40 +0200, Chen-Yu Tsai <wenst at chromium.org> said:
> usb_port_is_power_on() currently takes |struct usb_hub*|, but only needs
> it to tell if the hub/port is SuperSpeed or not.
>
> In a subsequent change, usb_port_is_power_on() needs access to a pwrseq
> state tracking field in |struct usb_port|. Either structure can be used
> to identify whether a port/hub is SuperSpeed or not, as the field in
> |struct usb_port| is inherited from the hub:
>
>     port->is_superspeed = hub_is_superspeed(hub)
>
> Replace usb_port_is_power_on()'s |struct usb_hub*| parameter with
> |struct usb_port*| so a subsequent change can use it.
>
> Signed-off-by: Chen-Yu Tsai <wenst at chromium.org>
> ---

Makes sense.

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>



More information about the linux-arm-kernel mailing list