[PATCH 6/6] usb: gadget: Pass struct udevice to usb_add_gadget_udc()
Linus Walleij
linus.walleij at linaro.org
Sat Aug 31 00:44:04 CEST 2024
On Mon, Aug 26, 2024 at 4:39 PM Marek Vasut
<marek.vasut+renesas at mailbox.org> wrote:
> Almost every UDC driver already passes casted pointer to struct udevice
> usb_add_gadget_udc(), even if the behavior is not exactly correct. That
> struct udevice is at risk of being corrupted in case something modified
> it in the UDC core, which does not happen right now. Switch UDC core to
> use struct udevice outright and drop the casts.
>
> UX500 has to be updated slightly, as that is the last place which does
> correctly use private struct device instance.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
Yours,
Linus Walleij
More information about the U-Boot
mailing list