Patch "HID: mcp-2221: cancel delayed_work only when CONFIG_IIO is enabled" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    HID: mcp-2221: cancel delayed_work only when CONFIG_IIO is enabled

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hid-mcp-2221-cancel-delayed_work-only-when-config_ii.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b1854d6414b484737a69472fb795bd7c3b12c36d
Author: Abdelrahman Morsy <abdelrahmanhesham94@xxxxxxxxx>
Date:   Tue Apr 2 14:14:06 2024 +0200

    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@xxxxxxxxx>
    Signed-off-by: Jiri Kosina <jkosina@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index f9cceaeffd081..da5ea5a23b087 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -944,9 +944,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)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux