From 28b7e343ee63454d563a71d2d5f769fc297fd5ad Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 5 Feb 2009 09:28:08 +0100 Subject: ALSA: Remove superfluous hwdep ops Remove NOP hwdep ops in sound drivers. Signed-off-by: Takashi Iwai --- sound/usb/usbmixer.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'sound/usb/usbmixer.c') diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 00397c8a765b..2bde79216fa5 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c @@ -78,7 +78,6 @@ struct usb_mixer_interface { /* Sound Blaster remote control stuff */ const struct rc_config *rc_cfg; - unsigned long rc_hwdep_open; u32 rc_code; wait_queue_head_t rc_waitq; struct urb *rc_urb; @@ -1797,24 +1796,6 @@ static void snd_usb_soundblaster_remote_complete(struct urb *urb) wake_up(&mixer->rc_waitq); } -static int snd_usb_sbrc_hwdep_open(struct snd_hwdep *hw, struct file *file) -{ - struct usb_mixer_interface *mixer = hw->private_data; - - if (test_and_set_bit(0, &mixer->rc_hwdep_open)) - return -EBUSY; - return 0; -} - -static int snd_usb_sbrc_hwdep_release(struct snd_hwdep *hw, struct file *file) -{ - struct usb_mixer_interface *mixer = hw->private_data; - - clear_bit(0, &mixer->rc_hwdep_open); - smp_mb__after_clear_bit(); - return 0; -} - static long snd_usb_sbrc_hwdep_read(struct snd_hwdep *hw, char __user *buf, long count, loff_t *offset) { @@ -1867,9 +1848,8 @@ static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer) hwdep->iface = SNDRV_HWDEP_IFACE_SB_RC; hwdep->private_data = mixer; hwdep->ops.read = snd_usb_sbrc_hwdep_read; - hwdep->ops.open = snd_usb_sbrc_hwdep_open; - hwdep->ops.release = snd_usb_sbrc_hwdep_release; hwdep->ops.poll = snd_usb_sbrc_hwdep_poll; + hwdep->exclusive = 1; mixer->rc_urb = usb_alloc_urb(0, GFP_KERNEL); if (!mixer->rc_urb) -- cgit v1.2.3-59-g8ed1b