From: Lee Jones <lee.jones@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] mfd: ipaq-micro: convert to builtin platform driver
Date: Thu, 23 Jul 2015 16:42:12 +0100 [thread overview]
Message-ID: <20150723154212.GR3436@x1> (raw)
In-Reply-To: <1437551743-20599-3-git-send-email-linus.walleij@linaro.org>
On Wed, 22 Jul 2015, Linus Walleij wrote:
> Signal that this is a builting driver and call its probe function
> immediately on init. Suppress binding attributes and delete the
> .remove() function since it is never unloaded. Tag probe() and
> functions only called from probe() with __init. Delete all module
> macros since this is a pure builtin.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/mfd/ipaq-micro.c | 27 ++++-----------------------
> 1 file changed, 4 insertions(+), 23 deletions(-)
Fixed up the typo in the commit log and applied, thanks.
> diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c
> index 9bfe2462c5c5..a41859c55bda 100644
> --- a/drivers/mfd/ipaq-micro.c
> +++ b/drivers/mfd/ipaq-micro.c
> @@ -242,7 +242,7 @@ static u16 ipaq_micro_to_u16(u8 *data)
> return data[1] << 8 | data[0];
> }
>
> -static void ipaq_micro_eeprom_dump(struct ipaq_micro *micro)
> +static void __init ipaq_micro_eeprom_dump(struct ipaq_micro *micro)
> {
> u8 dump[256];
> char *str;
> @@ -386,7 +386,7 @@ static int micro_resume(struct device *dev)
> return 0;
> }
>
> -static int micro_probe(struct platform_device *pdev)
> +static int __init micro_probe(struct platform_device *pdev)
> {
> struct ipaq_micro *micro;
> struct resource *res;
> @@ -448,21 +448,6 @@ static int micro_probe(struct platform_device *pdev)
> return 0;
> }
>
> -static int micro_remove(struct platform_device *pdev)
> -{
> - struct ipaq_micro *micro = platform_get_drvdata(pdev);
> - u32 val;
> -
> - mfd_remove_devices(&pdev->dev);
> -
> - val = readl(micro->base + UTCR3);
> - val &= ~(UTCR3_RXE | UTCR3_RIE); /* disable receive interrupt */
> - val &= ~(UTCR3_TXE | UTCR3_TIE); /* disable transmit interrupt */
> - writel(val, micro->base + UTCR3);
> -
> - return 0;
> -}
> -
> static const struct dev_pm_ops micro_dev_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(NULL, micro_resume)
> };
> @@ -471,11 +456,7 @@ static struct platform_driver micro_device_driver = {
> .driver = {
> .name = "ipaq-h3xxx-micro",
> .pm = µ_dev_pm_ops,
> + .suppress_bind_attrs = true,
> },
> - .probe = micro_probe,
> - .remove = micro_remove,
> };
> -module_platform_driver(micro_device_driver);
> -
> -MODULE_LICENSE("GPL");
> -MODULE_DESCRIPTION("driver for iPAQ Atmel micro core and backlight");
> +builtin_platform_driver_probe(micro_device_driver, micro_probe);
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2015-07-23 15:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 7:55 [PATCH 1/3] mfd: ipaq-micro: clean up development cruft Linus Walleij
2015-07-22 7:55 ` [PATCH 2/3] mfd: ipaq-micro: convert prints to debug prints Linus Walleij
2015-07-23 15:41 ` Lee Jones
2015-07-22 7:55 ` [PATCH 3/3] mfd: ipaq-micro: convert to builtin platform driver Linus Walleij
2015-07-23 15:42 ` Lee Jones [this message]
2015-07-23 15:41 ` [PATCH 1/3] mfd: ipaq-micro: clean up development cruft Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150723154212.GR3436@x1 \
--to=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.