X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fwavfront.c;h=e0ecd44a3577e12c1fee3e04eaba5c46b88c7e83;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=e7932229e6b6f4da0d35761df7d49273ebecbf28;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/sound/oss/wavfront.c b/sound/oss/wavfront.c index e7932229e..e0ecd44a3 100644 --- a/sound/oss/wavfront.c +++ b/sound/oss/wavfront.c @@ -312,7 +312,7 @@ static struct { { 0x0E, "Bad MIDI channel number" }, { 0x10, "Download Record Error" }, { 0x80, "Success" }, - { 0x0, 0x0 } + { 0 } }; #define NEEDS_ACK 1 @@ -493,7 +493,7 @@ wavefront_cmd (int cmd, unsigned char *rbuf, unsigned char *wbuf) if (cmd == WFC_DOWNLOAD_MULTISAMPLE) { wfcmd->write_cnt = (unsigned int) rbuf; - rbuf = 0; + rbuf = NULL; } DPRINT (WF_DEBUG_CMD, "0x%x [%s] (%d,%d,%d)\n", @@ -745,7 +745,7 @@ wavefront_delete_sample (int sample_num) wbuf[0] = sample_num & 0x7f; wbuf[1] = sample_num >> 7; - if ((x = wavefront_cmd (WFC_DELETE_SAMPLE, 0, wbuf)) == 0) { + if ((x = wavefront_cmd (WFC_DELETE_SAMPLE, NULL, wbuf)) == 0) { dev.sample_status[sample_num] = WF_ST_EMPTY; } @@ -934,7 +934,7 @@ wavefront_send_patch (wavefront_patch_info *header) bptr = munge_int32 (header->number, buf, 2); munge_buf ((unsigned char *)&header->hdr.p, bptr, WF_PATCH_BYTES); - if (wavefront_cmd (WFC_DOWNLOAD_PATCH, 0, buf)) { + if (wavefront_cmd (WFC_DOWNLOAD_PATCH, NULL, buf)) { printk (KERN_ERR LOGNAME "download patch failed\n"); return -(EIO); } @@ -972,7 +972,7 @@ wavefront_send_program (wavefront_patch_info *header) buf[0] = header->number; munge_buf ((unsigned char *)&header->hdr.pr, &buf[1], WF_PROGRAM_BYTES); - if (wavefront_cmd (WFC_DOWNLOAD_PROGRAM, 0, buf)) { + if (wavefront_cmd (WFC_DOWNLOAD_PROGRAM, NULL, buf)) { printk (KERN_WARNING LOGNAME "download patch failed\n"); return -(EIO); } @@ -986,7 +986,7 @@ wavefront_freemem (void) { char rbuf[8]; - if (wavefront_cmd (WFC_REPORT_FREE_MEMORY, rbuf, 0)) { + if (wavefront_cmd (WFC_REPORT_FREE_MEMORY, rbuf, NULL)) { printk (KERN_WARNING LOGNAME "can't get memory stats.\n"); return -1; } else { @@ -1011,7 +1011,7 @@ wavefront_send_sample (wavefront_patch_info *header, UINT16 sample_short; UINT32 length; - UINT16 __user *data_end = 0; + UINT16 __user *data_end = NULL; unsigned int i; const int max_blksize = 4096/2; unsigned int written; @@ -1188,7 +1188,7 @@ wavefront_send_sample (wavefront_patch_info *header, if (wavefront_cmd (header->size ? WFC_DOWNLOAD_SAMPLE : WFC_DOWNLOAD_SAMPLE_HEADER, - 0, sample_hdr)) { + NULL, sample_hdr)) { printk (KERN_WARNING LOGNAME "sample %sdownload refused.\n", header->size ? "" : "header "); return -(EIO); @@ -1214,7 +1214,7 @@ wavefront_send_sample (wavefront_patch_info *header, blocksize = ((length-written+7)&~0x7); } - if (wavefront_cmd (WFC_DOWNLOAD_BLOCK, 0, 0)) { + if (wavefront_cmd (WFC_DOWNLOAD_BLOCK, NULL, NULL)) { printk (KERN_WARNING LOGNAME "download block " "request refused.\n"); return -(EIO); @@ -1321,7 +1321,7 @@ wavefront_send_alias (wavefront_patch_info *header) munge_int32 (header->hdr.a.FrequencyBias, &alias_hdr[20], 3); munge_int32 (*(&header->hdr.a.FrequencyBias+1), &alias_hdr[23], 2); - if (wavefront_cmd (WFC_DOWNLOAD_SAMPLE_ALIAS, 0, alias_hdr)) { + if (wavefront_cmd (WFC_DOWNLOAD_SAMPLE_ALIAS, NULL, alias_hdr)) { printk (KERN_ERR LOGNAME "download alias failed.\n"); return -(EIO); } @@ -1445,7 +1445,7 @@ wavefront_send_drum (wavefront_patch_info *header) munge_int32 (((unsigned char *)drum)[i], &drumbuf[1+(i*2)], 2); } - if (wavefront_cmd (WFC_DOWNLOAD_EDRUM_PROGRAM, 0, drumbuf)) { + if (wavefront_cmd (WFC_DOWNLOAD_EDRUM_PROGRAM, NULL, drumbuf)) { printk (KERN_ERR LOGNAME "download drum failed.\n"); return -(EIO); } @@ -2738,7 +2738,7 @@ static int __init wavefront_do_reset (int atboot) voices[0] = 32; - if (wavefront_cmd (WFC_SET_NVOICES, 0, voices)) { + if (wavefront_cmd (WFC_SET_NVOICES, NULL, voices)) { printk (KERN_WARNING LOGNAME "cannot set number of voices to 32.\n"); goto gone_bad;