diff mbox series

[2/5] usb: chipidea: tegra: clean up tegra_udc flag code

Message ID 20191002014153.29831-3-pgwipeout@gmail.com
State Deferred
Headers show
Series enable tegra-udc host mode | expand

Commit Message

Peter Geis Oct. 2, 2019, 1:41 a.m. UTC
All Tegra devices handled by tegra-udc use the same flags.
Consolidate all the entries under one roof.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
---
 drivers/usb/chipidea/ci_hdrc_tegra.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

Comments

Thierry Reding Oct. 2, 2019, 11:09 a.m. UTC | #1
On Tue, Oct 01, 2019 at 09:41:50PM -0400, Peter Geis wrote:
> All Tegra devices handled by tegra-udc use the same flags.
> Consolidate all the entries under one roof.
> 
> Signed-off-by: Peter Geis <pgwipeout@gmail.com>
> ---
>  drivers/usb/chipidea/ci_hdrc_tegra.c | 22 +++++-----------------
>  1 file changed, 5 insertions(+), 17 deletions(-)

The idea was that these would need to be differentiated at some point,
but I guess they don't, so:

Acked-by: Thierry Reding <treding@nvidia.com>

> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
> index 12025358bb3c..0c9911d44ee5 100644
> --- a/drivers/usb/chipidea/ci_hdrc_tegra.c
> +++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
> @@ -24,35 +24,23 @@ struct tegra_udc_soc_info {
>  	unsigned long flags;
>  };
>  
> -static const struct tegra_udc_soc_info tegra20_udc_soc_info = {
> -	.flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
> -};
> -
> -static const struct tegra_udc_soc_info tegra30_udc_soc_info = {
> -	.flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
> -};
> -
> -static const struct tegra_udc_soc_info tegra114_udc_soc_info = {
> -	.flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
> -};
> -
> -static const struct tegra_udc_soc_info tegra124_udc_soc_info = {
> +static const struct tegra_udc_soc_info tegra_udc_soc_info = {
>  	.flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
>  };
>  
>  static const struct of_device_id tegra_udc_of_match[] = {
>  	{
>  		.compatible = "nvidia,tegra20-udc",
> -		.data = &tegra20_udc_soc_info,
> +		.data = &tegra_udc_soc_info,
>  	}, {
>  		.compatible = "nvidia,tegra30-udc",
> -		.data = &tegra30_udc_soc_info,
> +		.data = &tegra_udc_soc_info,
>  	}, {
>  		.compatible = "nvidia,tegra114-udc",
> -		.data = &tegra114_udc_soc_info,
> +		.data = &tegra_udc_soc_info,
>  	}, {
>  		.compatible = "nvidia,tegra124-udc",
> -		.data = &tegra124_udc_soc_info,
> +		.data = &tegra_udc_soc_info,
>  	}, {
>  		/* sentinel */
>  	}
> -- 
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
index 12025358bb3c..0c9911d44ee5 100644
--- a/drivers/usb/chipidea/ci_hdrc_tegra.c
+++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
@@ -24,35 +24,23 @@  struct tegra_udc_soc_info {
 	unsigned long flags;
 };
 
-static const struct tegra_udc_soc_info tegra20_udc_soc_info = {
-	.flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
-};
-
-static const struct tegra_udc_soc_info tegra30_udc_soc_info = {
-	.flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
-};
-
-static const struct tegra_udc_soc_info tegra114_udc_soc_info = {
-	.flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
-};
-
-static const struct tegra_udc_soc_info tegra124_udc_soc_info = {
+static const struct tegra_udc_soc_info tegra_udc_soc_info = {
 	.flags = CI_HDRC_REQUIRES_ALIGNED_DMA,
 };
 
 static const struct of_device_id tegra_udc_of_match[] = {
 	{
 		.compatible = "nvidia,tegra20-udc",
-		.data = &tegra20_udc_soc_info,
+		.data = &tegra_udc_soc_info,
 	}, {
 		.compatible = "nvidia,tegra30-udc",
-		.data = &tegra30_udc_soc_info,
+		.data = &tegra_udc_soc_info,
 	}, {
 		.compatible = "nvidia,tegra114-udc",
-		.data = &tegra114_udc_soc_info,
+		.data = &tegra_udc_soc_info,
 	}, {
 		.compatible = "nvidia,tegra124-udc",
-		.data = &tegra124_udc_soc_info,
+		.data = &tegra_udc_soc_info,
 	}, {
 		/* sentinel */
 	}