All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Fabio Estevam <fabio.estevam@freescale.com>
Cc: ulf.hansson@linaro.org, shawn.guo@linaro.org,
	linux-mmc@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code
Date: Fri, 8 May 2015 06:41:24 +0200	[thread overview]
Message-ID: <20150508044124.GU6325@pengutronix.de> (raw)
In-Reply-To: <1431021609-6932-1-git-send-email-fabio.estevam@freescale.com>

On Thu, May 07, 2015 at 03:00:09PM -0300, Fabio Estevam wrote:
> Since commit 8d86e4fcccf61 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()")
> the 'non-removable' and 'cd-gpios' properties are handled by
> mmc_of_parse(), so we can safely remove the pieces of code that still
> handles them.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 8eed843..d7b0a39 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -872,19 +872,12 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  	if (!np)
>  		return -ENODEV;
>  
> -	if (of_get_property(np, "non-removable", NULL))
> -		boarddata->cd_type = ESDHC_CD_PERMANENT;
> -
>  	if (of_get_property(np, "fsl,cd-controller", NULL))
>  		boarddata->cd_type = ESDHC_CD_CONTROLLER;
>  
>  	if (of_get_property(np, "fsl,wp-controller", NULL))
>  		boarddata->wp_type = ESDHC_WP_CONTROLLER;
>  
> -	boarddata->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
> -	if (gpio_is_valid(boarddata->cd_gpio))
> -		boarddata->cd_type = ESDHC_CD_GPIO;
> -
>  	boarddata->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
>  	if (gpio_is_valid(boarddata->wp_gpio))
>  		boarddata->wp_type = ESDHC_WP_GPIO;

This is equally unused.

Commit 8d86e4fcccf61ba mmc: sdhci-esdhc-imx: Call mmc_of_parse()
is seriously broken. It removed the calls to

mmc_gpio_request_ro(host->mmc, boarddata->wp_gpio);

and

mmc_gpio_request_cd(host->mmc, boarddata->cd_gpio, 0);

This makes the boarddata gpios unused, thus effectivly breaking
platform_data provided cd/wp gpios. Not that I care much about
platform_data based boards, but maybe we should make that explicit.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  parent reply	other threads:[~2015-05-08  4:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 18:00 [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code Fabio Estevam
2015-05-08  2:24 ` Shawn Guo
2015-05-08  4:41 ` Sascha Hauer [this message]
2015-05-08  5:59   ` Fabio Estevam
2015-05-08 11:49 ` Ulf Hansson
2015-05-08 12:27   ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150508044124.GU6325@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=fabio.estevam@freescale.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.