aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbmixer.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-02-05 03:28:08 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-05 03:28:08 -0500
commit28b7e343ee63454d563a71d2d5f769fc297fd5ad (patch)
tree07911d0d442898ed5f6664fa1524e006b6c67114 /sound/usb/usbmixer.c
parente0d80648c0037b8b815317a52b782d4ea0c287f0 (diff)
ALSA: Remove superfluous hwdep ops
Remove NOP hwdep ops in sound drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbmixer.c')
-rw-r--r--sound/usb/usbmixer.c22
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 {
78 78
79 /* Sound Blaster remote control stuff */ 79 /* Sound Blaster remote control stuff */
80 const struct rc_config *rc_cfg; 80 const struct rc_config *rc_cfg;
81 unsigned long rc_hwdep_open;
82 u32 rc_code; 81 u32 rc_code;
83 wait_queue_head_t rc_waitq; 82 wait_queue_head_t rc_waitq;
84 struct urb *rc_urb; 83 struct urb *rc_urb;
@@ -1797,24 +1796,6 @@ static void snd_usb_soundblaster_remote_complete(struct urb *urb)
1797 wake_up(&mixer->rc_waitq); 1796 wake_up(&mixer->rc_waitq);
1798} 1797}
1799 1798
1800static int snd_usb_sbrc_hwdep_open(struct snd_hwdep *hw, struct file *file)
1801{
1802 struct usb_mixer_interface *mixer = hw->private_data;
1803
1804 if (test_and_set_bit(0, &mixer->rc_hwdep_open))
1805 return -EBUSY;
1806 return 0;
1807}
1808
1809static int snd_usb_sbrc_hwdep_release(struct snd_hwdep *hw, struct file *file)
1810{
1811 struct usb_mixer_interface *mixer = hw->private_data;
1812
1813 clear_bit(0, &mixer->rc_hwdep_open);
1814 smp_mb__after_clear_bit();
1815 return 0;
1816}
1817
1818static long snd_usb_sbrc_hwdep_read(struct snd_hwdep *hw, char __user *buf, 1799static long snd_usb_sbrc_hwdep_read(struct snd_hwdep *hw, char __user *buf,
1819 long count, loff_t *offset) 1800 long count, loff_t *offset)
1820{ 1801{
@@ -1867,9 +1848,8 @@ static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer)
1867 hwdep->iface = SNDRV_HWDEP_IFACE_SB_RC; 1848 hwdep->iface = SNDRV_HWDEP_IFACE_SB_RC;
1868 hwdep->private_data = mixer; 1849 hwdep->private_data = mixer;
1869 hwdep->ops.read = snd_usb_sbrc_hwdep_read; 1850 hwdep->ops.read = snd_usb_sbrc_hwdep_read;
1870 hwdep->ops.open = snd_usb_sbrc_hwdep_open;
1871 hwdep->ops.release = snd_usb_sbrc_hwdep_release;
1872 hwdep->ops.poll = snd_usb_sbrc_hwdep_poll; 1851 hwdep->ops.poll = snd_usb_sbrc_hwdep_poll;
1852 hwdep->exclusive = 1;
1873 1853
1874 mixer->rc_urb = usb_alloc_urb(0, GFP_KERNEL); 1854 mixer->rc_urb = usb_alloc_urb(0, GFP_KERNEL);
1875 if (!mixer->rc_urb) 1855 if (!mixer->rc_urb)