Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] usb: chipidea: tegra: clean up tegra_udc flag code
@ 2019-10-02 13:19 Peter Geis
  2019-10-09  8:18 ` Peter Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Geis @ 2019-10-02 13:19 UTC (permalink / raw)
  To: Peter Chen, Thierry Reding; +Cc: linux-tegra, linux-usb

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>

Acked-by: Thierry Reding <treding@nvidia.com>
---
 drivers/usb/chipidea/ci_hdrc_tegra.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

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


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

* Re: [PATCH] usb: chipidea: tegra: clean up tegra_udc flag code
  2019-10-02 13:19 [PATCH] usb: chipidea: tegra: clean up tegra_udc flag code Peter Geis
@ 2019-10-09  8:18 ` Peter Chen
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2019-10-09  8:18 UTC (permalink / raw)
  To: Peter Geis; +Cc: Thierry Reding, linux-tegra, linux-usb

On 19-10-02 09:19:33, 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>
> 
> Acked-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/usb/chipidea/ci_hdrc_tegra.c | 22 +++++-----------------
>  1 file changed, 5 insertions(+), 17 deletions(-)
> 
> 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
> 

Applied, thanks.

-- 

Thanks,
Peter Chen

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 13:19 [PATCH] usb: chipidea: tegra: clean up tegra_udc flag code Peter Geis
2019-10-09  8:18 ` Peter Chen

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org linux-usb@archiver.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/ public-inbox