From patchwork Thu Jun 9 09:44:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9166511 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 08CAB607DA for ; Thu, 9 Jun 2016 09:46:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBD4B2830C for ; Thu, 9 Jun 2016 09:46:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E066528338; Thu, 9 Jun 2016 09:46:39 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48C992830C for ; Thu, 9 Jun 2016 09:46:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423099AbcFIJpV (ORCPT ); Thu, 9 Jun 2016 05:45:21 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:27334 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753085AbcFIJpI (ORCPT ); Thu, 9 Jun 2016 05:45:08 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8I00GEV0ESQ070@mailout3.w1.samsung.com>; Thu, 09 Jun 2016 10:44:52 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-29-57593a94cc43 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id C0.05.04866.49A39575; Thu, 9 Jun 2016 10:44:52 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O8I006RA0EHZZ10@eusync1.samsung.com>; Thu, 09 Jun 2016 10:44:52 +0100 (BST) From: Krzysztof Kozlowski To: Ulf Hansson , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Krzysztof Kozlowski , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Liam Girdwood , Mark Brown , Greg Kroah-Hartman , Hans de Goede , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Heiko Stuebner , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, hzpeterchen@gmail.com Cc: Bartlomiej Zolnierkiewicz Subject: [RFC v4 06/14] power: pwrseq: Remove mmc prefix from mmc_pwrseq Date: Thu, 09 Jun 2016 11:44:23 +0200 Message-id: <1465465471-28740-7-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1465465471-28740-1-git-send-email-k.kozlowski@samsung.com> References: <1465465471-28740-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRmVeSWpSXmKPExsVy+t/xy7pTrCLDDQ7s47LYOGM9q8XUh0/Y LCY9ec9sMf/IOVaLiSsnM1v0v1nIatG8eD2bxZvj05ks/j96zWrRdXUTm8W5VysZLV6/MLT4 dqWDyWLT42usFif6PrBaXN41h83iyP9+RovPvUcYLWac38dksWhZK7PF0usXmSwmTF/LYrHu 4Qsmi9a9R9gtTu8usVg//xabxfG14Q7SHmvmrWH0uNzXy+Sxc9Zddo+Vy7+weWxeoeXx6sId Fo9NqzrZPO5c28PmsX/uGnaPzUvqPd7vu8rm0bdlFaPH9mvzmD2O39jO5PF5k1wAfxSXTUpq TmZZapG+XQJXRte+SawFd+wrtn3Xa2A8ZNrFyMkhIWAiceHFFiYIW0ziwr31bF2MXBxCAksZ JT6vvMYOkhASaGSS+DxFBMRmEzCW2Lx8CViRiMAldokbl7aDdTMLWEhs3boaqIGDQ1jAQ2Lp Fz+QMIuAqsTmvtlMIGFeAXeJG8vtIXbJSZw8NpkVxOYEqn507zEzxCp3ib2LJ7NNYORdwMiw ilE0tTS5oDgpPddIrzgxt7g0L10vOT93EyMk5r7uYFx6zOoQowAHoxIPr0ZKRLgQa2JZcWXu IUYJDmYlEd4f5pHhQrwpiZVVqUX58UWlOanFhxilOViUxHln7nofIiSQnliSmp2aWpBaBJNl 4uCUamAMnc3QtUna1fN7cWWK7dUp+/olb87Zf9v5zq+mGm2tFRPzjC1Np106MifMapLL69Zv 9nfFWbUSZNfeVA7yklnzRTqnaZ77b9vJB8JvXaoQf7rj5IMgh9Cd50/NVbP42JyofZVdeU/X Y87ls0KUXigl+8WoWKtWfRftLpl4qHVFjO5peU23/XeVWIozEg21mIuKEwEFu/tltQIAAA== Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.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 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 */