From patchwork Wed Jun 1 08:02:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9146259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A86B360757 for ; Wed, 1 Jun 2016 08:05:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9886E22473 for ; Wed, 1 Jun 2016 08:05:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D3862654B; Wed, 1 Jun 2016 08:05:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F2B3A22473 for ; Wed, 1 Jun 2016 08:05:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b818N-0006VM-8X; Wed, 01 Jun 2016 08:04:11 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b817R-0005dY-5x for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2016 08:03:16 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8300B3M2CNJ840@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2016 09:02:47 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-02-574e96a7a5b9 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id E6.1E.04866.7A69E475; Wed, 1 Jun 2016 09:02:47 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O830012K2CGIS90@eusync3.samsung.com>; Wed, 01 Jun 2016 09:02:47 +0100 (BST) From: Krzysztof Kozlowski To: hzpeterchen@gmail.com, Ulf Hansson , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Krzysztof Kozlowski , Javier Martinez Canillas , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-pm@vger.kernel.or, Alan Stern , linux-usb@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Kukjin Kim , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v3 04/12] power: pwrseq: Remove mmc prefix from mmc_pwrseq Date: Wed, 01 Jun 2016 10:02:13 +0200 Message-id: <1464768141-25420-5-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1464768141-25420-1-git-send-email-k.kozlowski@samsung.com> References: <1464768141-25420-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42I5/e/4Vd3l0/zCDXbME7XYOGM9q8WkJ++Z LeYfOcdqMXHlZGaL/jcLWS2aF69ns+i6uonN4tyrlYwWb96uYbJ4/cLQov/xa2aLTY+vsVpc 3jWHzeLI/35Gi5kXV7NYzDi/j8li0bJWZoul1y8yWUyYvpbFonXvEXaL07tLLCb8vsBmcXxt uIO4x5p5axg9Lvf1MnnsnHWX3WPl8i9sHptXaHlsWtXJ5nHn2h42j/1z17B7bF5S77GlH6hg 9t0fjB59W1Yxehz5Op3F4/MmuQC+KC6blNSczLLUIn27BK6Mrn2TWAvu2Fds+67XwHjItIuR k0NCwERi2fxHzBC2mMSFe+vZuhi5OIQEljJKXNj2gwnCaWSS6D/zlh2kik3AWGLz8iVgVSIC HWwSm7a+AUswC2RLnLr3nhXEFhbwkpiw7T1YnEVAVeJw5wkwm1fAXeLw2uNQ6+QkTh6bDFbP KeAhcWLCf0YQWwiopnHaZNYJjLwLGBlWMYqmliYXFCel5xrpFSfmFpfmpesl5+duYoTE0dcd jEuPWR1iFOBgVOLhrbjsGy7EmlhWXJl7iFGCg1lJhFdwsl+4EG9KYmVValF+fFFpTmrxIUZp DhYlcd6Zu96HCAmkJ5akZqemFqQWwWSZODilGhhnpZ/ce2Lf2RuXrzEXBEUedLSZ8XK/kKu9 1MIftTNcPnb3vUi6cfMvp0C5zIfVTIdOcQS7vvT4+DR8xnSV/QpKswz2rdy6OPjav7ZfOw7q 7jKeuCTGrW/jsi1JGt3x328GcR8Ljjedmsc7X2DC1lANoUVeRr/5Pz7uu2z7e9vsa/3fsywf 1cnpKrEUZyQaajEXFScCAA+UdeSfAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160601_010313_570520_0E5CF1ED X-CRM114-Status: GOOD ( 21.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , Bartlomiej Zolnierkiewicz MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The "mmc" prefix is no longer needed after moving the pwrseq core code from mmc/ to power/. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas --- drivers/power/pwrseq/pwrseq.c | 18 +++++++++--------- drivers/power/pwrseq/pwrseq_emmc.c | 8 ++++---- drivers/power/pwrseq/pwrseq_simple.c | 8 ++++---- include/linux/mmc/host.h | 4 ++-- include/linux/pwrseq.h | 20 ++++++++++---------- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/power/pwrseq/pwrseq.c b/drivers/power/pwrseq/pwrseq.c index 66310d7643cc..9c665821f890 100644 --- a/drivers/power/pwrseq/pwrseq.c +++ b/drivers/power/pwrseq/pwrseq.c @@ -21,7 +21,7 @@ static LIST_HEAD(pwrseq_list); int mmc_pwrseq_alloc(struct mmc_host *host) { struct device_node *np; - struct mmc_pwrseq *p; + struct pwrseq *p; np = of_parse_phandle(host->parent->of_node, "mmc-pwrseq", 0); if (!np) @@ -54,7 +54,7 @@ EXPORT_SYMBOL_GPL(mmc_pwrseq_alloc); void mmc_pwrseq_pre_power_on(struct mmc_host *host) { - struct mmc_pwrseq *pwrseq = host->pwrseq; + struct pwrseq *pwrseq = host->pwrseq; if (pwrseq && pwrseq->ops->pre_power_on) pwrseq->ops->pre_power_on(host); @@ -63,7 +63,7 @@ EXPORT_SYMBOL_GPL(mmc_pwrseq_pre_power_on); void mmc_pwrseq_post_power_on(struct mmc_host *host) { - struct mmc_pwrseq *pwrseq = host->pwrseq; + struct pwrseq *pwrseq = host->pwrseq; if (pwrseq && pwrseq->ops->post_power_on) pwrseq->ops->post_power_on(host); @@ -72,7 +72,7 @@ EXPORT_SYMBOL_GPL(mmc_pwrseq_post_power_on); void mmc_pwrseq_power_off(struct mmc_host *host) { - struct mmc_pwrseq *pwrseq = host->pwrseq; + struct pwrseq *pwrseq = host->pwrseq; if (pwrseq && pwrseq->ops->power_off) pwrseq->ops->power_off(host); @@ -81,7 +81,7 @@ EXPORT_SYMBOL_GPL(mmc_pwrseq_power_off); void mmc_pwrseq_free(struct mmc_host *host) { - struct mmc_pwrseq *pwrseq = host->pwrseq; + struct pwrseq *pwrseq = host->pwrseq; if (pwrseq) { module_put(pwrseq->owner); @@ -90,7 +90,7 @@ void mmc_pwrseq_free(struct mmc_host *host) } EXPORT_SYMBOL_GPL(mmc_pwrseq_free); -int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq) +int pwrseq_register(struct pwrseq *pwrseq) { if (!pwrseq || !pwrseq->ops || !pwrseq->dev) return -EINVAL; @@ -101,9 +101,9 @@ int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq) return 0; } -EXPORT_SYMBOL_GPL(mmc_pwrseq_register); +EXPORT_SYMBOL_GPL(pwrseq_register); -void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq) +void pwrseq_unregister(struct pwrseq *pwrseq) { if (pwrseq) { mutex_lock(&pwrseq_list_mutex); @@ -111,4 +111,4 @@ void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq) mutex_unlock(&pwrseq_list_mutex); } } -EXPORT_SYMBOL_GPL(mmc_pwrseq_unregister); +EXPORT_SYMBOL_GPL(pwrseq_unregister); diff --git a/drivers/power/pwrseq/pwrseq_emmc.c b/drivers/power/pwrseq/pwrseq_emmc.c index a0583ed46d7f..a68ac9a68e04 100644 --- a/drivers/power/pwrseq/pwrseq_emmc.c +++ b/drivers/power/pwrseq/pwrseq_emmc.c @@ -22,7 +22,7 @@ #include struct mmc_pwrseq_emmc { - struct mmc_pwrseq pwrseq; + struct pwrseq pwrseq; struct notifier_block reset_nb; struct gpio_desc *reset_gpio; }; @@ -54,7 +54,7 @@ static int mmc_pwrseq_emmc_reset_nb(struct notifier_block *this, return NOTIFY_DONE; } -static const struct mmc_pwrseq_ops mmc_pwrseq_emmc_ops = { +static const struct pwrseq_ops mmc_pwrseq_emmc_ops = { .post_power_on = mmc_pwrseq_emmc_reset, }; @@ -85,7 +85,7 @@ static int mmc_pwrseq_emmc_probe(struct platform_device *pdev) pwrseq->pwrseq.owner = THIS_MODULE; platform_set_drvdata(pdev, pwrseq); - return mmc_pwrseq_register(&pwrseq->pwrseq); + return pwrseq_register(&pwrseq->pwrseq); } static int mmc_pwrseq_emmc_remove(struct platform_device *pdev) @@ -93,7 +93,7 @@ static int mmc_pwrseq_emmc_remove(struct platform_device *pdev) struct mmc_pwrseq_emmc *pwrseq = platform_get_drvdata(pdev); unregister_restart_handler(&pwrseq->reset_nb); - mmc_pwrseq_unregister(&pwrseq->pwrseq); + pwrseq_unregister(&pwrseq->pwrseq); return 0; } diff --git a/drivers/power/pwrseq/pwrseq_simple.c b/drivers/power/pwrseq/pwrseq_simple.c index 786f1db53a3f..d5fbd653153e 100644 --- a/drivers/power/pwrseq/pwrseq_simple.c +++ b/drivers/power/pwrseq/pwrseq_simple.c @@ -21,7 +21,7 @@ #include struct mmc_pwrseq_simple { - struct mmc_pwrseq pwrseq; + struct pwrseq pwrseq; bool clk_enabled; struct clk *ext_clk; struct gpio_descs *reset_gpios; @@ -77,7 +77,7 @@ static void mmc_pwrseq_simple_power_off(struct mmc_host *host) } } -static const struct mmc_pwrseq_ops mmc_pwrseq_simple_ops = { +static const struct pwrseq_ops mmc_pwrseq_simple_ops = { .pre_power_on = mmc_pwrseq_simple_pre_power_on, .post_power_on = mmc_pwrseq_simple_post_power_on, .power_off = mmc_pwrseq_simple_power_off, @@ -115,14 +115,14 @@ static int mmc_pwrseq_simple_probe(struct platform_device *pdev) pwrseq->pwrseq.owner = THIS_MODULE; platform_set_drvdata(pdev, pwrseq); - return mmc_pwrseq_register(&pwrseq->pwrseq); + return pwrseq_register(&pwrseq->pwrseq); } static int mmc_pwrseq_simple_remove(struct platform_device *pdev) { struct mmc_pwrseq_simple *pwrseq = platform_get_drvdata(pdev); - mmc_pwrseq_unregister(&pwrseq->pwrseq); + pwrseq_unregister(&pwrseq->pwrseq); return 0; } diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 45cde8cd39f2..f3e29f4b7f30 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -203,7 +203,7 @@ struct mmc_context_info { }; struct regulator; -struct mmc_pwrseq; +struct pwrseq; struct mmc_supply { struct regulator *vmmc; /* Card power supply */ @@ -215,7 +215,7 @@ struct mmc_host { struct device class_dev; int index; const struct mmc_host_ops *ops; - struct mmc_pwrseq *pwrseq; + struct pwrseq *pwrseq; unsigned int f_min; unsigned int f_max; unsigned int f_init; diff --git a/include/linux/pwrseq.h b/include/linux/pwrseq.h index e230670c1d8d..6d2d2a44ad35 100644 --- a/include/linux/pwrseq.h +++ b/include/linux/pwrseq.h @@ -5,19 +5,19 @@ * * License terms: GNU General Public License (GPL) version 2 */ -#ifndef _MMC_CORE_PWRSEQ_H -#define _MMC_CORE_PWRSEQ_H +#ifndef _LINUX_PWRSEQ_H +#define _LINUX_PWRSEQ_H #include -struct mmc_pwrseq_ops { +struct pwrseq_ops { void (*pre_power_on)(struct mmc_host *host); void (*post_power_on)(struct mmc_host *host); void (*power_off)(struct mmc_host *host); }; -struct mmc_pwrseq { - const struct mmc_pwrseq_ops *ops; +struct pwrseq { + const struct pwrseq_ops *ops; struct device *dev; struct list_head pwrseq_node; struct module *owner; @@ -25,8 +25,8 @@ struct mmc_pwrseq { #ifdef CONFIG_POWER_SEQ -int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq); -void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq); +int pwrseq_register(struct pwrseq *pwrseq); +void pwrseq_unregister(struct pwrseq *pwrseq); int mmc_pwrseq_alloc(struct mmc_host *host); void mmc_pwrseq_pre_power_on(struct mmc_host *host); @@ -36,11 +36,11 @@ void mmc_pwrseq_free(struct mmc_host *host); #else /* CONFIG_POWER_SEQ */ -static inline int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq) +static inline int pwrseq_register(struct pwrseq *pwrseq) { return -ENOSYS; } -static inline void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq) {} +static inline void pwrseq_unregister(struct pwrseq *pwrseq) {} static inline int mmc_pwrseq_alloc(struct mmc_host *host) { return 0; } static inline void mmc_pwrseq_pre_power_on(struct mmc_host *host) {} static inline void mmc_pwrseq_post_power_on(struct mmc_host *host) {} @@ -49,4 +49,4 @@ static inline void mmc_pwrseq_free(struct mmc_host *host) {} #endif /* CONFIG_POWER_SEQ */ -#endif +#endif /* _LINUX_PWRSEQ_H */