diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-11-13 12:10:37 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-11-13 13:33:47 +0100 |
commit | f86af06306a7c36451b0174e3c64bc935d04f5e5 (patch) | |
tree | 8fa60a6e40bef2f109ad00df00b1740da08e155d | |
parent | b7df09bb348016943f56b09dcaafe221e3f73947 (diff) | |
download | lwn-f86af06306a7c36451b0174e3c64bc935d04f5e5.tar.gz lwn-f86af06306a7c36451b0174e3c64bc935d04f5e5.zip |
ALSA: us122l: Drop mmap_count field
us122l.mmap_count field was used for counting the hwdep mmap opens and
syncing at disconnection. But such a manual sync isn't needed, as the
refcount check is done in the ALSA core side. So let's drop it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241113111042.15058-4-tiwai@suse.de
-rw-r--r-- | sound/usb/usx2y/us122l.c | 16 | ||||
-rw-r--r-- | sound/usb/usx2y/us122l.h | 2 |
2 files changed, 0 insertions, 18 deletions
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c index ca5fac03ec79..6bcf8b859ebb 100644 --- a/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/us122l.c @@ -89,13 +89,6 @@ static void pt_info_set(struct usb_device *dev, u8 v) v, 0, NULL, 0, 1000, GFP_NOIO); } -static void usb_stream_hwdep_vm_open(struct vm_area_struct *area) -{ - struct us122l *us122l = area->vm_private_data; - - atomic_inc(&us122l->mmap_count); -} - static vm_fault_t usb_stream_hwdep_vm_fault(struct vm_fault *vmf) { unsigned long offset; @@ -132,17 +125,9 @@ unlock: return VM_FAULT_SIGBUS; } -static void usb_stream_hwdep_vm_close(struct vm_area_struct *area) -{ - struct us122l *us122l = area->vm_private_data; - - atomic_dec(&us122l->mmap_count); -} static const struct vm_operations_struct usb_stream_hwdep_vm_ops = { - .open = usb_stream_hwdep_vm_open, .fault = usb_stream_hwdep_vm_fault, - .close = usb_stream_hwdep_vm_close, }; static int usb_stream_hwdep_open(struct snd_hwdep *hw, struct file *file) @@ -218,7 +203,6 @@ static int usb_stream_hwdep_mmap(struct snd_hwdep *hw, if (!read) vm_flags_set(area, VM_DONTEXPAND); area->vm_private_data = us122l; - atomic_inc(&us122l->mmap_count); out: mutex_unlock(&us122l->mutex); return err; diff --git a/sound/usb/usx2y/us122l.h b/sound/usb/usx2y/us122l.h index c32ae5e981e9..8e59b78d3514 100644 --- a/sound/usb/usx2y/us122l.h +++ b/sound/usb/usx2y/us122l.h @@ -16,8 +16,6 @@ struct us122l { struct file *slave; struct list_head midi_list; - atomic_t mmap_count; - bool is_us144; }; |