From patchwork Fri Mar 1 12:47:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 15196 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1B7B323F7B for ; Fri, 1 Mar 2013 12:48:09 +0000 (UTC) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by fiordland.canonical.com (Postfix) with ESMTP id 323A6A197E6 for ; Fri, 1 Mar 2013 12:48:08 +0000 (UTC) Received: by mail-vc0-f176.google.com with SMTP id fk10so1908263vcb.21 for ; Fri, 01 Mar 2013 04:48:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:mime-version:content-type:x-gm-message-state; bh=mDu9kzUcdjUCqK0nKG3jLgaa8/COcShZuHblnnGVHOg=; b=RQFrlrgfFzGIHbOvVX5iKPvJ3Oww264iT6hNMYMqFq3+gh1x768yADMKrA7B0Qx93F SbVVmYClUDpdDdQiM/CaDukgJNvKOt52km/Jeu+o+gM82TN5RLjQ31rUbCD7LCXn5N27 +BM0+dh1hXSsRUtJz3UojV1zIxKnGMmSLf457BqxIin2HXWfg3nu8bdMqnCzBSkjuP+B Yj5jfbA46IvbqfDLygdNCqGl+EwS8+nSEBvUxoebMYHUGZ5/gIoUUUDkSVWYqBco0u90 0KdVIa+0TXu5qgriodC3akd9jI2M/4U/Ltr57UIjVuvSxDeFF4tRQpSQZH763uGeUrMX DgmA== X-Received: by 10.52.29.18 with SMTP id f18mr3451555vdh.57.1362142087739; Fri, 01 Mar 2013 04:48:07 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp31048veb; Fri, 1 Mar 2013 04:48:06 -0800 (PST) X-Received: by 10.14.223.199 with SMTP id v47mr27593977eep.18.1362142086225; Fri, 01 Mar 2013 04:48:06 -0800 (PST) Received: from eu1sys200aog106.obsmtp.com (eu1sys200aog106.obsmtp.com [207.126.144.121]) by mx.google.com with SMTP id g1si18310492eem.127.2013.03.01.04.48.03 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 01 Mar 2013 04:48:06 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.121 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.121; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.121 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) smtp.mail=ulf.hansson@stericsson.com Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob106.postini.com ([207.126.147.11]) with SMTP ID DSNKUTCjgc23YYHNWHl8/PH90cT+4Ys6pM6E@postini.com; Fri, 01 Mar 2013 12:48:06 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 441221E0; Fri, 1 Mar 2013 12:47:27 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id EA4194DEA; Fri, 1 Mar 2013 12:47:26 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 4E72E24C07C; Fri, 1 Mar 2013 13:47:20 +0100 (CET) Received: from steludxu1397.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 1 Mar 2013 13:47:26 +0100 From: Ulf Hansson To: , Chris Ball Cc: Johan Rudholm , Ulf Hansson Subject: [PATCH 1/3] mmc: core: Remove power_restore bus_ops for mmc and sd Date: Fri, 1 Mar 2013 13:47:13 +0100 Message-ID: <1362142035-8403-2-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1362142035-8403-1-git-send-email-ulf.hansson@stericsson.com> References: <1362142035-8403-1-git-send-email-ulf.hansson@stericsson.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQl4/H/YMnlkJwJcEY4xwZLWezKtsVLfUWkT1twFLuB2xtgihNIOouu5z1Vaz6UH6XLe6+8v From: Ulf Hansson The mmc_power_restore|save_host API is only used by SDIO func drivers. SDIO func drivers are also moving towards use of runtime pm to accomplish the the same operation and since this API is not used for mmc and sd it makes sense to remove the corresponding bus_ops. Moreover, at least for eMMC the mmc bus_ops is broken, since no consideration is taken for mmc sleep and mmc power off notify. Signed-off-by: Ulf Hansson --- drivers/mmc/core/mmc.c | 14 -------------- drivers/mmc/core/sd.c | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index c8f3d6e..edc6bc4 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1445,18 +1445,6 @@ static int mmc_resume(struct mmc_host *host) return err; } -static int mmc_power_restore(struct mmc_host *host) -{ - int ret; - - host->card->state &= ~(MMC_STATE_HIGHSPEED | MMC_STATE_HIGHSPEED_200); - mmc_claim_host(host); - ret = mmc_init_card(host, host->ocr, host->card); - mmc_release_host(host); - - return ret; -} - static int mmc_sleep(struct mmc_host *host) { struct mmc_card *card = host->card; @@ -1494,7 +1482,6 @@ static const struct mmc_bus_ops mmc_ops = { .detect = mmc_detect, .suspend = NULL, .resume = NULL, - .power_restore = mmc_power_restore, .alive = mmc_alive, }; @@ -1505,7 +1492,6 @@ static const struct mmc_bus_ops mmc_ops_unsafe = { .detect = mmc_detect, .suspend = mmc_suspend, .resume = mmc_resume, - .power_restore = mmc_power_restore, .alive = mmc_alive, }; diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 9e645e1..b71d906 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -1095,24 +1095,11 @@ static int mmc_sd_resume(struct mmc_host *host) return err; } -static int mmc_sd_power_restore(struct mmc_host *host) -{ - int ret; - - host->card->state &= ~MMC_STATE_HIGHSPEED; - mmc_claim_host(host); - ret = mmc_sd_init_card(host, host->ocr, host->card); - mmc_release_host(host); - - return ret; -} - static const struct mmc_bus_ops mmc_sd_ops = { .remove = mmc_sd_remove, .detect = mmc_sd_detect, .suspend = NULL, .resume = NULL, - .power_restore = mmc_sd_power_restore, .alive = mmc_sd_alive, }; @@ -1121,7 +1108,6 @@ static const struct mmc_bus_ops mmc_sd_ops_unsafe = { .detect = mmc_sd_detect, .suspend = mmc_sd_suspend, .resume = mmc_sd_resume, - .power_restore = mmc_sd_power_restore, .alive = mmc_sd_alive, };