mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3-meson-g12a: constify drvdata structs
@ 2022-03-06 20:59 Heiner Kallweit
  2022-03-07  8:31 ` Neil Armstrong
  0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2022-03-06 20:59 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl
  Cc: Linux USB Mailing List, linux-arm-kernel, open list:ARM/Amlogic Meson...

Constify the drvdata structs. This also matches the definition of
member drvdata in dwc3_meson_g12a.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/usb/dwc3/dwc3-meson-g12a.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index bd814df3b..b282ad0e6 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -188,7 +188,7 @@ static int dwc3_meson_gxl_usb_post_init(struct dwc3_meson_g12a *priv);
  * reset to recover usage of the port.
  */
 
-static struct dwc3_meson_g12a_drvdata gxl_drvdata = {
+static const struct dwc3_meson_g12a_drvdata gxl_drvdata = {
 	.otg_switch_supported = true,
 	.otg_phy_host_port_disable = true,
 	.clks = meson_gxl_clocks,
@@ -202,7 +202,7 @@ static struct dwc3_meson_g12a_drvdata gxl_drvdata = {
 	.usb_post_init = dwc3_meson_gxl_usb_post_init,
 };
 
-static struct dwc3_meson_g12a_drvdata gxm_drvdata = {
+static const struct dwc3_meson_g12a_drvdata gxm_drvdata = {
 	.otg_switch_supported = true,
 	.otg_phy_host_port_disable = true,
 	.clks = meson_gxl_clocks,
@@ -216,7 +216,7 @@ static struct dwc3_meson_g12a_drvdata gxm_drvdata = {
 	.usb_post_init = dwc3_meson_gxl_usb_post_init,
 };
 
-static struct dwc3_meson_g12a_drvdata axg_drvdata = {
+static const struct dwc3_meson_g12a_drvdata axg_drvdata = {
 	.otg_switch_supported = true,
 	.clks = meson_gxl_clocks,
 	.num_clks = ARRAY_SIZE(meson_gxl_clocks),
@@ -229,7 +229,7 @@ static struct dwc3_meson_g12a_drvdata axg_drvdata = {
 	.usb_post_init = dwc3_meson_gxl_usb_post_init,
 };
 
-static struct dwc3_meson_g12a_drvdata g12a_drvdata = {
+static const struct dwc3_meson_g12a_drvdata g12a_drvdata = {
 	.otg_switch_supported = true,
 	.clks = meson_g12a_clocks,
 	.num_clks = ARRAY_SIZE(meson_g12a_clocks),
@@ -241,7 +241,7 @@ static struct dwc3_meson_g12a_drvdata g12a_drvdata = {
 	.usb_init = dwc3_meson_g12a_usb_init,
 };
 
-static struct dwc3_meson_g12a_drvdata a1_drvdata = {
+static const struct dwc3_meson_g12a_drvdata a1_drvdata = {
 	.otg_switch_supported = false,
 	.clks = meson_a1_clocks,
 	.num_clks = ARRAY_SIZE(meson_a1_clocks),
-- 
2.35.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH] usb: dwc3-meson-g12a: constify drvdata structs
  2022-03-06 20:59 [PATCH] usb: dwc3-meson-g12a: constify drvdata structs Heiner Kallweit
@ 2022-03-07  8:31 ` Neil Armstrong
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Armstrong @ 2022-03-07  8:31 UTC (permalink / raw)
  To: Heiner Kallweit, Felipe Balbi, Greg Kroah-Hartman, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl
  Cc: Linux USB Mailing List, linux-arm-kernel, open list:ARM/Amlogic Meson...

On 06/03/2022 21:59, Heiner Kallweit wrote:
> Constify the drvdata structs. This also matches the definition of
> member drvdata in dwc3_meson_g12a.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>   drivers/usb/dwc3/dwc3-meson-g12a.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
> index bd814df3b..b282ad0e6 100644
> --- a/drivers/usb/dwc3/dwc3-meson-g12a.c
> +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
> @@ -188,7 +188,7 @@ static int dwc3_meson_gxl_usb_post_init(struct dwc3_meson_g12a *priv);
>    * reset to recover usage of the port.
>    */
>   
> -static struct dwc3_meson_g12a_drvdata gxl_drvdata = {
> +static const struct dwc3_meson_g12a_drvdata gxl_drvdata = {
>   	.otg_switch_supported = true,
>   	.otg_phy_host_port_disable = true,
>   	.clks = meson_gxl_clocks,
> @@ -202,7 +202,7 @@ static struct dwc3_meson_g12a_drvdata gxl_drvdata = {
>   	.usb_post_init = dwc3_meson_gxl_usb_post_init,
>   };
>   
> -static struct dwc3_meson_g12a_drvdata gxm_drvdata = {
> +static const struct dwc3_meson_g12a_drvdata gxm_drvdata = {
>   	.otg_switch_supported = true,
>   	.otg_phy_host_port_disable = true,
>   	.clks = meson_gxl_clocks,
> @@ -216,7 +216,7 @@ static struct dwc3_meson_g12a_drvdata gxm_drvdata = {
>   	.usb_post_init = dwc3_meson_gxl_usb_post_init,
>   };
>   
> -static struct dwc3_meson_g12a_drvdata axg_drvdata = {
> +static const struct dwc3_meson_g12a_drvdata axg_drvdata = {
>   	.otg_switch_supported = true,
>   	.clks = meson_gxl_clocks,
>   	.num_clks = ARRAY_SIZE(meson_gxl_clocks),
> @@ -229,7 +229,7 @@ static struct dwc3_meson_g12a_drvdata axg_drvdata = {
>   	.usb_post_init = dwc3_meson_gxl_usb_post_init,
>   };
>   
> -static struct dwc3_meson_g12a_drvdata g12a_drvdata = {
> +static const struct dwc3_meson_g12a_drvdata g12a_drvdata = {
>   	.otg_switch_supported = true,
>   	.clks = meson_g12a_clocks,
>   	.num_clks = ARRAY_SIZE(meson_g12a_clocks),
> @@ -241,7 +241,7 @@ static struct dwc3_meson_g12a_drvdata g12a_drvdata = {
>   	.usb_init = dwc3_meson_g12a_usb_init,
>   };
>   
> -static struct dwc3_meson_g12a_drvdata a1_drvdata = {
> +static const struct dwc3_meson_g12a_drvdata a1_drvdata = {
>   	.otg_switch_supported = false,
>   	.clks = meson_a1_clocks,
>   	.num_clks = ARRAY_SIZE(meson_a1_clocks),

Looks good:

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2022-03-07  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-06 20:59 [PATCH] usb: dwc3-meson-g12a: constify drvdata structs Heiner Kallweit
2022-03-07  8:31 ` Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®