From patchwork Fri Dec 30 12:47:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 89338 Delivered-To: patches@linaro.org Received: by 10.140.20.101 with SMTP id 92csp6424573qgi; Fri, 30 Dec 2016 04:47:58 -0800 (PST) X-Received: by 10.25.202.66 with SMTP id h2mr17093600lfj.131.1483102078491; Fri, 30 Dec 2016 04:47:58 -0800 (PST) Return-Path: Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com. [2a00:1450:4010:c07::22f]) by mx.google.com with ESMTPS id 192si23657552lfh.306.2016.12.30.04.47.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Dec 2016 04:47:58 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22f as permitted sender) client-ip=2a00:1450:4010:c07::22f; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22f as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22f.google.com with SMTP id y21so236376411lfa.1 for ; Fri, 30 Dec 2016 04:47:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6QkWhTbB6ZPfEwD+AIVXAs/uXa6jem1CtqZ2nTmbUrE=; b=MTegPUeZnjvHTn7ZF2TmBhwbH8d3kuq71V8z8xXGyZQQ4fRr4gI1YDGwmUfL7TJ8wm H4heIIyiL2qTPPXeDjzylGb4VTddKz1rUJ/QIMywUCXvVLfd434Bu3gaKVKMw034vl5+ wmgDcE2f2DldB1hgrllu/jBA31k87pNgO8d6w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6QkWhTbB6ZPfEwD+AIVXAs/uXa6jem1CtqZ2nTmbUrE=; b=EDvLfNk2lXGf9qh692SivcFpMzezJDUC9MU7aOhw4q0Qm8uDp05thbVgEtK7o1XIdS xrMOP/G3kmLLeRkeCMog07nf0nY4zl9OTT2UMlM8KFJEmULJ4fjOb7q7i5Ywd3pBTKlx PxATL1IT1kUjoVYRr7vk4bjZ7EgSJ1Rswv0Poso8aCCN9Sa0NiY19Mzl6ze/qNRwfD3g 8n/Yjk0VK1zC9Wi+USUrJTIOG9jd94pxTbYaADgEbUHj5Vxe4xiaY6eKXMyNnSGEqzoC pbUZdH298dskDBIrJr/wjJU8kTx0pONJyziqAw/ziQzabi3/DQEV9w/cb6aY8lLYE1om pBoA== X-Gm-Message-State: AIkVDXKy+Cbpc6EsJHYVW+U+9JtQ1hvSIkP0VTyce61dnoi4INawBLLhfWKaT5ppUQZtbliBGlM= X-Received: by 10.25.40.211 with SMTP id o202mr17833054lfo.183.1483102078019; Fri, 30 Dec 2016 04:47:58 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id a79sm7450069ljb.46.2016.12.30.04.47.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Dec 2016 04:47:56 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij , Kuninori Morimoto Subject: [PATCH 04/21] mmc: sh_mmcif: Remove unused ->get_cd() platform callback Date: Fri, 30 Dec 2016 13:47:17 +0100 Message-Id: <1483102054-1752-5-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> References: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> Removing the callback also enables us to remove the sh_mmcif_get_cd() altogether, as we convert to use mmc_gpio_get_cd() to the same kind of work. Cc: Kuninori Morimoto Signed-off-by: Ulf Hansson --- drivers/mmc/host/sh_mmcif.c | 18 +----------------- include/linux/mmc/sh_mmcif.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 5f97055..7ba92a4 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1079,26 +1079,10 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) host->state = STATE_IDLE; } -static int sh_mmcif_get_cd(struct mmc_host *mmc) -{ - struct sh_mmcif_host *host = mmc_priv(mmc); - struct device *dev = sh_mmcif_host_to_dev(host); - struct sh_mmcif_plat_data *p = dev->platform_data; - int ret = mmc_gpio_get_cd(mmc); - - if (ret >= 0) - return ret; - - if (!p || !p->get_cd) - return -ENOSYS; - else - return p->get_cd(host->pd); -} - static struct mmc_host_ops sh_mmcif_ops = { .request = sh_mmcif_request, .set_ios = sh_mmcif_set_ios, - .get_cd = sh_mmcif_get_cd, + .get_cd = mmc_gpio_get_cd, }; static bool sh_mmcif_end_cmd(struct sh_mmcif_host *host) diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index 5ce5a2c..7cafc95 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h @@ -32,7 +32,6 @@ */ struct sh_mmcif_plat_data { - int (*get_cd)(struct platform_device *pdef); unsigned int slave_id_tx; /* embedded slave_id_[tr]x */ unsigned int slave_id_rx; bool ccs_unsupported : 1;