From patchwork Thu May 5 12:34:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9024271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BECF5BF440 for ; Thu, 5 May 2016 12:38:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B075201E4 for ; Thu, 5 May 2016 12:38:58 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id EF4C2203C0 for ; Thu, 5 May 2016 12:38:56 +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 1ayIX2-0003jC-Lv; Thu, 05 May 2016 12:37:28 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ayIV1-0000RQ-UK for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2016 12:35:25 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O6P000FLEY7GM60@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2016 13:34:55 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-3b-572b3deff1ec Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id D6.B4.05254.FED3B275; Thu, 5 May 2016 13:34:55 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O6P00KEEEXN8E00@eusync4.samsung.com>; Thu, 05 May 2016 13:34:55 +0100 (BST) From: Krzysztof Kozlowski To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, Ulf Hansson , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Greg Kroah-Hartman , Mark Brown Subject: [RFC v2 05/13] power: pwrseq: Remove mmc prefix from mmc_pwrseq Date: Thu, 05 May 2016 14:34:18 +0200 Message-id: <1462451666-17945-6-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1462451666-17945-1-git-send-email-k.kozlowski@samsung.com> References: <1462451666-17945-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsVy+t/xa7rvbbXDDc5vlbbYOGM9q8XUh0/Y LCY9ec9sMf/IOVaLiSsnM1s0L17PZnFq8jMmi9cvDC02Pb7GanF51xw2iyP/+xktPvceYbSY cX4fk8WiZa3MFmuP3GW3OL27xKJt9QdWi+Nrwx2EPHbOusvusXmFlsemVZ1sHneu7WHz2D93 DVBoSb3Hv2PsHn1bVjF6fN4k53Hq62f2AK4oLpuU1JzMstQifbsErow1R5tYC+bYV1zf2cXS wNhh2sXIySEhYCLx5ONSNghbTOLCvfVANheHkMBSRok5L7ewQziNTBJ/GyaygFSxCRhLbF6+ BKxKROAGs8SrnZOZQRxmgR2MEn+X3QGrEhbwkJi1/j0TiM0ioCoxa9lTVhCbV8BdYs2d56wQ ++QkTh6bDGZzAtWf/TUfzBYCqjn0ezrjBEbeBYwMqxhFU0uTC4qT0nMN9YoTc4tL89L1kvNz NzFCwv3LDsbFx6wOMQpwMCrx8B6YrxUuxJpYVlyZe4hRgoNZSYRXHhgtQrwpiZVVqUX58UWl OanFhxilOViUxHnn7nofIiSQnliSmp2aWpBaBJNl4uCUamCsMtUy3+iaduSP9wa7hFP3nnd8 nT3pmnhR3fS9RkdFVy3wC2DIrK1kYDxpH2dSkPDzdO+sWydP8t7IaWp32i7//NSK9I6NbkK5 a71y5zs+TTyhfIZxyzFXtQ9fOiusprx7smvPMbtIpg1yF2awci/0E4trvuIidW7d/m7r5l0u n/P+cy+x2WemxFKckWioxVxUnAgAVIwlnHMCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160505_053524_267926_C1092130 X-CRM114-Status: GOOD ( 18.49 ) X-Spam-Score: -9.0 (---------) 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: hverkuil@xs4all.nl, tjakobi@math.uni-bielefeld.de, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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 85800b48241f..ad281bb3475f 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 */