From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: Rayagond K <rayagond@vayavyalabs.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH (net.git) 4/4 (v2)] stmmac: fix driver Kconfig when built as module
Date: Tue, 05 Jun 2012 07:41:17 +0200 [thread overview]
Message-ID: <4FCD9BFD.7090103@st.com> (raw)
In-Reply-To: <CAJ3bTp5ASPyQAqB0CZV1E17uDMpgefQE9pZcPRHbcDMCgeprDg@mail.gmail.com>
On 6/5/2012 7:26 AM, Rayagond K wrote:
> Hi Giuseppe,
>
> On Mon, Jun 4, 2012 at 9:07 PM, Giuseppe CAVALLARO
> <peppe.cavallaro@st.com <mailto:peppe.cavallaro@st.com>> wrote:
>
> This patches fixes the driver when built as dyn module.
> In fact the platform part cannot be built and the probe fails
> (thanks to Bob Liu that reported this bug).
>
> v2: as D. Miller suggested, it is not necessary to make the
> pci and the platform code mutually exclusive.
> Having both could also help, at built time ,to verify that
> all the code is validated and compiles fine.
>
[snip]
> +static void __exit stmmac_exit(void)
> +{
> + pci_unregister_driver(&stmmac_pci_driver);
> + platform_driver_unregister(&stmmac_pltfr_driver);
> +}
>
>
> I guess, unregistering both PCI and platform driver should also be
> conditional else kernel may give warning message *"Unexpected driver
> unregister!".*
>
> For example PCI driver registration will be successful only if there is
> PCI card on the system/board else registration will be failed, so if the
> register would have failed then unregistering the driver again will
> cause kernel warning message.
>
> Please see *driver_unregister(*) function which is called from
> *pci_unregister_driver() *for more info.
Hmm, no driver does that because slightly redundant and, IMO, not
necessary in these cases.
Thanks for your feedback.
Peppe
prev parent reply other threads:[~2012-06-05 5:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 15:37 [PATCH (net.git) 0/4] stmmac fixes for net.git Giuseppe CAVALLARO
2012-06-04 15:37 ` [PATCH (net.git) 1/4] stmmac: remove two useless initialisation Giuseppe CAVALLARO
2012-06-04 15:49 ` David Miller
2012-06-04 15:58 ` Giuseppe CAVALLARO
2012-06-04 16:01 ` David Miller
2012-06-04 16:31 ` Giuseppe CAVALLARO
2012-06-04 15:37 ` [PATCH (net.git) 2/4] stmmac: fix driver's doc when run kernel-doc script Giuseppe CAVALLARO
2012-06-04 15:37 ` [PATCH (net.git) 3/4] stmmac: update driver's doc Giuseppe CAVALLARO
2012-06-04 15:37 ` [PATCH (net.git) 4/4 (v2)] stmmac: fix driver Kconfig when built as module Giuseppe CAVALLARO
[not found] ` <CAJ3bTp5ASPyQAqB0CZV1E17uDMpgefQE9pZcPRHbcDMCgeprDg@mail.gmail.com>
2012-06-05 5:41 ` Giuseppe CAVALLARO [this message]
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=4FCD9BFD.7090103@st.com \
--to=peppe.cavallaro@st.com \
--cc=netdev@vger.kernel.org \
--cc=rayagond@vayavyalabs.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.