]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/control.c
[SCSI] fix for fc transport recursion problem.
[linux-2.6-omap-h63xx.git] / sound / core / control.c
index 227f3cf02771605d11e8ddd32c565bc902d75d7d..212c46a94376c29cf303f225c4d7036d7e32842c 100644 (file)
@@ -69,7 +69,7 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
                err = -EFAULT;
                goto __error2;
        }
-       ctl = kcalloc(1, sizeof(*ctl), GFP_KERNEL);
+       ctl = kzalloc(sizeof(*ctl), GFP_KERNEL);
        if (ctl == NULL) {
                err = -ENOMEM;
                goto __error;
@@ -144,7 +144,7 @@ void snd_ctl_notify(snd_card_t *card, unsigned int mask, snd_ctl_elem_id_t *id)
        snd_ctl_file_t *ctl;
        snd_kctl_event_t *ev;
        
-       snd_runtime_check(card != NULL && id != NULL, return);
+       snd_assert(card != NULL && id != NULL, return);
        read_lock(&card->ctl_files_rwlock);
 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
        card->mixer_oss_change_count++;
@@ -162,7 +162,7 @@ void snd_ctl_notify(snd_card_t *card, unsigned int mask, snd_ctl_elem_id_t *id)
                                goto _found;
                        }
                }
-               ev = kcalloc(1, sizeof(*ev), GFP_ATOMIC);
+               ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
                if (ev) {
                        ev->id = *id;
                        ev->mask = mask;
@@ -193,9 +193,9 @@ snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * control, unsigned int access)
        snd_kcontrol_t *kctl;
        unsigned int idx;
        
-       snd_runtime_check(control != NULL, return NULL);
-       snd_runtime_check(control->count > 0, return NULL);
-       kctl = kcalloc(1, sizeof(*kctl) + sizeof(snd_kcontrol_volatile_t) * control->count, GFP_KERNEL);
+       snd_assert(control != NULL, return NULL);
+       snd_assert(control->count > 0, return NULL);
+       kctl = kzalloc(sizeof(*kctl) + sizeof(snd_kcontrol_volatile_t) * control->count, GFP_KERNEL);
        if (kctl == NULL)
                return NULL;
        *kctl = *control;
@@ -220,7 +220,7 @@ snd_kcontrol_t *snd_ctl_new1(const snd_kcontrol_new_t * ncontrol, void *private_
        snd_kcontrol_t kctl;
        unsigned int access;
        
-       snd_runtime_check(ncontrol != NULL, return NULL);
+       snd_assert(ncontrol != NULL, return NULL);
        snd_assert(ncontrol->info != NULL, return NULL);
        memset(&kctl, 0, sizeof(kctl));
        kctl.id.iface = ncontrol->iface;
@@ -309,7 +309,7 @@ int snd_ctl_add(snd_card_t * card, snd_kcontrol_t * kcontrol)
        snd_ctl_elem_id_t id;
        unsigned int idx;
 
-       snd_runtime_check(card != NULL && kcontrol != NULL, return -EINVAL);
+       snd_assert(card != NULL && kcontrol != NULL, return -EINVAL);
        snd_assert(kcontrol->info != NULL, return -EINVAL);
        id = kcontrol->id;
        down_write(&card->controls_rwsem);
@@ -355,7 +355,7 @@ int snd_ctl_remove(snd_card_t * card, snd_kcontrol_t * kcontrol)
        snd_ctl_elem_id_t id;
        unsigned int idx;
 
-       snd_runtime_check(card != NULL && kcontrol != NULL, return -EINVAL);
+       snd_assert(card != NULL && kcontrol != NULL, return -EINVAL);
        list_del(&kcontrol->list);
        card->controls_count -= kcontrol->count;
        id = kcontrol->id;
@@ -468,7 +468,7 @@ snd_kcontrol_t *snd_ctl_find_numid(snd_card_t * card, unsigned int numid)
        struct list_head *list;
        snd_kcontrol_t *kctl;
 
-       snd_runtime_check(card != NULL && numid != 0, return NULL);
+       snd_assert(card != NULL && numid != 0, return NULL);
        list_for_each(list, &card->controls) {
                kctl = snd_kcontrol(list);
                if (kctl->id.numid <= numid && kctl->id.numid + kctl->count > numid)
@@ -494,7 +494,7 @@ snd_kcontrol_t *snd_ctl_find_id(snd_card_t * card, snd_ctl_elem_id_t *id)
        struct list_head *list;
        snd_kcontrol_t *kctl;
 
-       snd_runtime_check(card != NULL && id != NULL, return NULL);
+       snd_assert(card != NULL && id != NULL, return NULL);
        if (id->numid != 0)
                return snd_ctl_find_numid(card, id->numid);
        list_for_each(list, &card->controls) {
@@ -521,7 +521,7 @@ static int snd_ctl_card_info(snd_card_t * card, snd_ctl_file_t * ctl,
 {
        snd_ctl_card_info_t *info;
 
-       info = kcalloc(1, sizeof(*info), GFP_KERNEL);
+       info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (! info)
                return -ENOMEM;
        down_read(&snd_ioctl_rwsem);
@@ -929,7 +929,7 @@ static int snd_ctl_elem_add(snd_ctl_file_t *file, snd_ctl_elem_info_t *info, int
                return -EINVAL;
        }
        private_size *= info->count;
-       ue = kcalloc(1, sizeof(struct user_element) + private_size, GFP_KERNEL);
+       ue = kzalloc(sizeof(struct user_element) + private_size, GFP_KERNEL);
        if (ue == NULL)
                return -ENOMEM;
        ue->info = *info;
@@ -1185,7 +1185,7 @@ static int _snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn, struct list_head *
 {
        snd_kctl_ioctl_t *pn;
 
-       pn = kcalloc(1, sizeof(snd_kctl_ioctl_t), GFP_KERNEL);
+       pn = kzalloc(sizeof(snd_kctl_ioctl_t), GFP_KERNEL);
        if (pn == NULL)
                return -ENOMEM;
        pn->fioctl = fcn;
@@ -1215,7 +1215,7 @@ static int _snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn, struct list_head
        struct list_head *list;
        snd_kctl_ioctl_t *p;
 
-       snd_runtime_check(fcn != NULL, return -EINVAL);
+       snd_assert(fcn != NULL, return -EINVAL);
        down_write(&snd_ioctl_rwsem);
        list_for_each(list, lists) {
                p = list_entry(list, snd_kctl_ioctl_t, list);