aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
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
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')
-rw-r--r--sound/usb/usbmixer.c22
-rw-r--r--sound/usb/usx2y/usX2Yhwdep.c12
2 files changed, 1 insertions, 33 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)
diff --git a/sound/usb/usx2y/usX2Yhwdep.c b/sound/usb/usx2y/usX2Yhwdep.c
index 1558a5c4094f..a26d8d83d3eb 100644
--- a/sound/usb/usx2y/usX2Yhwdep.c
+++ b/sound/usb/usx2y/usX2Yhwdep.c
@@ -106,16 +106,6 @@ static unsigned int snd_us428ctls_poll(struct snd_hwdep *hw, struct file *file,
106} 106}
107 107
108 108
109static int snd_usX2Y_hwdep_open(struct snd_hwdep *hw, struct file *file)
110{
111 return 0;
112}
113
114static int snd_usX2Y_hwdep_release(struct snd_hwdep *hw, struct file *file)
115{
116 return 0;
117}
118
119static int snd_usX2Y_hwdep_dsp_status(struct snd_hwdep *hw, 109static int snd_usX2Y_hwdep_dsp_status(struct snd_hwdep *hw,
120 struct snd_hwdep_dsp_status *info) 110 struct snd_hwdep_dsp_status *info)
121{ 111{
@@ -267,8 +257,6 @@ int usX2Y_hwdep_new(struct snd_card *card, struct usb_device* device)
267 257
268 hw->iface = SNDRV_HWDEP_IFACE_USX2Y; 258 hw->iface = SNDRV_HWDEP_IFACE_USX2Y;
269 hw->private_data = usX2Y(card); 259 hw->private_data = usX2Y(card);
270 hw->ops.open = snd_usX2Y_hwdep_open;
271 hw->ops.release = snd_usX2Y_hwdep_release;
272 hw->ops.dsp_status = snd_usX2Y_hwdep_dsp_status; 260 hw->ops.dsp_status = snd_usX2Y_hwdep_dsp_status;
273 hw->ops.dsp_load = snd_usX2Y_hwdep_dsp_load; 261 hw->ops.dsp_load = snd_usX2Y_hwdep_dsp_load;
274 hw->ops.mmap = snd_us428ctls_mmap; 262 hw->ops.mmap = snd_us428ctls_mmap;