diff mbox

[12/13] mmc: sdhci: Always init buf_ready_int

Message ID 1417801271-15575-13-git-send-email-adrian.hunter@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Adrian Hunter Dec. 5, 2014, 5:41 p.m. UTC
There is no point making the initialization
of buf_ready_int conditional on host version.
Simplify by just doing it always. Note that
the other conditional initializations will be
removed when the new way of doing re-tuning
is taken into use.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ulf Hansson Jan. 13, 2015, 11:21 a.m. UTC | #1
On 5 December 2014 at 18:41, Adrian Hunter <adrian.hunter@intel.com> wrote:
> There is no point making the initialization
> of buf_ready_int conditional on host version.
> Simplify by just doing it always. Note that
> the other conditional initializations will be
> removed when the new way of doing re-tuning
> is taken into use.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>

Thanks! Applied for next.

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index bfde165..dd4cc4c 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -3331,9 +3331,9 @@ int sdhci_add_host(struct sdhci_host *host)
>
>         setup_timer(&host->timer, sdhci_timeout_timer, (unsigned long)host);
>
> -       if (host->version >= SDHCI_SPEC_300) {
> -               init_waitqueue_head(&host->buf_ready_int);
> +       init_waitqueue_head(&host->buf_ready_int);
>
> +       if (host->version >= SDHCI_SPEC_300) {
>                 /* Initialize re-tuning timer */
>                 init_timer(&host->tuning_timer);
>                 host->tuning_timer.data = (unsigned long)host;
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index bfde165..dd4cc4c 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3331,9 +3331,9 @@  int sdhci_add_host(struct sdhci_host *host)
 
 	setup_timer(&host->timer, sdhci_timeout_timer, (unsigned long)host);
 
-	if (host->version >= SDHCI_SPEC_300) {
-		init_waitqueue_head(&host->buf_ready_int);
+	init_waitqueue_head(&host->buf_ready_int);
 
+	if (host->version >= SDHCI_SPEC_300) {
 		/* Initialize re-tuning timer */
 		init_timer(&host->tuning_timer);
 		host->tuning_timer.data = (unsigned long)host;