371e Mon Sep 17 00:00:00 2001 From: Xinming Hu Date: Wed, 30 Nov 2016 20:22:17 +0530 Subject: mwifiex: get rid of global user_rmmod flag bus.remove() callback function is called when user removes this module from kernel space or ejects the card from the slot. The driver handles these 2 cases differently. Few commands (FUNC_SHUTDOWN etc.) are sent to the firmware only for module unload case. The variable 'user_rmmod' is used to distinguish between these two scenarios. This patch checks hardware status and get rid of global variable user_rmmod. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo ---