Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1375752
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Lee Jones <lee.jones@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [RESEND PATCH] mfd: max77686: Use module_i2c_driver() instead of subsys initcall |
| Date | Mon, 11 Apr 2016 14:00:02 +0200 |
| Message-ID | <rmIFA-5ju-13@gated-at.bofh.it> (permalink) |
| References | <rkltM-1F6-11@gated-at.bofh.it> |
| X-Original-To | Javier Martinez Canillas <javier@osg.samsung.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=/J64RWTnk9cRmNhGSuF5VaJdrJTfcwTfT8Nk02d7ZXo=; b=E64u4t/7l+7Vk6iRN9Wt5HOanp6QPML3LMEKojMezeHXGbSMz/AoxtYoqLBCqbcSWg kPSZUJStQeTJiifIDd64E63N9gTBfIJMgzymEjeZEPnqEqDhnnTLQWuwej9W7KxsOg49 kPz9DLXuntAg+Qtrq6ueA9Owy7nm2De3KG6fg= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=/J64RWTnk9cRmNhGSuF5VaJdrJTfcwTfT8Nk02d7ZXo=; b=Hiwq+OXkpScNxA54I4ucjSAGUuBsuiXYXoN3L9SswEqTchr8jxBPeKDn5Bl7z+FVey 0CZc2iGD1M1ZHmjN3qHhkHpc49j5WrOBwU3HA+NM3m+tfewFBrCxbRYtRYGuO1b9V5yK e99t2PPA4KE2tgRsVc7SETZoCdPcYrUPsbpWMFn2lEfNzCSU2TXRjcbK4YLCBT/aikTU HqB+qqaPm41LhfY/KULfaysYusdWXZ3XiOrz7OdN+AnTw5xCHu0VxdnR05OZiLACuYCC QWjjyloCH54IEVDwPVLiulZ0b4qZ8yqrtZvyeq9HBq9sT0iS33ofSaBKPKni8rgbfkTp hSKA== |
| X-Gm-Message-State | AOPr4FVYwWlxwR0fZ279mgnx+0ZVDQQCn5/GbZEJ4TZ+jL7in/7NFzZF9dF1ucgNxk5Bj0Nf |
| X-Received | by 10.195.13.67 with SMTP id ew3mr10976216wjd.6.1460375510167; Mon, 11 Apr 2016 04:51:50 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Disposition | inline |
| Content-Transfer-Encoding | 8bit |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 69 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Andi Shyti <andi.shyti@samsung.com>, Paul Gortmaker <paul.gortmaker@windriver.com>, Krzysztof Kozlowski <k.kozlowski@samsung.com>, Laxman Dewangan <ldewangan@nvidia.com> |
| X-Original-Date | Mon, 11 Apr 2016 12:51:47 +0100 |
| X-Original-Message-ID | <20160411115147.GU8094@x1> |
| X-Original-References | <1459809962-8883-1-git-send-email-javier@osg.samsung.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1375752 |
Show key headers only | View raw
On Mon, 04 Apr 2016, Javier Martinez Canillas wrote:
> The driver's init and exit function don't do anything besides adding and
> deleting the I2C driver so the module_i2c_driver() macro could be used.
>
> Currently is not being used because the driver is initialized at subsys
> initcall level, claiming that this is done to allow consumers devices to
> use the resources provided by this driver. But dependencies are in DT so
> manual ordering of init calls is not necessary any more.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
> Changes in the resend:
> - Change commit message to make clear that dependencies are in DT instead
> giving the impression that it was wishful thinking (Krzysztof Kozlowski).
>
> Hello,
>
> This patch was first sent as a part of a bigger series to allow the
> max77686 MFD driver to be built as a module [0]. The other patches
> were already picked but $SUBJECT wasn't, probably because there was
> a dependency with a patch on the exynos thermal driver [1].
>
> But the exynos thermal patches also landed in mainline so I think it
> should be safe to merged $SUBJECT now.
>
> [0]: https://lkml.org/lkml/2016/2/11/857
> [1]: https://lkml.org/lkml/2016/2/18/592
>
> Best regards,
> Javier
>
> drivers/mfd/max77686.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
Applied, thanks.
> diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c
> index c1aff46e89d9..66cc9bebb7ba 100644
> --- a/drivers/mfd/max77686.c
> +++ b/drivers/mfd/max77686.c
> @@ -321,18 +321,7 @@ static struct i2c_driver max77686_i2c_driver = {
> .id_table = max77686_i2c_id,
> };
>
> -static int __init max77686_i2c_init(void)
> -{
> - return i2c_add_driver(&max77686_i2c_driver);
> -}
> -/* init early so consumer devices can complete system boot */
> -subsys_initcall(max77686_i2c_init);
> -
> -static void __exit max77686_i2c_exit(void)
> -{
> - i2c_del_driver(&max77686_i2c_driver);
> -}
> -module_exit(max77686_i2c_exit);
> +module_i2c_driver(max77686_i2c_driver);
>
> MODULE_DESCRIPTION("MAXIM 77686/802 multi-function core driver");
> MODULE_AUTHOR("Chiwoong Byun <woong.byun@samsung.com>");
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RESEND PATCH] mfd: max77686: Use module_i2c_driver() instead of subsys initcall Javier Martinez Canillas <javier@osg.samsung.com> - 2016-04-05 00:50 +0200 Re: [RESEND PATCH] mfd: max77686: Use module_i2c_driver() instead of subsys initcall Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-04-05 04:00 +0200 Re: [RESEND PATCH] mfd: max77686: Use module_i2c_driver() instead of subsys initcall Andi Shyti <andi.shyti@samsung.com> - 2016-04-05 04:00 +0200 Re: [RESEND PATCH] mfd: max77686: Use module_i2c_driver() instead of subsys initcall Lee Jones <lee.jones@linaro.org> - 2016-04-11 14:00 +0200
csiph-web