diff mbox series

bluetooth: btusb: Initialize .owner field of force_poll_sync_fops

Message ID 20250221213259.180833-1-salah.triki@gmail.com
State New
Headers show
Series bluetooth: btusb: Initialize .owner field of force_poll_sync_fops | expand

Commit Message

Salah Triki Feb. 21, 2025, 9:32 p.m. UTC
Initialize .owner field of force_poll_sync_fops to THIS_MODULE in order to
prevent btusb from being unloaded while its operations are in use.

Signed-off-by: Salah Triki <salah.triki@gmail.com>
---
 drivers/bluetooth/btusb.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 90966dfbd278..6cd9428419cb 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3642,6 +3642,7 @@  static ssize_t force_poll_sync_write(struct file *file,
 }
 
 static const struct file_operations force_poll_sync_fops = {
+	.owner		= THIS_MODULE,
 	.open		= simple_open,
 	.read		= force_poll_sync_read,
 	.write		= force_poll_sync_write,