From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Nicolae Rosia <nicolae.rosia@certsign.ro>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: macb: allow deffered probe of the driver
Date: Mon, 26 Jan 2015 15:37:00 +0100 [thread overview]
Message-ID: <54C6510C.8050002@atmel.com> (raw)
In-Reply-To: <1421947441.717.4.camel@uti.ro>
Le 22/01/2015 18:31, Nicolae Rosia a écrit :
> The driver is trying to acquire clocks which maybe
> are not available yet. Allow the driver to request
> deffered probe by providing a probe function and
> registering it with module_platform_driver. [1]
> This patch is based on 3.19-rc5.
Do you have a use case for this need?
> [1] https://lkml.org/lkml/2013/9/23/118
>
> Signed-off-by: Nicolae Rosia <nicolae.rosia@certsign.ro>
But anyway, it's not harmful:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> drivers/net/ethernet/cadence/macb.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb.c
> b/drivers/net/ethernet/cadence/macb.c
> index 3767271..4dfcd66 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -2148,7 +2148,7 @@ static void macb_probe_queues(void __iomem *mem,
> (*num_queues)++;
> }
>
> -static int __init macb_probe(struct platform_device *pdev)
> +static int macb_probe(struct platform_device *pdev)
> {
> struct macb_platform_data *pdata;
> struct resource *regs;
> @@ -2386,7 +2386,7 @@ err_out:
> return err;
> }
>
> -static int __exit macb_remove(struct platform_device *pdev)
> +static int macb_remove(struct platform_device *pdev)
> {
> struct net_device *dev;
> struct macb *bp;
> @@ -2449,7 +2449,8 @@ static int macb_resume(struct device *dev)
> static SIMPLE_DEV_PM_OPS(macb_pm_ops, macb_suspend, macb_resume);
>
> static struct platform_driver macb_driver = {
> - .remove = __exit_p(macb_remove),
> + .probe = macb_probe,
> + .remove = macb_remove,
> .driver = {
> .name = "macb",
> .of_match_table = of_match_ptr(macb_dt_ids),
> @@ -2457,7 +2458,7 @@ static struct platform_driver macb_driver = {
> },
> };
>
> -module_platform_driver_probe(macb_driver, macb_probe);
> +module_platform_driver(macb_driver);
>
> MODULE_LICENSE("GPL");
> MODULE_DESCRIPTION("Cadence MACB/GEM Ethernet driver");
>
--
Nicolas Ferre
next prev parent reply other threads:[~2015-01-26 14:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 17:31 [PATCH] net: macb: allow deffered probe of the driver Nicolae Rosia
2015-01-26 14:37 ` Nicolas Ferre [this message]
2015-01-26 15:21 ` Nicolae Rosia
2015-01-26 16:08 ` Nicolas Ferre
2015-01-27 1:10 ` David Miller
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=54C6510C.8050002@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=netdev@vger.kernel.org \
--cc=nicolae.rosia@certsign.ro \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).