mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
ODROID-C5: HID: mcp-2221: cancel delayed_work only when CONFIG_IIO is enabled
[ Upstream commit 3cba9cfcc1520a2307a29f6fab887bcfc121c417 ] If the device is unplugged and CONFIG_IIO is not supported, this will result in a warning message at kernel/workqueue. Only cancel delayed work in mcp2221_remove(), when CONFIG_IIO is enabled. Signed-off-by: Abdelrahman Morsy <abdelrahmanhesham94@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Change-Id: I583aa986bcc453cc351ba8f2ec8e1972a365282a
This commit is contained in:
committed by
Dongjin Kim
parent
d9fa09acc2
commit
b30e4656f8
@@ -922,9 +922,11 @@ static void mcp2221_hid_unregister(void *ptr)
|
||||
/* This is needed to be sure hid_hw_stop() isn't called twice by the subsystem */
|
||||
static void mcp2221_remove(struct hid_device *hdev)
|
||||
{
|
||||
#if IS_REACHABLE(CONFIG_IIO)
|
||||
struct mcp2221 *mcp = hid_get_drvdata(hdev);
|
||||
|
||||
cancel_delayed_work_sync(&mcp->init_work);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if IS_REACHABLE(CONFIG_IIO)
|
||||
|
||||
Reference in New Issue
Block a user