From patchwork Tue Jun 26 14:51:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 139990 Delivered-To: patches@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5338420lji; Tue, 26 Jun 2018 07:51:42 -0700 (PDT) X-Received: by 2002:a2e:61a:: with SMTP id 26-v6mr1366856ljg.91.1530024702102; Tue, 26 Jun 2018 07:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530024702; cv=none; d=google.com; s=arc-20160816; b=WijoU/nbSePCqegn4StBWaOnPNNEtfnRlXRSxK27+QDQ7iLcIYvpro2wZj70TlD3zo RRWKcU7z9CZMjgQRJ/r3oJL1aNt+HheD765RpIzOpY5G/7R7zeTkXECz5aqBsP0FqWwF 5QN2C3W92aIAmI4xiUWVbXskQJmVlxUXW6hr75psUk4XoJQ9ki9p/OlKii7STt20/kF1 Qmjdcup3FWndjROYq/F4vIe5QRowBZSGXU6mP3v/9E/YzhhIPCSbHVERUcYnhRkK9Th3 odd/ej6t/iybRIL6INbMpXSmpmUtauualrXek8dMU7DGiC6ME2tknABH7mphgzxZ3JRS +DJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=serWkojiqyWN6tX8zXmhMtuVS5NvLQN8LZA/cFV0KG4=; b=L73d8dy1cMPi8bDygdbo/pugR8f7ewL2Z03vbtSmo/kVlmx3mf8OEH/O59lcjwprt1 T5hhQmNwzsz8eiYpbse3uGsdj59Jj+3drDRBZKKWpGUNUQ//bP4qduifGDTrK5hrZ4g2 Xzk+d5oxjbgpADBDIz5aMy5ZYpHHhl8hSogfubpjZLmr5RDaedX/SAUtxQEyDs08gX4O 3sT9VSb/rmY/95mNqxZJxdrNAOhNPc8SducUVc9yEUzy1mRWw3kAqWXtl8Jn+fsHirQg 90xLCOz1ziTDCQ2x9ksnl9RZqiW56ustAYaUTA9TRvDM0fMvojxOFGDMKWSoFiePYiHV fb4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZU6yNHXl; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id v195-v6sor468080lfa.13.2018.06.26.07.51.42 for (Google Transport Security); Tue, 26 Jun 2018 07:51:42 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZU6yNHXl; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=serWkojiqyWN6tX8zXmhMtuVS5NvLQN8LZA/cFV0KG4=; b=ZU6yNHXlp928/yawzNxC+8xn/xN0K4Mssg4o1614S4ICrHewBeb4ZXEJwjsveN2bMn u1m5WWo6QjXY8OQkHDLqzujfT6zpU9Gor7i1moaWOz/8KBOsDbtX5H/Y314+Mb79nLLa KF8UOIFukT4rNz9zSRZ+gT8u2WFaoTv8Okepg= 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; bh=serWkojiqyWN6tX8zXmhMtuVS5NvLQN8LZA/cFV0KG4=; b=XybOOXpIaL7WtWTXLX4NizQD5+pbv+5AH73UFTKzP4alCodxLbvBeIV9NDZIe8Hn1y T1aN3rf9CTS7HuEjiS2NnjCbY217aMFGDSDSIeRpVHXpELK8TzcmWroY7zRtB0KmEy3U qR4SGaz5xqPHOaJAk4u/zkFxv538/IVPS5rjpqnx+evQh5Rui/9eBesfEbmNc9MNgqrd D5geZy1mPrLT9egSiqJ+dTWV92U1EqxXKds2D+mdGINS2cP1o4n4GO7/u5Yb3cVbzSI2 JASaCEO24Of00c3J7qbhtu8C6VkX5N7b5xJMVauB5WybiuI9uGbes80DscCvlXl4qPfh +5UQ== X-Gm-Message-State: APt69E1Sv2J7Brf9LdhOBm03lbKP2q2jgLWfM+WlfqeK/sFGd8vAyOTx 1upMb6IvxwfcQXy5Y/7KiJ9l0YasoTvEYA== X-Google-Smtp-Source: AAOMgpcFsfd944Z1JDncbwboYx2lEb2YVTr5pQ3F9nhgkwrDwbbhLmuJLsvyfY8rSv5W2ZdgO+2rhg== X-Received: by 2002:a19:1a52:: with SMTP id a79-v6mr1569041lfa.43.1530024701798; Tue, 26 Jun 2018 07:51:41 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id c67-v6sm384724lfe.4.2018.06.26.07.51.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jun 2018 07:51:40 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Tony Lindgren , Eyal Reizer Subject: [PATCH] mmc: core: Drop the unused mmc_power_save|restore_host() Date: Tue, 26 Jun 2018 16:51:31 +0200 Message-Id: <20180626145131.15935-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 The last user of mmc_power_save|restore_host() APIs is gone, hence let's drop them. Drop also the corresponding bus_ops callback, ->power_save|restore() as those becomes redundant. Cc: Tony Lindgren Cc: Eyal Reizer Signed-off-by: Ulf Hansson --- drivers/mmc/core/core.c | 46 ---------------------------------------- drivers/mmc/core/core.h | 2 -- drivers/mmc/core/sdio.c | 1 - include/linux/mmc/host.h | 3 --- 4 files changed, 52 deletions(-) -- 2.17.1 diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 281826d1fcca..d991f635c18d 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2716,52 +2716,6 @@ void mmc_stop_host(struct mmc_host *host) mmc_release_host(host); } -int mmc_power_save_host(struct mmc_host *host) -{ - int ret = 0; - - pr_debug("%s: %s: powering down\n", mmc_hostname(host), __func__); - - mmc_bus_get(host); - - if (!host->bus_ops || host->bus_dead) { - mmc_bus_put(host); - return -EINVAL; - } - - if (host->bus_ops->power_save) - ret = host->bus_ops->power_save(host); - - mmc_bus_put(host); - - mmc_power_off(host); - - return ret; -} -EXPORT_SYMBOL(mmc_power_save_host); - -int mmc_power_restore_host(struct mmc_host *host) -{ - int ret; - - pr_debug("%s: %s: powering up\n", mmc_hostname(host), __func__); - - mmc_bus_get(host); - - if (!host->bus_ops || host->bus_dead) { - mmc_bus_put(host); - return -EINVAL; - } - - mmc_power_up(host, host->card->ocr); - ret = host->bus_ops->power_restore(host); - - mmc_bus_put(host); - - return ret; -} -EXPORT_SYMBOL(mmc_power_restore_host); - #ifdef CONFIG_PM_SLEEP /* Do the card removal on suspend if card is assumed removeable * Do that in pm notifier while userspace isn't yet frozen, so we will be able diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index 9d8f09ac0821..087ba68b2920 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -28,8 +28,6 @@ struct mmc_bus_ops { int (*resume)(struct mmc_host *); int (*runtime_suspend)(struct mmc_host *); int (*runtime_resume)(struct mmc_host *); - int (*power_save)(struct mmc_host *); - int (*power_restore)(struct mmc_host *); int (*alive)(struct mmc_host *); int (*shutdown)(struct mmc_host *); int (*hw_reset)(struct mmc_host *); diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index a86490dbca70..d8e17ea6126d 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -1076,7 +1076,6 @@ static const struct mmc_bus_ops mmc_sdio_ops = { .resume = mmc_sdio_resume, .runtime_suspend = mmc_sdio_runtime_suspend, .runtime_resume = mmc_sdio_runtime_resume, - .power_restore = mmc_sdio_power_restore, .alive = mmc_sdio_alive, .hw_reset = mmc_sdio_hw_reset, .sw_reset = mmc_sdio_sw_reset, diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 64300a48dcce..3090c188062f 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -474,9 +474,6 @@ static inline void *mmc_priv(struct mmc_host *host) #define mmc_classdev(x) (&(x)->class_dev) #define mmc_hostname(x) (dev_name(&(x)->class_dev)) -int mmc_power_save_host(struct mmc_host *host); -int mmc_power_restore_host(struct mmc_host *host); - void mmc_detect_change(struct mmc_host *, unsigned long delay); void mmc_request_done(struct mmc_host *, struct mmc_request *); void mmc_command_done(struct mmc_host *host, struct mmc_request *mrq);