X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sound%2Fpci%2Fmixart%2Fmixart_core.c;h=785085e48353c3111f4e29085be77ade17298750;hb=b17b3d479c4c43c3a980ee553c3be3ca456523de;hp=07c707d7ebbfee43922ce0ce458a78d65c4899ff;hpb=123656d4cc8c946f578ebd18c2050f5251720428;p=linux-2.6 diff --git a/sound/pci/mixart/mixart_core.c b/sound/pci/mixart/mixart_core.c index 07c707d7eb..785085e483 100644 --- a/sound/pci/mixart/mixart_core.c +++ b/sound/pci/mixart/mixart_core.c @@ -20,8 +20,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include +#include + #include #include #include "mixart.h" @@ -239,7 +240,7 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int wait_queue_t wait; long timeout; - down(&mgr->msg_mutex); + mutex_lock(&mgr->msg_mutex); init_waitqueue_entry(&wait, current); @@ -248,7 +249,7 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int err = send_msg(mgr, request, max_resp_size, 1, &msg_frame); /* send and mark the answer pending */ if (err) { spin_unlock_irq(&mgr->msg_lock); - up(&mgr->msg_mutex); + mutex_unlock(&mgr->msg_mutex); return err; } @@ -260,7 +261,7 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int if (! timeout) { /* error - no ack */ - up(&mgr->msg_mutex); + mutex_unlock(&mgr->msg_mutex); snd_printk(KERN_ERR "error: no reponse on msg %x\n", msg_frame); return -EIO; } @@ -276,7 +277,7 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int if( request->message_id != resp.message_id ) snd_printk(KERN_ERR "REPONSE ERROR!\n"); - up(&mgr->msg_mutex); + mutex_unlock(&mgr->msg_mutex); return err; } @@ -292,7 +293,7 @@ int snd_mixart_send_msg_wait_notif(struct mixart_mgr *mgr, snd_assert((notif_event & MSG_TYPE_MASK) == MSG_TYPE_NOTIFY, return -EINVAL); snd_assert((notif_event & MSG_CANCEL_NOTIFY_MASK) == 0, return -EINVAL); - down(&mgr->msg_mutex); + mutex_lock(&mgr->msg_mutex); init_waitqueue_entry(&wait, current); @@ -301,7 +302,7 @@ int snd_mixart_send_msg_wait_notif(struct mixart_mgr *mgr, err = send_msg(mgr, request, MSG_DEFAULT_SIZE, 1, ¬if_event); /* send and mark the notification event pending */ if(err) { spin_unlock_irq(&mgr->msg_lock); - up(&mgr->msg_mutex); + mutex_unlock(&mgr->msg_mutex); return err; } @@ -313,12 +314,12 @@ int snd_mixart_send_msg_wait_notif(struct mixart_mgr *mgr, if (! timeout) { /* error - no ack */ - up(&mgr->msg_mutex); + mutex_unlock(&mgr->msg_mutex); snd_printk(KERN_ERR "error: notification %x not received\n", notif_event); return -EIO; } - up(&mgr->msg_mutex); + mutex_unlock(&mgr->msg_mutex); return 0; } @@ -406,7 +407,7 @@ void snd_mixart_msg_tasklet(unsigned long arg) } -irqreturn_t snd_mixart_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t snd_mixart_interrupt(int irq, void *dev_id) { struct mixart_mgr *mgr = dev_id; int err;