usb: renesas_usbhs: Avoid to write platform_data's value

The very old commit 482982062f ("usb: gadget: renesas_usbhs:
bugfix: don't modify platform data") changed to use copied whole
structures values to fix the "hung-up" issue. However, we also
can fix the issue if the driver copies the get_vbus function
pointer to the driver's value.

So, this patch adds get_vbus member into struct usbhs_mod_info and
use the pointer instead of struct renesas_usbhs_platform_callback.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Yoshihiro Shimoda
2019-06-25 14:38:48 +09:00
committed by Greg Kroah-Hartman
parent edcf2b2c66
commit ccc3264c24
4 changed files with 21 additions and 5 deletions

View File

@@ -915,8 +915,8 @@ static void usbhs_mod_phy_mode(struct usbhs_priv *priv)
{
struct usbhs_mod_info *info = &priv->mod_info;
info->irq_vbus = NULL;
priv->pfunc.get_vbus = usbhsm_phy_get_vbus;
info->irq_vbus = NULL;
info->get_vbus = usbhsm_phy_get_vbus;
usbhs_irq_callback_update(priv, NULL);
}