From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Amitkumar Karwar <akarwar@marvell.com>
Cc: linux-wireless@vger.kernel.org, Cathy Luo <cluo@marvell.com>,
Nishant Sarmukadam <nishants@marvell.com>,
rajatja@google.com, briannorris@google.com,
Xinming Hu <huxm@marvell.com>
Subject: Re: [PATCH 2/2] mwifiex: get rid of global user_rmmod flag
Date: Wed, 30 Nov 2016 10:38:53 -0800 [thread overview]
Message-ID: <20161130183853.GD31934@dtor-ws> (raw)
In-Reply-To: <1480517537-9920-2-git-send-email-akarwar@marvell.com>
Hi Amitkumar,
On Wed, Nov 30, 2016 at 08:22:17PM +0530, Amitkumar Karwar wrote:
> @@ -3177,9 +3184,6 @@ static int mwifiex_pcie_init_module(void)
>
> pr_debug("Marvell PCIe Driver\n");
>
> - /* Clear the flag in case user removes the card. */
> - user_rmmod = 0;
> -
> ret = pci_register_driver(&mwifiex_pcie);
> if (ret)
> pr_err("Driver register failed!\n");
> @@ -3200,9 +3204,6 @@ static int mwifiex_pcie_init_module(void)
> */
> static void mwifiex_pcie_cleanup_module(void)
> {
> - /* Set the flag as user is removing this module. */
> - user_rmmod = 1;
> -
> pci_unregister_driver(&mwifiex_pcie);
> }
Now that your module init/exit code turns into wrapper around bus
driver registration calls, please consider using module_pci_driver(),
module_usb_driver(). Note that I do not see module_sdio_driver, but you
could still use
module_driver(mwifiex_sdio, sdio_register_driver, sdio_unregister_driver);
Thanks.
--
Dmitry
next prev parent reply other threads:[~2016-11-30 18:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 14:52 [PATCH 1/2] mwifiex: code rearrangement in pcie.c and sdio.c Amitkumar Karwar
2016-11-30 14:52 ` [PATCH 2/2] mwifiex: get rid of global user_rmmod flag Amitkumar Karwar
2016-11-30 18:38 ` Dmitry Torokhov [this message]
2016-12-01 13:11 ` Amitkumar Karwar
2016-12-05 11:09 ` [1/2] mwifiex: code rearrangement in pcie.c and sdio.c Kalle Valo
2016-12-07 10:52 ` Amitkumar Karwar
2016-12-30 11:28 ` Kalle Valo
2017-01-11 15:47 ` Amitkumar Karwar
2017-01-12 14:55 ` Kalle Valo
2017-01-17 8:34 ` Amitkumar Karwar
2017-01-17 11:10 ` Kalle Valo
2016-12-30 11:24 ` Kalle Valo
2017-01-12 14:46 ` Kalle Valo
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=20161130183853.GD31934@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=akarwar@marvell.com \
--cc=briannorris@google.com \
--cc=cluo@marvell.com \
--cc=huxm@marvell.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nishants@marvell.com \
--cc=rajatja@google.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 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).