Hi Dmitry, > From: Dmitry Torokhov [mailto:dmitry.torokhov@xxxxxxxxx] > Sent: Thursday, December 01, 2016 12:09 AM > To: Amitkumar Karwar > Cc: linux-wireless@xxxxxxxxxxxxxxx; Cathy Luo; Nishant Sarmukadam; > rajatja@xxxxxxxxxx; briannorris@xxxxxxxxxx; Xinming Hu > Subject: Re: [PATCH 2/2] mwifiex: get rid of global user_rmmod flag > > 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 for review. I just submitted a separate patch which handles this cleanup. https://patchwork.kernel.org/patch/9456135/ Regards, Amitkumar