From patchwork Fri Dec 5 10:41:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 41967 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6EE572666B for ; Fri, 5 Dec 2014 10:41:33 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id d49sf328040eek.4 for ; Fri, 05 Dec 2014 02:41:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=DydLJiP9pFRyG+2NH42v+djuM8dkgJZO460x07m/0tM=; b=luQ6r+UTace1Mqav7EicWpYOrWOoHvX8wRR2SHgpVL34ZgM1eNHzfFRG7mELcUvHxR alGWPDzps38LJQfHarGuZGkm+9p0NueV4tIFMzPVIl3rE9caaoC4KcX2KiV4Evh5WTfC Ik+fH0oqk1gNhtIC9APZ8oJzRRUrXwG23FDH3mB5MgY7NljX4HBlT5cQvWOiFnL3ptRi 87L0d5dJMoOv18JGgCnDrvOK/FJPAjuwfRpcQ4BWYL5aalidlKWOzg6MKlSZ1AKzUemW JeTg27lX5sx+IDN6ONfBs4hgebmwMc8MlZHqIlqfgzt9CvWuwtC0V38xYcHmi8Dgzk/R 9uFg== X-Gm-Message-State: ALoCoQnhwiHdayFG6nSEy3oVf5DmCxX6MJ4nQnQpmovHnok044j5B7XA2lAZE4q9ULv2CFdBFtm8 X-Received: by 10.152.43.50 with SMTP id t18mr215012lal.8.1417776092658; Fri, 05 Dec 2014 02:41:32 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.38 with SMTP id ld6ls395003lac.50.gmail; Fri, 05 Dec 2014 02:41:32 -0800 (PST) X-Received: by 10.112.130.132 with SMTP id oe4mr2226622lbb.82.1417776092524; Fri, 05 Dec 2014 02:41:32 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id li6si28514890lbc.87.2014.12.05.02.41.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Dec 2014 02:41:32 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id w7so316218lbi.19 for ; Fri, 05 Dec 2014 02:41:32 -0800 (PST) X-Received: by 10.153.7.170 with SMTP id dd10mr2224798lad.44.1417776092441; Fri, 05 Dec 2014 02:41:32 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp187312lbc; Fri, 5 Dec 2014 02:41:32 -0800 (PST) X-Received: by 10.112.199.233 with SMTP id jn9mr2266099lbc.18.1417776091502; Fri, 05 Dec 2014 02:41:31 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id tn9si28520814lbb.72.2014.12.05.02.41.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Dec 2014 02:41:31 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id hs14so413748lab.25 for ; Fri, 05 Dec 2014 02:41:31 -0800 (PST) X-Received: by 10.112.137.39 with SMTP id qf7mr2174456lbb.47.1417776091029; Fri, 05 Dec 2014 02:41:31 -0800 (PST) Received: from uffe-Latitude-E6430s.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id zo3sm8215481lbb.10.2014.12.05.02.41.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Dec 2014 02:41:30 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Chris Ball Cc: Seungwon Jeon , Jaehoon Chung , Shawn Guo , Sascha Hauer , Aisheng Dong , Stephen Boyd , Minda Chen , Barry Song Subject: [PATCH] mmc: core: Let mmc_send_tuning() to take struct mmc_host* as parameter Date: Fri, 5 Dec 2014 11:41:23 +0100 Message-Id: <1417776083-13499-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , To be able to use mmc_send_tuning() prior the struct mmc_card has been allocated, let's convert it to take the struct mmc_host* as parameter instead. Suggested-by: Stephen Boyd Signed-off-by: Ulf Hansson --- drivers/mmc/core/mmc_ops.c | 7 +++---- include/linux/mmc/core.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index 12b2a32..3b044c5 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -547,14 +547,13 @@ int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, } EXPORT_SYMBOL_GPL(mmc_switch); -int mmc_send_tuning(struct mmc_card *card) +int mmc_send_tuning(struct mmc_host *host) { struct mmc_request mrq = {NULL}; struct mmc_command cmd = {0}; struct mmc_data data = {0}; struct scatterlist sg; - struct mmc_host *mmc = card->host; - struct mmc_ios *ios = &mmc->ios; + struct mmc_ios *ios = &host->ios; const u8 *tuning_block_pattern; int size, err = 0; u8 *data_buf; @@ -596,7 +595,7 @@ int mmc_send_tuning(struct mmc_card *card) data.sg_len = 1; sg_init_one(&sg, data_buf, size); - mmc_wait_for_req(mmc, &mrq); + mmc_wait_for_req(host, &mrq); if (cmd.error) { err = cmd.error; diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index c4bdaa1..cb2b040 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -154,7 +154,7 @@ extern void mmc_start_bkops(struct mmc_card *card, bool from_exception); extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool, bool, bool); extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); -extern int mmc_send_tuning(struct mmc_card *card); +extern int mmc_send_tuning(struct mmc_host *host); extern int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd); #define MMC_ERASE_ARG 0x00000000