]> Gentwo Git Trees - linux/.git/commitdiff
bluetooth: btusb: Initialize .owner field of force_poll_sync_fops
authorSalah Triki <salah.triki@gmail.com>
Fri, 21 Feb 2025 21:32:59 +0000 (22:32 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 24 Feb 2025 20:38:43 +0000 (15:38 -0500)
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.

Fixes: 800fe5ec302e ("Bluetooth: btusb: Add support for queuing during polling interval")
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btusb.c

index f5609110f1a0ef0e099385a7a943af4cffb10114..a8b71362cc307946ee919a57d8e4ea6e7272861b 100644 (file)
@@ -3676,6 +3676,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,