diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-24 00:35:41 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-24 00:35:41 +0100 |
commit | c2f43981e5dbc92884149aa2234064cc2c340acd (patch) | |
tree | bd5273bc7ae92a1ef47fa3f35ec6ef79d28ba270 /sound/usb/usbmixer.c | |
parent | dec14f8c0eff54549e5747f8a4d1dc6c0347e2dd (diff) | |
parent | 28b7e343ee63454d563a71d2d5f769fc297fd5ad (diff) | |
download | kernel-common-c2f43981e5dbc92884149aa2234064cc2c340acd.tar.gz kernel-common-c2f43981e5dbc92884149aa2234064cc2c340acd.tar.bz2 kernel-common-c2f43981e5dbc92884149aa2234064cc2c340acd.zip |
Merge branch 'topic/hwdep-cleanup' into for-linus
Diffstat (limited to 'sound/usb/usbmixer.c')
-rw-r--r-- | sound/usb/usbmixer.c | 22 |
1 files changed, 1 insertions, 21 deletions
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) |