aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/control.c')
-rw-r--r--sound/core/control.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 8a77620a3854..69734b0eafd0 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -105,7 +105,7 @@ static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl)
105{ 105{
106 unsigned long flags; 106 unsigned long flags;
107 struct snd_kctl_event *cread; 107 struct snd_kctl_event *cread;
108 108
109 spin_lock_irqsave(&ctl->read_lock, flags); 109 spin_lock_irqsave(&ctl->read_lock, flags);
110 while (!list_empty(&ctl->events)) { 110 while (!list_empty(&ctl->events)) {
111 cread = snd_kctl_event(ctl->events.next); 111 cread = snd_kctl_event(ctl->events.next);
@@ -159,7 +159,7 @@ void snd_ctl_notify(struct snd_card *card, unsigned int mask,
159 unsigned long flags; 159 unsigned long flags;
160 struct snd_ctl_file *ctl; 160 struct snd_ctl_file *ctl;
161 struct snd_kctl_event *ev; 161 struct snd_kctl_event *ev;
162 162
163 if (snd_BUG_ON(!card || !id)) 163 if (snd_BUG_ON(!card || !id))
164 return; 164 return;
165 if (card->shutdown) 165 if (card->shutdown)
@@ -213,7 +213,7 @@ static int snd_ctl_new(struct snd_kcontrol **kctl, unsigned int count,
213{ 213{
214 unsigned int size; 214 unsigned int size;
215 unsigned int idx; 215 unsigned int idx;
216 216
217 if (count == 0 || count > MAX_CONTROL_COUNT) 217 if (count == 0 || count > MAX_CONTROL_COUNT)
218 return -EINVAL; 218 return -EINVAL;
219 219
@@ -238,7 +238,7 @@ static int snd_ctl_new(struct snd_kcontrol **kctl, unsigned int count,
238 * @ncontrol: the initialization record 238 * @ncontrol: the initialization record
239 * @private_data: the private data to set 239 * @private_data: the private data to set
240 * 240 *
241 * Allocates a new struct snd_kcontrol instance and initialize from the given 241 * Allocates a new struct snd_kcontrol instance and initialize from the given
242 * template. When the access field of ncontrol is 0, it's assumed as 242 * template. When the access field of ncontrol is 0, it's assumed as
243 * READWRITE access. When the count field is 0, it's assumes as one. 243 * READWRITE access. When the count field is 0, it's assumes as one.
244 * 244 *
@@ -251,7 +251,7 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol,
251 unsigned int count; 251 unsigned int count;
252 unsigned int access; 252 unsigned int access;
253 int err; 253 int err;
254 254
255 if (snd_BUG_ON(!ncontrol || !ncontrol->info)) 255 if (snd_BUG_ON(!ncontrol || !ncontrol->info))
256 return NULL; 256 return NULL;
257 257
@@ -753,7 +753,7 @@ static int snd_ctl_elem_list(struct snd_card *card,
753 struct snd_ctl_elem_id id; 753 struct snd_ctl_elem_id id;
754 unsigned int offset, space, jidx; 754 unsigned int offset, space, jidx;
755 int err = 0; 755 int err = 0;
756 756
757 if (copy_from_user(&list, _list, sizeof(list))) 757 if (copy_from_user(&list, _list, sizeof(list)))
758 return -EFAULT; 758 return -EFAULT;
759 offset = list.offset; 759 offset = list.offset;
@@ -827,7 +827,7 @@ static int snd_ctl_elem_info(struct snd_ctl_file *ctl,
827 struct snd_kcontrol_volatile *vd; 827 struct snd_kcontrol_volatile *vd;
828 unsigned int index_offset; 828 unsigned int index_offset;
829 int result; 829 int result;
830 830
831 down_read(&card->controls_rwsem); 831 down_read(&card->controls_rwsem);
832 kctl = snd_ctl_find_id(card, &info->id); 832 kctl = snd_ctl_find_id(card, &info->id);
833 if (kctl == NULL) { 833 if (kctl == NULL) {
@@ -992,7 +992,7 @@ static int snd_ctl_elem_lock(struct snd_ctl_file *file,
992 struct snd_kcontrol *kctl; 992 struct snd_kcontrol *kctl;
993 struct snd_kcontrol_volatile *vd; 993 struct snd_kcontrol_volatile *vd;
994 int result; 994 int result;
995 995
996 if (copy_from_user(&id, _id, sizeof(id))) 996 if (copy_from_user(&id, _id, sizeof(id)))
997 return -EFAULT; 997 return -EFAULT;
998 down_write(&card->controls_rwsem); 998 down_write(&card->controls_rwsem);
@@ -1020,7 +1020,7 @@ static int snd_ctl_elem_unlock(struct snd_ctl_file *file,
1020 struct snd_kcontrol *kctl; 1020 struct snd_kcontrol *kctl;
1021 struct snd_kcontrol_volatile *vd; 1021 struct snd_kcontrol_volatile *vd;
1022 int result; 1022 int result;
1023 1023
1024 if (copy_from_user(&id, _id, sizeof(id))) 1024 if (copy_from_user(&id, _id, sizeof(id)))
1025 return -EFAULT; 1025 return -EFAULT;
1026 down_write(&card->controls_rwsem); 1026 down_write(&card->controls_rwsem);