usb: renesas_usbhs: Use renesas_usbhs_platform_info on of_device_id.data
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tue, 25 Jun 2019 05:38:56 +0000 (14:38 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jun 2019 02:33:09 +0000 (10:33 +0800)
commit76eff170bb05e59218008a21df670cb7177110e4
treee2a0eb748d3e51e9689b243459354621549404e2
parentbe0a42a7d62605cfcabd8cbba6c104a80471cd94
usb: renesas_usbhs: Use renesas_usbhs_platform_info on of_device_id.data

In device tree environment, the previous code allocates
renesas_usbhs_platform_info by using devm_kzalloc() and then copies
usbhs_of_data to the allocated memory. This reason is some values
(e.g. .platform_callback.get_vbus) are overwritten by the driver,
but the of_device_id.data is "const". Now the driver doesn't have
such a code, so this patch uses renesas_usbhs_platform_info on
of_device_id.data.

Note that the previous code set the pdev->dev.platform_data pointer
even if device tree environment, but the value is not used. So,
this patch also remove such a code.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/renesas_usbhs/common.c
drivers/usb/renesas_usbhs/common.h
drivers/usb/renesas_usbhs/rcar2.c
drivers/usb/renesas_usbhs/rcar2.h
drivers/usb/renesas_usbhs/rcar3.c
drivers/usb/renesas_usbhs/rcar3.h
drivers/usb/renesas_usbhs/rza.c
drivers/usb/renesas_usbhs/rza.h
drivers/usb/renesas_usbhs/rza2.c