linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] mmc: dw_mmc-bluefield: simplify the probe() function
@ 2018-10-19 14:26 Liming Sun
  2018-10-24 10:59 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Liming Sun @ 2018-10-19 14:26 UTC (permalink / raw)
  To: Ulf Hansson, Jaehoon Chung, David Woods, Shawn Lin
  Cc: Liming Sun, linux-mmc, linux-kernel

This commit removes the unnecessary of-node check since the
dw_mci_bluefield_match[] structure has only one entry.

Signed-off-by: Liming Sun <lsun@mellanox.com>
---
 drivers/mmc/host/dw_mmc-bluefield.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-bluefield.c b/drivers/mmc/host/dw_mmc-bluefield.c
index 54c3fbb..ed8f225 100644
--- a/drivers/mmc/host/dw_mmc-bluefield.c
+++ b/drivers/mmc/host/dw_mmc-bluefield.c
@@ -52,16 +52,7 @@ static void dw_mci_bluefield_set_ios(struct dw_mci *host, struct mmc_ios *ios)
 
 static int dw_mci_bluefield_probe(struct platform_device *pdev)
 {
-	const struct dw_mci_drv_data *drv_data = NULL;
-	const struct of_device_id *match;
-
-	if (pdev->dev.of_node) {
-		match = of_match_node(dw_mci_bluefield_match,
-				      pdev->dev.of_node);
-		drv_data = match->data;
-	}
-
-	return dw_mci_pltfm_register(pdev, drv_data);
+	return dw_mci_pltfm_register(pdev, &bluefield_drv_data);
 }
 
 static struct platform_driver dw_mci_bluefield_pltfm_driver = {
-- 
1.8.3.1


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

* Re: [PATCH v1 1/1] mmc: dw_mmc-bluefield: simplify the probe() function
  2018-10-19 14:26 [PATCH v1 1/1] mmc: dw_mmc-bluefield: simplify the probe() function Liming Sun
@ 2018-10-24 10:59 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2018-10-24 10:59 UTC (permalink / raw)
  To: Liming Sun
  Cc: Jaehoon Chung, David Woods, Shawn Lin, linux-mmc,
	Linux Kernel Mailing List

On 19 October 2018 at 16:26, Liming Sun <lsun@mellanox.com> wrote:
> This commit removes the unnecessary of-node check since the
> dw_mci_bluefield_match[] structure has only one entry.
>
> Signed-off-by: Liming Sun <lsun@mellanox.com>

Queued for 4.21, thanks!

Kind regards
Uffe

> ---
>  drivers/mmc/host/dw_mmc-bluefield.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-bluefield.c b/drivers/mmc/host/dw_mmc-bluefield.c
> index 54c3fbb..ed8f225 100644
> --- a/drivers/mmc/host/dw_mmc-bluefield.c
> +++ b/drivers/mmc/host/dw_mmc-bluefield.c
> @@ -52,16 +52,7 @@ static void dw_mci_bluefield_set_ios(struct dw_mci *host, struct mmc_ios *ios)
>
>  static int dw_mci_bluefield_probe(struct platform_device *pdev)
>  {
> -       const struct dw_mci_drv_data *drv_data = NULL;
> -       const struct of_device_id *match;
> -
> -       if (pdev->dev.of_node) {
> -               match = of_match_node(dw_mci_bluefield_match,
> -                                     pdev->dev.of_node);
> -               drv_data = match->data;
> -       }
> -
> -       return dw_mci_pltfm_register(pdev, drv_data);
> +       return dw_mci_pltfm_register(pdev, &bluefield_drv_data);
>  }
>
>  static struct platform_driver dw_mci_bluefield_pltfm_driver = {
> --
> 1.8.3.1
>

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

end of thread, other threads:[~2018-10-24 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-19 14:26 [PATCH v1 1/1] mmc: dw_mmc-bluefield: simplify the probe() function Liming Sun
2018-10-24 10:59 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).