Merge branch 'topic/misc' into for-linus
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 Mar 2009 23:35:50 +0000 (00:35 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Mar 2009 23:35:50 +0000 (00:35 +0100)
25 files changed:
1  2 
include/sound/pcm.h
sound/arm/sa11xx-uda1341.c
sound/core/oss/pcm_oss.c
sound/core/pcm.c
sound/drivers/mtpav.c
sound/drivers/mts64.c
sound/drivers/pcsp/pcsp.c
sound/drivers/serial-u16550.c
sound/drivers/virmidi.c
sound/mips/au1x00.c
sound/pci/ali5451/ali5451.c
sound/pci/als300.c
sound/pci/azt3328.c
sound/pci/ca0106/ca0106_main.c
sound/pci/cs4281.c
sound/pci/cs5535audio/cs5535audio.c
sound/pci/ens1370.c
sound/pci/es1938.c
sound/pci/mixart/mixart_hwdep.c
sound/pci/sonicvibes.c
sound/pci/via82xx.c
sound/pci/via82xx_modem.c
sound/sparc/amd7930.c
sound/usb/usx2y/usX2Yhwdep.c
sound/usb/usx2y/usbusx2y.c

diff --combined include/sound/pcm.h
index e4f60076e6c4004c2c56a653fee1f24fea6278bf,ee0e887e49d48cc00015aa8505e2ef10c09c48a8..8904b1900d7ffa7969bf82603a9142dc8d2f7807
@@@ -364,6 -364,7 +364,6 @@@ struct snd_pcm_substream 
          /* -- timer section -- */
        struct snd_timer *timer;                /* timer */
        unsigned timer_running: 1;      /* time is running */
 -      spinlock_t timer_lock;
        /* -- next substream -- */
        struct snd_pcm_substream *next;
        /* -- linked substreams -- */
@@@ -450,7 -451,7 +450,7 @@@ struct snd_pcm_notify 
  
  extern const struct file_operations snd_pcm_f_ops[2];
  
- int snd_pcm_new(struct snd_card *card, char *id, int device,
+ int snd_pcm_new(struct snd_card *card, const char *id, int device,
                int playback_count, int capture_count,
                struct snd_pcm **rpcm);
  int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count);
index 51d708c31e6586a50414a8ceec47cdec8794f0f4,ed481a866a3e7f1910b0f1bc8860a3ec9d1df4ee..7101d3d8bae61d4e73342ac169fb901a8518d681
@@@ -887,10 -887,9 +887,10 @@@ static int __devinit sa11xx_uda1341_pro
        struct sa11xx_uda1341 *chip;
  
        /* register the soundcard */
 -      card = snd_card_new(-1, id, THIS_MODULE, sizeof(struct sa11xx_uda1341));
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(-1, id, THIS_MODULE,
 +                            sizeof(struct sa11xx_uda1341), &card);
 +      if (err < 0)
 +              return err;
  
        chip = card->private_data;
        spin_lock_init(&chip->s[0].dma_lock);
        snd_card_set_dev(card, &devptr->dev);
  
        if ((err = snd_card_register(card)) == 0) {
-               printk( KERN_INFO "iPAQ audio support initialized\n" );
+               printk(KERN_INFO "iPAQ audio support initialized\n");
                platform_set_drvdata(devptr, card);
                return 0;
        }
diff --combined sound/core/oss/pcm_oss.c
index 699d2890535ccb9a5280ce6173980308602d6c26,4b883595a85acb7f48f0a306c3408f1d36bb0bbe..2864cefb773c0af4323fceb6929f2ac3337424a0
@@@ -1160,9 -1160,11 +1160,11 @@@ snd_pcm_sframes_t snd_pcm_oss_write3(st
                    runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
  #ifdef OSS_DEBUG
                        if (runtime->status->state == SNDRV_PCM_STATE_XRUN)
-                               printk("pcm_oss: write: recovering from XRUN\n");
+                               printk(KERN_DEBUG "pcm_oss: write: "
+                                      "recovering from XRUN\n");
                        else
-                               printk("pcm_oss: write: recovering from SUSPEND\n");
+                               printk(KERN_DEBUG "pcm_oss: write: "
+                                      "recovering from SUSPEND\n");
  #endif
                        ret = snd_pcm_oss_prepare(substream);
                        if (ret < 0)
@@@ -1196,9 -1198,11 +1198,11 @@@ snd_pcm_sframes_t snd_pcm_oss_read3(str
                    runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
  #ifdef OSS_DEBUG
                        if (runtime->status->state == SNDRV_PCM_STATE_XRUN)
-                               printk("pcm_oss: read: recovering from XRUN\n");
+                               printk(KERN_DEBUG "pcm_oss: read: "
+                                      "recovering from XRUN\n");
                        else
-                               printk("pcm_oss: read: recovering from SUSPEND\n");
+                               printk(KERN_DEBUG "pcm_oss: read: "
+                                      "recovering from SUSPEND\n");
  #endif
                        ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL);
                        if (ret < 0)
@@@ -1242,9 -1246,11 +1246,11 @@@ snd_pcm_sframes_t snd_pcm_oss_writev3(s
                    runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
  #ifdef OSS_DEBUG
                        if (runtime->status->state == SNDRV_PCM_STATE_XRUN)
-                               printk("pcm_oss: writev: recovering from XRUN\n");
+                               printk(KERN_DEBUG "pcm_oss: writev: "
+                                      "recovering from XRUN\n");
                        else
-                               printk("pcm_oss: writev: recovering from SUSPEND\n");
+                               printk(KERN_DEBUG "pcm_oss: writev: "
+                                      "recovering from SUSPEND\n");
  #endif
                        ret = snd_pcm_oss_prepare(substream);
                        if (ret < 0)
@@@ -1278,9 -1284,11 +1284,11 @@@ snd_pcm_sframes_t snd_pcm_oss_readv3(st
                    runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
  #ifdef OSS_DEBUG
                        if (runtime->status->state == SNDRV_PCM_STATE_XRUN)
-                               printk("pcm_oss: readv: recovering from XRUN\n");
+                               printk(KERN_DEBUG "pcm_oss: readv: "
+                                      "recovering from XRUN\n");
                        else
-                               printk("pcm_oss: readv: recovering from SUSPEND\n");
+                               printk(KERN_DEBUG "pcm_oss: readv: "
+                                      "recovering from SUSPEND\n");
  #endif
                        ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL);
                        if (ret < 0)
@@@ -1533,7 -1541,7 +1541,7 @@@ static int snd_pcm_oss_sync1(struct snd
        init_waitqueue_entry(&wait, current);
        add_wait_queue(&runtime->sleep, &wait);
  #ifdef OSS_DEBUG
-       printk("sync1: size = %li\n", size);
+       printk(KERN_DEBUG "sync1: size = %li\n", size);
  #endif
        while (1) {
                result = snd_pcm_oss_write2(substream, runtime->oss.buffer, size, 1);
@@@ -1590,7 -1598,7 +1598,7 @@@ static int snd_pcm_oss_sync(struct snd_
                mutex_lock(&runtime->oss.params_lock);
                if (runtime->oss.buffer_used > 0) {
  #ifdef OSS_DEBUG
-                       printk("sync: buffer_used\n");
+                       printk(KERN_DEBUG "sync: buffer_used\n");
  #endif
                        size = (8 * (runtime->oss.period_bytes - runtime->oss.buffer_used) + 7) / width;
                        snd_pcm_format_set_silence(format,
                        }
                } else if (runtime->oss.period_ptr > 0) {
  #ifdef OSS_DEBUG
-                       printk("sync: period_ptr\n");
+                       printk(KERN_DEBUG "sync: period_ptr\n");
  #endif
                        size = runtime->oss.period_bytes - runtime->oss.period_ptr;
                        snd_pcm_format_set_silence(format,
@@@ -1767,7 -1775,7 +1775,7 @@@ static int snd_pcm_oss_get_formats(stru
                       AFMT_S8 | AFMT_U16_LE |
                       AFMT_U16_BE |
                        AFMT_S32_LE | AFMT_S32_BE |
 -                      AFMT_S24_LE | AFMT_S24_LE |
 +                      AFMT_S24_LE | AFMT_S24_BE |
                        AFMT_S24_PACKED;
        params = kmalloc(sizeof(*params), GFP_KERNEL);
        if (!params)
@@@ -1952,7 -1960,7 +1960,7 @@@ static int snd_pcm_oss_set_trigger(stru
        int err, cmd;
  
  #ifdef OSS_DEBUG
-       printk("pcm_oss: trigger = 0x%x\n", trigger);
+       printk(KERN_DEBUG "pcm_oss: trigger = 0x%x\n", trigger);
  #endif
        
        psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
@@@ -2170,7 -2178,9 +2178,9 @@@ static int snd_pcm_oss_get_space(struc
        }
  
  #ifdef OSS_DEBUG
-       printk("pcm_oss: space: bytes = %i, fragments = %i, fragstotal = %i, fragsize = %i\n", info.bytes, info.fragments, info.fragstotal, info.fragsize);
+       printk(KERN_DEBUG "pcm_oss: space: bytes = %i, fragments = %i, "
+              "fragstotal = %i, fragsize = %i\n",
+              info.bytes, info.fragments, info.fragstotal, info.fragsize);
  #endif
        if (copy_to_user(_info, &info, sizeof(info)))
                return -EFAULT;
@@@ -2473,7 -2483,7 +2483,7 @@@ static long snd_pcm_oss_ioctl(struct fi
        if (((cmd >> 8) & 0xff) != 'P')
                return -EINVAL;
  #ifdef OSS_DEBUG
-       printk("pcm_oss: ioctl = 0x%x\n", cmd);
+       printk(KERN_DEBUG "pcm_oss: ioctl = 0x%x\n", cmd);
  #endif
        switch (cmd) {
        case SNDCTL_DSP_RESET:
@@@ -2627,7 -2637,8 +2637,8 @@@ static ssize_t snd_pcm_oss_read(struct 
  #else
        {
                ssize_t res = snd_pcm_oss_read1(substream, buf, count);
-               printk("pcm_oss: read %li bytes (returned %li bytes)\n", (long)count, (long)res);
+               printk(KERN_DEBUG "pcm_oss: read %li bytes "
+                      "(returned %li bytes)\n", (long)count, (long)res);
                return res;
        }
  #endif
@@@ -2646,7 -2657,8 +2657,8 @@@ static ssize_t snd_pcm_oss_write(struc
        substream->f_flags = file->f_flags & O_NONBLOCK;
        result = snd_pcm_oss_write1(substream, buf, count);
  #ifdef OSS_DEBUG
-       printk("pcm_oss: write %li bytes (wrote %li bytes)\n", (long)count, (long)result);
+       printk(KERN_DEBUG "pcm_oss: write %li bytes (wrote %li bytes)\n",
+              (long)count, (long)result);
  #endif
        return result;
  }
@@@ -2720,7 -2732,7 +2732,7 @@@ static int snd_pcm_oss_mmap(struct fil
        int err;
  
  #ifdef OSS_DEBUG
-       printk("pcm_oss: mmap begin\n");
+       printk(KERN_DEBUG "pcm_oss: mmap begin\n");
  #endif
        pcm_oss_file = file->private_data;
        switch ((area->vm_flags & (VM_READ | VM_WRITE))) {
        runtime->silence_threshold = 0;
        runtime->silence_size = 0;
  #ifdef OSS_DEBUG
-       printk("pcm_oss: mmap ok, bytes = 0x%x\n", runtime->oss.mmap_bytes);
+       printk(KERN_DEBUG "pcm_oss: mmap ok, bytes = 0x%x\n",
+              runtime->oss.mmap_bytes);
  #endif
        /* In mmap mode we never stop */
        runtime->stop_threshold = runtime->boundary;
@@@ -2872,7 -2885,7 +2885,7 @@@ static void snd_pcm_oss_proc_write(stru
                        setup = kmalloc(sizeof(*setup), GFP_KERNEL);
                        if (! setup) {
                                buffer->error = -ENOMEM;
 -                              mutex_lock(&pstr->oss.setup_mutex);
 +                              mutex_unlock(&pstr->oss.setup_mutex);
                                return;
                        }
                        if (pstr->oss.setup_list == NULL)
                        if (! template.task_name) {
                                kfree(setup);
                                buffer->error = -ENOMEM;
 -                              mutex_lock(&pstr->oss.setup_mutex);
 +                              mutex_unlock(&pstr->oss.setup_mutex);
                                return;
                        }
                }
diff --combined sound/core/pcm.c
index 37f567a68ef20d9b156a96901a3949f9c92d181a,583453e2355c94a850bfddb429a1878fc221d08a..145931a9ff302fa6b696a137b1036d8a125c540a
@@@ -667,6 -667,7 +667,6 @@@ int snd_pcm_new_stream(struct snd_pcm *
                spin_lock_init(&substream->self_group.lock);
                INIT_LIST_HEAD(&substream->self_group.substreams);
                list_add_tail(&substream->link_list, &substream->self_group.substreams);
 -              spin_lock_init(&substream->timer_lock);
                atomic_set(&substream->mmap_count, 0);
                prev = substream;
        }
@@@ -691,7 -692,7 +691,7 @@@ EXPORT_SYMBOL(snd_pcm_new_stream)
   *
   * Returns zero if successful, or a negative error code on failure.
   */
- int snd_pcm_new(struct snd_card *card, char *id, int device,
+ int snd_pcm_new(struct snd_card *card, const char *id, int device,
                int playback_count, int capture_count,
                struct snd_pcm ** rpcm)
  {
diff --combined sound/drivers/mtpav.c
index 0e17d2b5ce19bedbee5f6d35fe076949283dd143,6b26305ff0e673def576f69a3d80c38773316c98..2f8f295d6b0cc731885c82d6907172a1a577788d
@@@ -303,8 -303,10 +303,10 @@@ static void snd_mtpav_output_port_write
  
                snd_mtpav_send_byte(mtp_card, 0xf5);
                snd_mtpav_send_byte(mtp_card, portp->hwport);
-               //snd_printk("new outport: 0x%x\n", (unsigned int) portp->hwport);
+               /*
+               snd_printk(KERN_DEBUG "new outport: 0x%x\n",
+                          (unsigned int) portp->hwport);
+               */
                if (!(outbyte & 0x80) && portp->running_status)
                        snd_mtpav_send_byte(mtp_card, portp->running_status);
        }
@@@ -540,7 -542,7 +542,7 @@@ static void snd_mtpav_read_bytes(struc
  
        u8 sbyt = snd_mtpav_getreg(mcrd, SREG);
  
-       //printk("snd_mtpav_read_bytes() sbyt: 0x%x\n", sbyt);
+       /* printk(KERN_DEBUG "snd_mtpav_read_bytes() sbyt: 0x%x\n", sbyt); */
  
        if (!(sbyt & SIGS_BYTE))
                return;
@@@ -585,12 -587,12 +587,12 @@@ static irqreturn_t snd_mtpav_irqh(int i
  static int __devinit snd_mtpav_get_ISA(struct mtpav * mcard)
  {
        if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
-               snd_printk("MTVAP port 0x%lx is busy\n", port);
+               snd_printk(KERN_ERR "MTVAP port 0x%lx is busy\n", port);
                return -EBUSY;
        }
        mcard->port = port;
        if (request_irq(irq, snd_mtpav_irqh, IRQF_DISABLED, "MOTU MTPAV", mcard)) {
-               snd_printk("MTVAP IRQ %d busy\n", irq);
+               snd_printk(KERN_ERR "MTVAP IRQ %d busy\n", irq);
                return -EBUSY;
        }
        mcard->irq = irq;
@@@ -696,9 -698,9 +698,9 @@@ static int __devinit snd_mtpav_probe(st
        int err;
        struct mtpav *mtp_card;
  
 -      card = snd_card_new(index, id, THIS_MODULE, sizeof(*mtp_card));
 -      if (! card)
 -              return -ENOMEM;
 +      err = snd_card_create(index, id, THIS_MODULE, sizeof(*mtp_card), &card);
 +      if (err < 0)
 +              return err;
  
        mtp_card = card->private_data;
        spin_lock_init(&mtp_card->spinlock);
        mtp_card->card = card;
        mtp_card->irq = -1;
        mtp_card->share_irq = 0;
 -      mtp_card->inmidiport = 0xffffffff;
        mtp_card->inmidistate = 0;
        mtp_card->outmidihwport = 0xffffffff;
        init_timer(&mtp_card->timer);
        if (err < 0)
                goto __error;
  
 +      mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST;
 +
        err = snd_mtpav_get_ISA(mtp_card);
        if (err < 0)
                goto __error;
diff --combined sound/drivers/mts64.c
index 33d9db782e07e4d85ac62c9c89a4ee485a894056,1a05b2d64c9b3b278175654c643c2a7bbb5ed00d..9284829bf9275e9c2afabbbe8e2026c35c2dfb60
@@@ -957,10 -957,10 +957,10 @@@ static int __devinit snd_mts64_probe(st
        if ((err = snd_mts64_probe_port(p)) < 0)
                return err;
  
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 -      if (card == NULL) {
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 +      if (err < 0) {
                snd_printd("Cannot create card\n");
 -              return -ENOMEM;
 +              return err;
        }
        strcpy(card->driver, DRIVER_NAME);
        strcpy(card->shortname, "ESI " CARD_NAME);
                goto __err;
        }
  
-       snd_printk("ESI Miditerminal 4140 on 0x%lx\n", p->base);
+       snd_printk(KERN_INFO "ESI Miditerminal 4140 on 0x%lx\n", p->base);
        return 0;
  
  __err:
index aa2ae07a76d563fb5e8d64fdec7606570a0ed569,c7c744c6fc0b39b34c01855f052bcb86fc91b609..b60cef257b589288a7339157bfdbc9e009b5c5bb
@@@ -57,7 -57,7 +57,7 @@@ static int __devinit snd_pcsp_create(st
        else
                min_div = MAX_DIV;
  #if PCSP_DEBUG
-       printk("PCSP: lpj=%li, min_div=%i, res=%li\n",
+       printk(KERN_DEBUG "PCSP: lpj=%li, min_div=%i, res=%li\n",
               loops_per_jiffy, min_div, tp.tv_nsec);
  #endif
  
@@@ -98,9 -98,9 +98,9 @@@ static int __devinit snd_card_pcsp_prob
        hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
        pcsp_chip.timer.function = pcsp_do_timer;
  
 -      card = snd_card_new(index, id, THIS_MODULE, 0);
 -      if (!card)
 -              return -ENOMEM;
 +      err = snd_card_create(index, id, THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        err = snd_pcsp_create(card);
        if (err < 0) {
index 891d081e4825d780f3ce78e3622477bf2e24060d,ff0a41510945d1056de78797d18626e4570e1c1c..b2b6d50c942559fcb14474ff1e8281ae947e4db4
@@@ -241,7 -241,8 +241,8 @@@ static void snd_uart16550_io_loop(struc
                        snd_rawmidi_receive(uart->midi_input[substream], &c, 1);
  
                if (status & UART_LSR_OE)
-                       snd_printk("%s: Overrun on device at 0x%lx\n",
+                       snd_printk(KERN_WARNING
+                                  "%s: Overrun on device at 0x%lx\n",
                               uart->rmidi->name, uart->base);
        }
  
@@@ -636,7 -637,8 +637,8 @@@ static int snd_uart16550_output_byte(st
                }
        } else {
                if (!snd_uart16550_write_buffer(uart, midi_byte)) {
-                       snd_printk("%s: Buffer overrun on device at 0x%lx\n",
+                       snd_printk(KERN_WARNING
+                                  "%s: Buffer overrun on device at 0x%lx\n",
                                   uart->rmidi->name, uart->base);
                        return 0;
                }
@@@ -815,7 -817,8 +817,8 @@@ static int __devinit snd_uart16550_crea
        if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
                if (request_irq(irq, snd_uart16550_interrupt,
                                IRQF_DISABLED, "Serial MIDI", uart)) {
-                       snd_printk("irq %d busy. Using Polling.\n", irq);
+                       snd_printk(KERN_WARNING
+                                  "irq %d busy. Using Polling.\n", irq);
                } else {
                        uart->irq = irq;
                }
@@@ -919,26 -922,29 +922,29 @@@ static int __devinit snd_serial_probe(s
        case SNDRV_SERIAL_GENERIC:
                break;
        default:
-               snd_printk("Adaptor type is out of range 0-%d (%d)\n",
+               snd_printk(KERN_ERR
+                          "Adaptor type is out of range 0-%d (%d)\n",
                           SNDRV_SERIAL_MAX_ADAPTOR, adaptor[dev]);
                return -ENODEV;
        }
  
        if (outs[dev] < 1 || outs[dev] > SNDRV_SERIAL_MAX_OUTS) {
-               snd_printk("Count of outputs is out of range 1-%d (%d)\n",
+               snd_printk(KERN_ERR
+                          "Count of outputs is out of range 1-%d (%d)\n",
                           SNDRV_SERIAL_MAX_OUTS, outs[dev]);
                return -ENODEV;
        }
  
        if (ins[dev] < 1 || ins[dev] > SNDRV_SERIAL_MAX_INS) {
-               snd_printk("Count of inputs is out of range 1-%d (%d)\n",
+               snd_printk(KERN_ERR
+                          "Count of inputs is out of range 1-%d (%d)\n",
                           SNDRV_SERIAL_MAX_INS, ins[dev]);
                return -ENODEV;
        }
  
 -      card  = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err  = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        strcpy(card->driver, "Serial");
        strcpy(card->shortname, "Serial MIDI (UART16550A)");
diff --combined sound/drivers/virmidi.c
index 6f48711818f33eff1ea78d7ec5cca29b6e6dd835,1022e365606ff6c5607017c3b467cac0168aba83..0e631c3221e3b72f46b2b1b11569d5931ead1097
@@@ -90,15 -90,17 +90,17 @@@ static int __devinit snd_virmidi_probe(
        int idx, err;
        int dev = devptr->id;
  
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 -                          sizeof(struct snd_card_virmidi));
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE,
 +                            sizeof(struct snd_card_virmidi), &card);
 +      if (err < 0)
 +              return err;
        vmidi = (struct snd_card_virmidi *)card->private_data;
        vmidi->card = card;
  
        if (midi_devs[dev] > MAX_MIDI_DEVICES) {
-               snd_printk("too much midi devices for virmidi %d: force to use %d\n", dev, MAX_MIDI_DEVICES);
+               snd_printk(KERN_WARNING
+                          "too much midi devices for virmidi %d: "
+                          "force to use %d\n", dev, MAX_MIDI_DEVICES);
                midi_devs[dev] = MAX_MIDI_DEVICES;
        }
        for (idx = 0; idx < midi_devs[dev]; idx++) {
diff --combined sound/mips/au1x00.c
index 99e1391b2eb42ffce2d7425621afa0c26134e770,7c1afc96ab87c575d6b68921376728bb0332eaa7..3e763d6a5d67802d6f736e4df0dccfd88eff2224
@@@ -636,10 -636,9 +636,10 @@@ au1000_init(void
        struct snd_card *card;
        struct snd_au1000 *au1000;
  
 -      card = snd_card_new(-1, "AC97", THIS_MODULE, sizeof(struct snd_au1000));
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(-1, "AC97", THIS_MODULE,
 +                            sizeof(struct snd_au1000), &card);
 +      if (err < 0)
 +              return err;
  
        card->private_free = snd_au1000_free;
        au1000 = card->private_data;
                return err;
        }
  
-       printk( KERN_INFO "ALSA AC97: Driver Initialized\n" );
+       printk(KERN_INFO "ALSA AC97: Driver Initialized\n");
        au1000_card = card;
        return 0;
  }
index b36c551da566de2b73386727487c669c72360eda,9069c78c2dc7c04791bd038a66fda3ec472709de..4edf270a7809c3b20fa5997caf23acd42bb72968
@@@ -2142,7 -2142,7 +2142,7 @@@ static int __devinit snd_ali_resources(
  {
        int err;
  
-       snd_ali_printk("resouces allocation ...\n");
+       snd_ali_printk("resources allocation ...\n");
        err = pci_request_regions(codec->pci, "ALI 5451");
        if (err < 0)
                return err;
                return -EBUSY;
        }
        codec->irq = codec->pci->irq;
-       snd_ali_printk("resouces allocated.\n");
+       snd_ali_printk("resources allocated.\n");
        return 0;
  }
  static int snd_ali_dev_free(struct snd_device *device)
@@@ -2307,9 -2307,9 +2307,9 @@@ static int __devinit snd_ali_probe(stru
  
        snd_ali_printk("probe ...\n");
  
 -      card = snd_card_new(index, id, THIS_MODULE, 0);
 -      if (!card)
 -              return -ENOMEM;
 +      err = snd_card_create(index, id, THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        err = snd_ali_create(card, pci, pcm_channels, spdif, &codec);
        if (err < 0)
diff --combined sound/pci/als300.c
index f557c155db482da8e83d163bd6059d9930621ad4,a2c35c1081c3c39977b40830884f52d3967dd552..009b4c8225a5b976f6f2437c70c8664bfeb81daf
@@@ -91,7 -91,7 +91,7 @@@
  #define DEBUG_PLAY_REC        0
  
  #if DEBUG_CALLS
- #define snd_als300_dbgcalls(format, args...) printk(format, ##args)
+ #define snd_als300_dbgcalls(format, args...) printk(KERN_DEBUG format, ##args)
  #define snd_als300_dbgcallenter() printk(KERN_ERR "--> %s\n", __func__)
  #define snd_als300_dbgcallleave() printk(KERN_ERR "<-- %s\n", __func__)
  #else
@@@ -812,10 -812,10 +812,10 @@@ static int __devinit snd_als300_probe(s
                return -ENOENT;
        }
  
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
  
 -      if (card == NULL)
 -              return -ENOMEM;
 +      if (err < 0)
 +              return err;
  
        chip_type = pci_id->driver_data;
  
diff --combined sound/pci/azt3328.c
index 1df96e76c4832146eec9110be12f4fbe54b8099a,8121763b0c104d6145366372987729b7a8e8cb69..e9e9b5821d41f1c4287b96a1115a11a928b534e4
@@@ -211,25 -211,25 +211,25 @@@ MODULE_SUPPORTED_DEVICE("{{Aztech,AZF33
  #endif
  
  #if DEBUG_MIXER
- #define snd_azf3328_dbgmixer(format, args...) printk(format, ##args)
+ #define snd_azf3328_dbgmixer(format, args...) printk(KERN_DEBUG format, ##args)
  #else
  #define snd_azf3328_dbgmixer(format, args...)
  #endif
  
  #if DEBUG_PLAY_REC
- #define snd_azf3328_dbgplay(format, args...) printk(KERN_ERR format, ##args)
+ #define snd_azf3328_dbgplay(format, args...) printk(KERN_DEBUG format, ##args)
  #else
  #define snd_azf3328_dbgplay(format, args...)
  #endif
  
  #if DEBUG_MISC
- #define snd_azf3328_dbgtimer(format, args...) printk(KERN_ERR format, ##args)
+ #define snd_azf3328_dbgtimer(format, args...) printk(KERN_DEBUG format, ##args)
  #else
  #define snd_azf3328_dbgtimer(format, args...)
  #endif
  
  #if DEBUG_GAME
- #define snd_azf3328_dbggame(format, args...) printk(KERN_ERR format, ##args)
+ #define snd_azf3328_dbggame(format, args...) printk(KERN_DEBUG format, ##args)
  #else
  #define snd_azf3328_dbggame(format, args...)
  #endif
@@@ -2216,9 -2216,9 +2216,9 @@@ snd_azf3328_probe(struct pci_dev *pci, 
                return -ENOENT;
        }
  
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        strcpy(card->driver, "AZF3328");
        strcpy(card->shortname, "Aztech AZF3328 (PCI168)");
index b116456e77071ea75ba27e995c98ca4adb933ca8,f2f8fd17ea4d372746195d0d3770147c0e0acef0..a38ff9dd07eb020b91eb7c259b03a5bf1d076f8d
@@@ -404,7 -404,9 +404,9 @@@ int snd_ca0106_i2c_write(struct snd_ca0
        }
  
        tmp = reg << 25 | value << 16;
-       // snd_printk("I2C-write:reg=0x%x, value=0x%x\n", reg, value);
+       /*
+       snd_printk(KERN_DEBUG "I2C-write:reg=0x%x, value=0x%x\n", reg, value);
+       */
        /* Not sure what this I2C channel controls. */
        /* snd_ca0106_ptr_write(emu, I2C_D0, 0, tmp); */
  
                /* Wait till the transaction ends */
                while (1) {
                        status = snd_ca0106_ptr_read(emu, I2C_A, 0);
-                       //snd_printk("I2C:status=0x%x\n", status);
+                       /*snd_printk(KERN_DEBUG "I2C:status=0x%x\n", status);*/
                        timeout++;
                        if ((status & I2C_A_ADC_START) == 0)
                                break;
@@@ -521,7 -523,10 +523,10 @@@ static int snd_ca0106_pcm_open_playback
          channel->number = channel_id;
  
        channel->use = 1;
-         //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel);
+       /*
+       printk(KERN_DEBUG "open:channel_id=%d, chip=%p, channel=%p\n",
+              channel_id, chip, channel);
+       */
          //channel->interrupt = snd_ca0106_pcm_channel_interrupt;
        channel->epcm = epcm;
        if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
@@@ -614,7 -619,10 +619,10 @@@ static int snd_ca0106_pcm_open_capture_
          channel->number = channel_id;
  
        channel->use = 1;
-         //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel);
+       /*
+         printk(KERN_DEBUG "open:channel_id=%d, chip=%p, channel=%p\n",
+              channel_id, chip, channel);
+       */
          //channel->interrupt = snd_ca0106_pcm_channel_interrupt;
          channel->epcm = epcm;
        if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
@@@ -705,9 -713,20 +713,20 @@@ static int snd_ca0106_pcm_prepare_playb
        u32 reg71;
        int i;
        
-         //snd_printk("prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, periods=%u, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, runtime->periods, frames_to_bytes(runtime, 1));
-         //snd_printk("dma_addr=%x, dma_area=%p, table_base=%p\n",runtime->dma_addr, runtime->dma_area, table_base);
-       //snd_printk("dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",emu->buffer.addr, emu->buffer.area, emu->buffer.bytes);
+ #if 0 /* debug */
+       snd_printk(KERN_DEBUG
+                  "prepare:channel_number=%d, rate=%d, format=0x%x, "
+                  "channels=%d, buffer_size=%ld, period_size=%ld, "
+                  "periods=%u, frames_to_bytes=%d\n",
+                  channel, runtime->rate, runtime->format,
+                  runtime->channels, runtime->buffer_size,
+                  runtime->period_size, runtime->periods,
+                  frames_to_bytes(runtime, 1));
+       snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, table_base=%p\n",
+                  runtime->dma_addr, runtime->dma_area, table_base);
+       snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",
+                  emu->buffer.addr, emu->buffer.area, emu->buffer.bytes);
+ #endif /* debug */
        /* Rate can be set per channel. */
        /* reg40 control host to fifo */
        /* reg71 controls DAC rate. */
@@@ -799,9 -818,20 +818,20 @@@ static int snd_ca0106_pcm_prepare_captu
        u32 reg71_set = 0;
        u32 reg71;
        
-         //snd_printk("prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, periods=%u, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, runtime->periods, frames_to_bytes(runtime, 1));
-         //snd_printk("dma_addr=%x, dma_area=%p, table_base=%p\n",runtime->dma_addr, runtime->dma_area, table_base);
-       //snd_printk("dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",emu->buffer.addr, emu->buffer.area, emu->buffer.bytes);
+ #if 0 /* debug */
+       snd_printk(KERN_DEBUG
+                  "prepare:channel_number=%d, rate=%d, format=0x%x, "
+                  "channels=%d, buffer_size=%ld, period_size=%ld, "
+                  "periods=%u, frames_to_bytes=%d\n",
+                  channel, runtime->rate, runtime->format,
+                  runtime->channels, runtime->buffer_size,
+                  runtime->period_size, runtime->periods,
+                  frames_to_bytes(runtime, 1));
+         snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, table_base=%p\n",
+                  runtime->dma_addr, runtime->dma_area, table_base);
+       snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",
+                  emu->buffer.addr, emu->buffer.area, emu->buffer.bytes);
+ #endif /* debug */
        /* reg71 controls ADC rate. */
        switch (runtime->rate) {
        case 44100:
        }
  
  
-         //printk("prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size,  frames_to_bytes(runtime, 1));
+       /*
+       printk(KERN_DEBUG
+              "prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, "
+              "buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n",
+              channel, runtime->rate, runtime->format, runtime->channels,
+              runtime->buffer_size, runtime->period_size,
+              frames_to_bytes(runtime, 1));
+       */
        snd_ca0106_ptr_write(emu, 0x13, channel, 0);
        snd_ca0106_ptr_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr);
        snd_ca0106_ptr_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffer_size)<<16); // buffer size in bytes
@@@ -888,13 -925,13 +925,13 @@@ static int snd_ca0106_pcm_trigger_playb
                runtime = s->runtime;
                epcm = runtime->private_data;
                channel = epcm->channel_id;
-               /* snd_printk("channel=%d\n",channel); */
+               /* snd_printk(KERN_DEBUG "channel=%d\n", channel); */
                epcm->running = running;
                basic |= (0x1 << channel);
                extended |= (0x10 << channel);
                  snd_pcm_trigger_done(s, substream);
          }
-       /* snd_printk("basic=0x%x, extended=0x%x\n",basic, extended); */
+       /* snd_printk(KERN_DEBUG "basic=0x%x, extended=0x%x\n",basic, extended); */
  
        switch (cmd) {
        case SNDRV_PCM_TRIGGER_START:
@@@ -972,8 -1009,13 +1009,13 @@@ snd_ca0106_pcm_pointer_playback(struct 
        ptr=ptr2;
          if (ptr >= runtime->buffer_size)
                ptr -= runtime->buffer_size;
-       //printk("ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n", ptr1, ptr2, ptr, (int)runtime->buffer_size, (int)runtime->period_size, (int)runtime->frame_bits, (int)runtime->rate);
+       /*
+       printk(KERN_DEBUG "ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, "
+              "buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n",
+              ptr1, ptr2, ptr, (int)runtime->buffer_size,
+              (int)runtime->period_size, (int)runtime->frame_bits,
+              (int)runtime->rate);
+       */
        return ptr;
  }
  
@@@ -995,8 -1037,13 +1037,13 @@@ snd_ca0106_pcm_pointer_capture(struct s
        ptr=ptr2;
          if (ptr >= runtime->buffer_size)
                ptr -= runtime->buffer_size;
-       //printk("ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n", ptr1, ptr2, ptr, (int)runtime->buffer_size, (int)runtime->period_size, (int)runtime->frame_bits, (int)runtime->rate);
+       /*
+       printk(KERN_DEBUG "ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, "
+              "buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n",
+              ptr1, ptr2, ptr, (int)runtime->buffer_size,
+              (int)runtime->period_size, (int)runtime->frame_bits,
+              (int)runtime->rate);
+       */
        return ptr;
  }
  
@@@ -1181,8 -1228,12 +1228,12 @@@ static irqreturn_t snd_ca0106_interrupt
                return IRQ_NONE;
  
          stat76 = snd_ca0106_ptr_read(chip, EXTENDED_INT, 0);
-       //snd_printk("interrupt status = 0x%08x, stat76=0x%08x\n", status, stat76);
-       //snd_printk("ptr=0x%08x\n",snd_ca0106_ptr_read(chip, PLAYBACK_POINTER, 0));
+       /*
+       snd_printk(KERN_DEBUG "interrupt status = 0x%08x, stat76=0x%08x\n",
+                  status, stat76);
+       snd_printk(KERN_DEBUG "ptr=0x%08x\n",
+                  snd_ca0106_ptr_read(chip, PLAYBACK_POINTER, 0));
+       */
          mask = 0x11; /* 0x1 for one half, 0x10 for the other half period. */
        for(i = 0; i < 4; i++) {
                pchannel = &(chip->playback_channels[i]);
@@@ -1470,7 -1521,7 +1521,7 @@@ static void ca0106_init_chip(struct snd
                int size, n;
  
                size = ARRAY_SIZE(i2c_adc_init);
-               /* snd_printk("I2C:array size=0x%x\n", size); */
+               /* snd_printk(KERN_DEBUG "I2C:array size=0x%x\n", size); */
                for (n = 0; n < size; n++)
                        snd_ca0106_i2c_write(chip, i2c_adc_init[n][0],
                                             i2c_adc_init[n][1]);
@@@ -1707,9 -1758,9 +1758,9 @@@ static int __devinit snd_ca0106_probe(s
                return -ENOENT;
        }
  
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        err = snd_ca0106_create(dev, card, pci, &chip);
        if (err < 0)
diff --combined sound/pci/cs4281.c
index b9b07f464631ec84da04ebdac6c3a8c19806c10a,415e88f2c62fafa51520c168a270ffc543ac3cee..f6286f84a2213c1b08314de7b74f2bcd6a2469fb
@@@ -834,7 -834,11 +834,11 @@@ static snd_pcm_uframes_t snd_cs4281_poi
        struct cs4281_dma *dma = runtime->private_data;
        struct cs4281 *chip = snd_pcm_substream_chip(substream);
  
-       // printk("DCC = 0x%x, buffer_size = 0x%x, jiffies = %li\n", snd_cs4281_peekBA0(chip, dma->regDCC), runtime->buffer_size, jiffies);
+       /*
+       printk(KERN_DEBUG "DCC = 0x%x, buffer_size = 0x%x, jiffies = %li\n",
+              snd_cs4281_peekBA0(chip, dma->regDCC), runtime->buffer_size,
+              jiffies);
+       */
        return runtime->buffer_size -
               snd_cs4281_peekBA0(chip, dma->regDCC) - 1;
  }
@@@ -1925,9 -1929,9 +1929,9 @@@ static int __devinit snd_cs4281_probe(s
                return -ENOENT;
        }
  
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        if ((err = snd_cs4281_create(card, pci, &chip, dual_codec[dev])) < 0) {
                snd_card_free(card);
index ac1d72e0a1e4ba1233f1cc2e479e1b0eeae5456f,6506201d56f699b6614068e38ac3365b323fc75e..c89ed1f5bc2bd5e6f29f357944de60aca751bae0
@@@ -312,7 -312,7 +312,7 @@@ static int __devinit snd_cs5535audio_cr
  
        if (request_irq(pci->irq, snd_cs5535audio_interrupt,
                        IRQF_SHARED, "CS5535 Audio", cs5535au)) {
-               snd_printk("unable to grab IRQ %d\n", pci->irq);
+               snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                err = -EBUSY;
                goto sndfail;
        }
@@@ -353,9 -353,9 +353,9 @@@ static int __devinit snd_cs5535audio_pr
                return -ENOENT;
        }
  
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        if ((err = snd_cs5535audio_create(card, pci, &cs5535au)) < 0)
                goto probefail_out;
diff --combined sound/pci/ens1370.c
index e00614cbceffbec319dbaf6b3ab39829c4d391ed,17674b3406bd234b683e0ed1639af3ed9963da35..18f4d1e98c46945c63c0a2c80c64e1fcc198bde8
@@@ -584,7 -584,8 +584,8 @@@ static void snd_es1370_codec_write(stru
        unsigned long end_time = jiffies + HZ / 10;
  
  #if 0
-       printk("CODEC WRITE: reg = 0x%x, val = 0x%x (0x%x), creg = 0x%x\n",
+       printk(KERN_DEBUG
+              "CODEC WRITE: reg = 0x%x, val = 0x%x (0x%x), creg = 0x%x\n",
               reg, val, ES_1370_CODEC_WRITE(reg, val), ES_REG(ensoniq, 1370_CODEC));
  #endif
        do {
@@@ -2409,9 -2410,9 +2410,9 @@@ static int __devinit snd_audiopci_probe
                return -ENOENT;
        }
  
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        if ((err = snd_ensoniq_create(card, pci, &ensoniq)) < 0) {
                snd_card_free(card);
diff --combined sound/pci/es1938.c
index 34a78afc26d0b33666c7b6cc6c9a3a65fe4a8ec2,e4ba84bed4ade88cee7d8d725dd93468896a481c..dd63b132fb8efc0a3070976a2eca838e4812e550
@@@ -1673,18 -1673,22 +1673,22 @@@ static irqreturn_t snd_es1938_interrupt
  
        status = inb(SLIO_REG(chip, IRQCONTROL));
  #if 0
-       printk("Es1938debug - interrupt status: =0x%x\n", status);
+       printk(KERN_DEBUG "Es1938debug - interrupt status: =0x%x\n", status);
  #endif
        
        /* AUDIO 1 */
        if (status & 0x10) {
  #if 0
-                 printk("Es1938debug - AUDIO channel 1 interrupt\n");
-               printk("Es1938debug - AUDIO channel 1 DMAC DMA count: %u\n",
+                 printk(KERN_DEBUG
+                      "Es1938debug - AUDIO channel 1 interrupt\n");
+               printk(KERN_DEBUG
+                      "Es1938debug - AUDIO channel 1 DMAC DMA count: %u\n",
                       inw(SLDM_REG(chip, DMACOUNT)));
-               printk("Es1938debug - AUDIO channel 1 DMAC DMA base: %u\n",
+               printk(KERN_DEBUG
+                      "Es1938debug - AUDIO channel 1 DMAC DMA base: %u\n",
                       inl(SLDM_REG(chip, DMAADDR)));
-               printk("Es1938debug - AUDIO channel 1 DMAC DMA status: 0x%x\n",
+               printk(KERN_DEBUG
+                      "Es1938debug - AUDIO channel 1 DMAC DMA status: 0x%x\n",
                       inl(SLDM_REG(chip, DMASTATUS)));
  #endif
                /* clear irq */
        /* AUDIO 2 */
        if (status & 0x20) {
  #if 0
-                 printk("Es1938debug - AUDIO channel 2 interrupt\n");
-               printk("Es1938debug - AUDIO channel 2 DMAC DMA count: %u\n",
+                 printk(KERN_DEBUG
+                      "Es1938debug - AUDIO channel 2 interrupt\n");
+               printk(KERN_DEBUG
+                      "Es1938debug - AUDIO channel 2 DMAC DMA count: %u\n",
                       inw(SLIO_REG(chip, AUDIO2DMACOUNT)));
-               printk("Es1938debug - AUDIO channel 2 DMAC DMA base: %u\n",
+               printk(KERN_DEBUG
+                      "Es1938debug - AUDIO channel 2 DMAC DMA base: %u\n",
                       inl(SLIO_REG(chip, AUDIO2DMAADDR)));
  
  #endif
@@@ -1799,9 -1806,9 +1806,9 @@@ static int __devinit snd_es1938_probe(s
                return -ENOENT;
        }
  
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
        for (idx = 0; idx < 5; idx++) {
                if (pci_resource_start(pci, idx) == 0 ||
                    !(pci_resource_flags(pci, idx) & IORESOURCE_IO)) {
index fa4de985fc4c51279745b843ae247f439fe0bcdd,dda562081d7eabdc66aad8e16f43eab9eb1eda1e..4cf4cd8c939c518629200903123ede9d7eec94d2
@@@ -345,8 -345,8 +345,8 @@@ static int mixart_dsp_load(struct mixar
        status_daught = readl_be( MIXART_MEM( mgr,MIXART_PSEUDOREG_DXLX_STATUS_OFFSET ));
  
        /* motherboard xilinx status 5 will say that the board is performing a reset */
-       if( status_xilinx == 5 ) {
-               snd_printk( KERN_ERR "miXart is resetting !\n");
+       if (status_xilinx == 5) {
+               snd_printk(KERN_ERR "miXart is resetting !\n");
                return -EAGAIN; /* try again later */
        }
  
        case MIXART_MOTHERBOARD_XLX_INDEX:
  
                /* xilinx already loaded ? */ 
-               if( status_xilinx == 4 ) {
-                       snd_printk( KERN_DEBUG "xilinx is already loaded !\n");
+               if (status_xilinx == 4) {
+                       snd_printk(KERN_DEBUG "xilinx is already loaded !\n");
                        return 0;
                }
                /* the status should be 0 == "idle" */
-               if( status_xilinx != 0 ) {
-                       snd_printk( KERN_ERR "xilinx load error ! status = %d\n", status_xilinx);
+               if (status_xilinx != 0) {
+                       snd_printk(KERN_ERR "xilinx load error ! status = %d\n",
+                                  status_xilinx);
                        return -EIO; /* modprob -r may help ? */
                }
  
  
        case MIXART_MOTHERBOARD_ELF_INDEX:
  
-               if( status_elf == 4 ) {
-                       snd_printk( KERN_DEBUG "elf file already loaded !\n");
+               if (status_elf == 4) {
+                       snd_printk(KERN_DEBUG "elf file already loaded !\n");
                        return 0;
                }
  
                /* the status should be 0 == "idle" */
-               if( status_elf != 0 ) {
-                       snd_printk( KERN_ERR "elf load error ! status = %d\n", status_elf);
+               if (status_elf != 0) {
+                       snd_printk(KERN_ERR "elf load error ! status = %d\n",
+                                  status_elf);
                        return -EIO; /* modprob -r may help ? */
                }
  
                /* wait for xilinx status == 4 */
                err = mixart_wait_nice_for_register_value( mgr, MIXART_PSEUDOREG_MXLX_STATUS_OFFSET, 1, 4, 500); /* 5sec */
                if (err < 0) {
-                       snd_printk( KERN_ERR "xilinx was not loaded or could not be started\n");
+                       snd_printk(KERN_ERR "xilinx was not loaded or "
+                                  "could not be started\n");
                        return err;
                }
  
                /* wait for elf status == 4 */
                err = mixart_wait_nice_for_register_value( mgr, MIXART_PSEUDOREG_ELF_STATUS_OFFSET, 1, 4, 300); /* 3sec */
                if (err < 0) {
-                       snd_printk( KERN_ERR "elf could not be started\n");
+                       snd_printk(KERN_ERR "elf could not be started\n");
                        return err;
                }
  
        default:
  
                /* elf and xilinx should be loaded */
-               if( (status_elf != 4) || (status_xilinx != 4) ) {
-                       printk( KERN_ERR "xilinx or elf not successfully loaded\n");
+               if (status_elf != 4 || status_xilinx != 4) {
+                       printk(KERN_ERR "xilinx or elf not "
+                              "successfully loaded\n");
                        return -EIO; /* modprob -r may help ? */
                }
  
                /* wait for daughter detection != 0 */
                err = mixart_wait_nice_for_register_value( mgr, MIXART_PSEUDOREG_DBRD_PRESENCE_OFFSET, 0, 0, 30); /* 300msec */
                if (err < 0) {
-                       snd_printk( KERN_ERR "error starting elf file\n");
+                       snd_printk(KERN_ERR "error starting elf file\n");
                        return err;
                }
  
                        return -EINVAL;
  
                /* daughter should be idle */
-               if( status_daught != 0 ) {
-                       printk( KERN_ERR "daughter load error ! status = %d\n", status_daught);
+               if (status_daught != 0) {
+                       printk(KERN_ERR "daughter load error ! status = %d\n",
+                              status_daught);
                        return -EIO; /* modprob -r may help ? */
                }
   
                /* wait for status == 2 */
                err = mixart_wait_nice_for_register_value( mgr, MIXART_PSEUDOREG_DXLX_STATUS_OFFSET, 1, 2, 30); /* 300msec */
                if (err < 0) {
-                       snd_printk( KERN_ERR "daughter board load error\n");
+                       snd_printk(KERN_ERR "daughter board load error\n");
                        return err;
                }
  
          /* wait for daughter status == 3 */
          err = mixart_wait_nice_for_register_value( mgr, MIXART_PSEUDOREG_DXLX_STATUS_OFFSET, 1, 3, 300); /* 3sec */
          if (err < 0) {
-               snd_printk( KERN_ERR "daughter board could not be initialised\n");
+               snd_printk(KERN_ERR
+                          "daughter board could not be initialised\n");
                return err;
        }
  
        /* first communication with embedded */
        err = mixart_first_init(mgr);
          if (err < 0) {
-               snd_printk( KERN_ERR "miXart could not be set up\n");
+               snd_printk(KERN_ERR "miXart could not be set up\n");
                return err;
        }
  
@@@ -581,6 -587,16 +587,6 @@@ MODULE_FIRMWARE("mixart/miXart8AES.xlx"
  /* miXart hwdep interface id string */
  #define SND_MIXART_HWDEP_ID       "miXart Loader"
  
 -static int mixart_hwdep_open(struct snd_hwdep *hw, struct file *file)
 -{
 -      return 0;
 -}
 -
 -static int mixart_hwdep_release(struct snd_hwdep *hw, struct file *file)
 -{
 -      return 0;
 -}
 -
  static int mixart_hwdep_dsp_status(struct snd_hwdep *hw,
                                   struct snd_hwdep_dsp_status *info)
  {
@@@ -633,6 -649,8 +639,6 @@@ int snd_mixart_setup_firmware(struct mi
  
        hw->iface = SNDRV_HWDEP_IFACE_MIXART;
        hw->private_data = mgr;
 -      hw->ops.open = mixart_hwdep_open;
 -      hw->ops.release = mixart_hwdep_release;
        hw->ops.dsp_status = mixart_hwdep_dsp_status;
        hw->ops.dsp_load = mixart_hwdep_dsp_load;
        hw->exclusive = 1;
diff --combined sound/pci/sonicvibes.c
index c5601b0ad7cc4b8c52142d5f1da3e1ffad536dbb,e922b1887b1d67cccacaabd356d18f271970921c..d989215f35563cbbe3b4cfde16cc3256391d3ba5
@@@ -273,7 -273,8 +273,8 @@@ static inline void snd_sonicvibes_setdm
        outl(count, sonic->dmaa_port + SV_DMA_COUNT0);
        outb(0x18, sonic->dmaa_port + SV_DMA_MODE);
  #if 0
-       printk("program dmaa: addr = 0x%x, paddr = 0x%x\n", addr, inl(sonic->dmaa_port + SV_DMA_ADDR0));
+       printk(KERN_DEBUG "program dmaa: addr = 0x%x, paddr = 0x%x\n",
+              addr, inl(sonic->dmaa_port + SV_DMA_ADDR0));
  #endif
  }
  
@@@ -288,7 -289,8 +289,8 @@@ static inline void snd_sonicvibes_setdm
        outl(count, sonic->dmac_port + SV_DMA_COUNT0);
        outb(0x14, sonic->dmac_port + SV_DMA_MODE);
  #if 0
-       printk("program dmac: addr = 0x%x, paddr = 0x%x\n", addr, inl(sonic->dmac_port + SV_DMA_ADDR0));
+       printk(KERN_DEBUG "program dmac: addr = 0x%x, paddr = 0x%x\n",
+              addr, inl(sonic->dmac_port + SV_DMA_ADDR0));
  #endif
  }
  
@@@ -355,71 -357,104 +357,104 @@@ static unsigned char snd_sonicvibes_in(
  #if 0
  static void snd_sonicvibes_debug(struct sonicvibes * sonic)
  {
-       printk("SV REGS:          INDEX = 0x%02x  ", inb(SV_REG(sonic, INDEX)));
+       printk(KERN_DEBUG
+              "SV REGS:          INDEX = 0x%02x  ", inb(SV_REG(sonic, INDEX)));
        printk("                 STATUS = 0x%02x\n", inb(SV_REG(sonic, STATUS)));
-       printk("  0x00: left input      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x00));
+       printk(KERN_DEBUG
+              "  0x00: left input      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x00));
        printk("  0x20: synth rate low  = 0x%02x\n", snd_sonicvibes_in(sonic, 0x20));
-       printk("  0x01: right input     = 0x%02x  ", snd_sonicvibes_in(sonic, 0x01));
+       printk(KERN_DEBUG
+              "  0x01: right input     = 0x%02x  ", snd_sonicvibes_in(sonic, 0x01));
        printk("  0x21: synth rate high = 0x%02x\n", snd_sonicvibes_in(sonic, 0x21));
-       printk("  0x02: left AUX1       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x02));
+       printk(KERN_DEBUG
+              "  0x02: left AUX1       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x02));
        printk("  0x22: ADC clock       = 0x%02x\n", snd_sonicvibes_in(sonic, 0x22));
-       printk("  0x03: right AUX1      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x03));
+       printk(KERN_DEBUG
+              "  0x03: right AUX1      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x03));
        printk("  0x23: ADC alt rate    = 0x%02x\n", snd_sonicvibes_in(sonic, 0x23));
-       printk("  0x04: left CD         = 0x%02x  ", snd_sonicvibes_in(sonic, 0x04));
+       printk(KERN_DEBUG
+              "  0x04: left CD         = 0x%02x  ", snd_sonicvibes_in(sonic, 0x04));
        printk("  0x24: ADC pll M       = 0x%02x\n", snd_sonicvibes_in(sonic, 0x24));
-       printk("  0x05: right CD        = 0x%02x  ", snd_sonicvibes_in(sonic, 0x05));
+       printk(KERN_DEBUG
+              "  0x05: right CD        = 0x%02x  ", snd_sonicvibes_in(sonic, 0x05));
        printk("  0x25: ADC pll N       = 0x%02x\n", snd_sonicvibes_in(sonic, 0x25));
-       printk("  0x06: left line       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x06));
+       printk(KERN_DEBUG
+              "  0x06: left line       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x06));
        printk("  0x26: Synth pll M     = 0x%02x\n", snd_sonicvibes_in(sonic, 0x26));
-       printk("  0x07: right line      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x07));
+       printk(KERN_DEBUG
+              "  0x07: right line      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x07));
        printk("  0x27: Synth pll N     = 0x%02x\n", snd_sonicvibes_in(sonic, 0x27));
-       printk("  0x08: MIC             = 0x%02x  ", snd_sonicvibes_in(sonic, 0x08));
+       printk(KERN_DEBUG
+              "  0x08: MIC             = 0x%02x  ", snd_sonicvibes_in(sonic, 0x08));
        printk("  0x28: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x28));
-       printk("  0x09: Game port       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x09));
+       printk(KERN_DEBUG
+              "  0x09: Game port       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x09));
        printk("  0x29: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x29));
-       printk("  0x0a: left synth      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0a));
+       printk(KERN_DEBUG
+              "  0x0a: left synth      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0a));
        printk("  0x2a: MPU401          = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2a));
-       printk("  0x0b: right synth     = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0b));
+       printk(KERN_DEBUG
+              "  0x0b: right synth     = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0b));
        printk("  0x2b: drive ctrl      = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2b));
-       printk("  0x0c: left AUX2       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0c));
+       printk(KERN_DEBUG
+              "  0x0c: left AUX2       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0c));
        printk("  0x2c: SRS space       = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2c));
-       printk("  0x0d: right AUX2      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0d));
+       printk(KERN_DEBUG
+              "  0x0d: right AUX2      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0d));
        printk("  0x2d: SRS center      = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2d));
-       printk("  0x0e: left analog     = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0e));
+       printk(KERN_DEBUG
+              "  0x0e: left analog     = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0e));
        printk("  0x2e: wave source     = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2e));
-       printk("  0x0f: right analog    = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0f));
+       printk(KERN_DEBUG
+              "  0x0f: right analog    = 0x%02x  ", snd_sonicvibes_in(sonic, 0x0f));
        printk("  0x2f: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x2f));
-       printk("  0x10: left PCM        = 0x%02x  ", snd_sonicvibes_in(sonic, 0x10));
+       printk(KERN_DEBUG
+              "  0x10: left PCM        = 0x%02x  ", snd_sonicvibes_in(sonic, 0x10));
        printk("  0x30: analog power    = 0x%02x\n", snd_sonicvibes_in(sonic, 0x30));
-       printk("  0x11: right PCM       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x11));
+       printk(KERN_DEBUG
+              "  0x11: right PCM       = 0x%02x  ", snd_sonicvibes_in(sonic, 0x11));
        printk("  0x31: analog power    = 0x%02x\n", snd_sonicvibes_in(sonic, 0x31));
-       printk("  0x12: DMA data format = 0x%02x  ", snd_sonicvibes_in(sonic, 0x12));
+       printk(KERN_DEBUG
+              "  0x12: DMA data format = 0x%02x  ", snd_sonicvibes_in(sonic, 0x12));
        printk("  0x32: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x32));
-       printk("  0x13: P/C enable      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x13));
+       printk(KERN_DEBUG
+              "  0x13: P/C enable      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x13));
        printk("  0x33: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x33));
-       printk("  0x14: U/D button      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x14));
+       printk(KERN_DEBUG
+              "  0x14: U/D button      = 0x%02x  ", snd_sonicvibes_in(sonic, 0x14));
        printk("  0x34: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x34));
-       printk("  0x15: revision        = 0x%02x  ", snd_sonicvibes_in(sonic, 0x15));
+       printk(KERN_DEBUG
+              "  0x15: revision        = 0x%02x  ", snd_sonicvibes_in(sonic, 0x15));
        printk("  0x35: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x35));
-       printk("  0x16: ADC output ctrl = 0x%02x  ", snd_sonicvibes_in(sonic, 0x16));
+       printk(KERN_DEBUG
+              "  0x16: ADC output ctrl = 0x%02x  ", snd_sonicvibes_in(sonic, 0x16));
        printk("  0x36: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x36));
-       printk("  0x17: ---             = 0x%02x  ", snd_sonicvibes_in(sonic, 0x17));
+       printk(KERN_DEBUG
+              "  0x17: ---             = 0x%02x  ", snd_sonicvibes_in(sonic, 0x17));
        printk("  0x37: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x37));
-       printk("  0x18: DMA A upper cnt = 0x%02x  ", snd_sonicvibes_in(sonic, 0x18));
+       printk(KERN_DEBUG
+              "  0x18: DMA A upper cnt = 0x%02x  ", snd_sonicvibes_in(sonic, 0x18));
        printk("  0x38: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x38));
-       printk("  0x19: DMA A lower cnt = 0x%02x  ", snd_sonicvibes_in(sonic, 0x19));
+       printk(KERN_DEBUG
+              "  0x19: DMA A lower cnt = 0x%02x  ", snd_sonicvibes_in(sonic, 0x19));
        printk("  0x39: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x39));
-       printk("  0x1a: ---             = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1a));
+       printk(KERN_DEBUG
+              "  0x1a: ---             = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1a));
        printk("  0x3a: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3a));
-       printk("  0x1b: ---             = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1b));
+       printk(KERN_DEBUG
+              "  0x1b: ---             = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1b));
        printk("  0x3b: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3b));
-       printk("  0x1c: DMA C upper cnt = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1c));
+       printk(KERN_DEBUG
+              "  0x1c: DMA C upper cnt = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1c));
        printk("  0x3c: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3c));
-       printk("  0x1d: DMA C upper cnt = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1d));
+       printk(KERN_DEBUG
+              "  0x1d: DMA C upper cnt = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1d));
        printk("  0x3d: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3d));
-       printk("  0x1e: PCM rate low    = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1e));
+       printk(KERN_DEBUG
+              "  0x1e: PCM rate low    = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1e));
        printk("  0x3e: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3e));
-       printk("  0x1f: PCM rate high   = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1f));
+       printk(KERN_DEBUG
+              "  0x1f: PCM rate high   = 0x%02x  ", snd_sonicvibes_in(sonic, 0x1f));
        printk("  0x3f: ---             = 0x%02x\n", snd_sonicvibes_in(sonic, 0x3f));
  }
  
@@@ -476,8 -511,8 +511,8 @@@ static void snd_sonicvibes_pll(unsigne
        *res_m = m;
        *res_n = n;
  #if 0
-       printk("metric = %i, xm = %i, xn = %i\n", metric, xm, xn);
-       printk("pll: m = 0x%x, r = 0x%x, n = 0x%x\n", reg, m, r, n);
+       printk(KERN_DEBUG "metric = %i, xm = %i, xn = %i\n", metric, xm, xn);
+       printk(KERN_DEBUG "pll: m = 0x%x, r = 0x%x, n = 0x%x\n", reg, m, r, n);
  #endif
  }
  
@@@ -1423,9 -1458,9 +1458,9 @@@ static int __devinit snd_sonic_probe(st
                return -ENOENT;
        }
   
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
        for (idx = 0; idx < 5; idx++) {
                if (pci_resource_start(pci, idx) == 0 ||
                    !(pci_resource_flags(pci, idx) & IORESOURCE_IO)) {
diff --combined sound/pci/via82xx.c
index d8705547dae106fb203193e0a3a8d892bbe48bb5,a027896a220f5cfa2754497ffc0e7957d62d1129..809b233dd4a3add8cb7ef357ae6291a8ad3f083a
@@@ -466,7 -466,10 +466,10 @@@ static int build_via_table(struct viade
                                        flag = VIA_TBL_BIT_FLAG; /* period boundary */
                        } else
                                flag = 0; /* period continues to the next */
-                       // printk("via: tbl %d: at %d  size %d (rest %d)\n", idx, ofs, r, rest);
+                       /*
+                       printk(KERN_DEBUG "via: tbl %d: at %d  size %d "
+                              "(rest %d)\n", idx, ofs, r, rest);
+                       */
                        ((u32 *)dev->table.area)[(idx<<1) + 1] = cpu_to_le32(r | flag);
                        dev->idx_table[idx].offset = ofs;
                        dev->idx_table[idx].size = r;
@@@ -2360,14 -2363,14 +2363,14 @@@ static struct snd_pci_quirk dxs_whiteli
        SND_PCI_QUIRK(0x1019, 0x0996, "ESC Mobo", VIA_DXS_48K),
        SND_PCI_QUIRK(0x1019, 0x0a81, "ECS K7VTA3 v8.0", VIA_DXS_NO_VRA),
        SND_PCI_QUIRK(0x1019, 0x0a85, "ECS L7VMM2", VIA_DXS_NO_VRA),
-       SND_PCI_QUIRK(0x1019, 0, "ESC K8", VIA_DXS_SRC),
+       SND_PCI_QUIRK_VENDOR(0x1019, "ESC K8", VIA_DXS_SRC),
        SND_PCI_QUIRK(0x1019, 0xaa01, "ESC K8T890-A", VIA_DXS_SRC),
        SND_PCI_QUIRK(0x1025, 0x0033, "Acer Inspire 1353LM", VIA_DXS_NO_VRA),
        SND_PCI_QUIRK(0x1025, 0x0046, "Acer Aspire 1524 WLMi", VIA_DXS_SRC),
-       SND_PCI_QUIRK(0x1043, 0, "ASUS A7/A8", VIA_DXS_NO_VRA),
-       SND_PCI_QUIRK(0x1071, 0, "Diverse Notebook", VIA_DXS_NO_VRA),
+       SND_PCI_QUIRK_VENDOR(0x1043, "ASUS A7/A8", VIA_DXS_NO_VRA),
+       SND_PCI_QUIRK_VENDOR(0x1071, "Diverse Notebook", VIA_DXS_NO_VRA),
        SND_PCI_QUIRK(0x10cf, 0x118e, "FSC Laptop", VIA_DXS_ENABLE),
-       SND_PCI_QUIRK(0x1106, 0, "ASRock", VIA_DXS_SRC),
+       SND_PCI_QUIRK_VENDOR(0x1106, "ASRock", VIA_DXS_SRC),
        SND_PCI_QUIRK(0x1297, 0xa231, "Shuttle AK31v2", VIA_DXS_SRC),
        SND_PCI_QUIRK(0x1297, 0xa232, "Shuttle", VIA_DXS_SRC),
        SND_PCI_QUIRK(0x1297, 0xc160, "Shuttle Sk41G", VIA_DXS_SRC),
        SND_PCI_QUIRK(0x1462, 0x3800, "MSI KT266", VIA_DXS_ENABLE),
        SND_PCI_QUIRK(0x1462, 0x7120, "MSI KT4V", VIA_DXS_ENABLE),
        SND_PCI_QUIRK(0x1462, 0x7142, "MSI K8MM-V", VIA_DXS_ENABLE),
-       SND_PCI_QUIRK(0x1462, 0, "MSI Mobo", VIA_DXS_SRC),
+       SND_PCI_QUIRK_VENDOR(0x1462, "MSI Mobo", VIA_DXS_SRC),
        SND_PCI_QUIRK(0x147b, 0x1401, "ABIT KD7(-RAID)", VIA_DXS_ENABLE),
        SND_PCI_QUIRK(0x147b, 0x1411, "ABIT VA-20", VIA_DXS_ENABLE),
        SND_PCI_QUIRK(0x147b, 0x1413, "ABIT KV8 Pro", VIA_DXS_ENABLE),
        SND_PCI_QUIRK(0x161f, 0x2032, "m680x machines", VIA_DXS_48K),
        SND_PCI_QUIRK(0x1631, 0xe004, "PB EasyNote 3174", VIA_DXS_ENABLE),
        SND_PCI_QUIRK(0x1695, 0x3005, "EPoX EP-8K9A", VIA_DXS_ENABLE),
-       SND_PCI_QUIRK(0x1695, 0, "EPoX mobo", VIA_DXS_SRC),
-       SND_PCI_QUIRK(0x16f3, 0, "Jetway K8", VIA_DXS_SRC),
-       SND_PCI_QUIRK(0x1734, 0, "FSC Laptop", VIA_DXS_SRC),
+       SND_PCI_QUIRK_VENDOR(0x1695, "EPoX mobo", VIA_DXS_SRC),
+       SND_PCI_QUIRK_VENDOR(0x16f3, "Jetway K8", VIA_DXS_SRC),
+       SND_PCI_QUIRK_VENDOR(0x1734, "FSC Laptop", VIA_DXS_SRC),
        SND_PCI_QUIRK(0x1849, 0x3059, "ASRock K7VM2", VIA_DXS_NO_VRA),
-       SND_PCI_QUIRK(0x1849, 0, "ASRock mobo", VIA_DXS_SRC),
+       SND_PCI_QUIRK_VENDOR(0x1849, "ASRock mobo", VIA_DXS_SRC),
        SND_PCI_QUIRK(0x1919, 0x200a, "Soltek SL-K8",  VIA_DXS_NO_VRA),
        SND_PCI_QUIRK(0x4005, 0x4710, "MSI K7T266", VIA_DXS_SRC),
        { } /* terminator */
@@@ -2433,9 -2436,9 +2436,9 @@@ static int __devinit snd_via82xx_probe(
        unsigned int i;
        int err;
  
 -      card = snd_card_new(index, id, THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index, id, THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        card_type = pci_id->driver_data;
        switch (card_type) {
index c086b762c150a30cfa651c7ff5b7805ad2c461da,c0d9cc9dad4437974a1238b0741ccb95bc0bbece..0d54e3503c1e6edc4ad80d23f246aa3b034aab12
@@@ -328,7 -328,10 +328,10 @@@ static int build_via_table(struct viade
                                        flag = VIA_TBL_BIT_FLAG; /* period boundary */
                        } else
                                flag = 0; /* period continues to the next */
-                       // printk("via: tbl %d: at %d  size %d (rest %d)\n", idx, ofs, r, rest);
+                       /*
+                       printk(KERN_DEBUG "via: tbl %d: at %d  size %d "
+                              "(rest %d)\n", idx, ofs, r, rest);
+                       */
                        ((u32 *)dev->table.area)[(idx<<1) + 1] = cpu_to_le32(r | flag);
                        dev->idx_table[idx].offset = ofs;
                        dev->idx_table[idx].size = r;
@@@ -1167,9 -1170,9 +1170,9 @@@ static int __devinit snd_via82xx_probe(
        unsigned int i;
        int err;
  
 -      card = snd_card_new(index, id, THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index, id, THIS_MODULE, 0, &card);
 +      if (err < 0)
 +              return err;
  
        card_type = pci_id->driver_data;
        switch (card_type) {
diff --combined sound/sparc/amd7930.c
index ba38912614b4f90fca9444611ddb2fa1944e87bc,7cbc725934e57a1ddd96200fa7b98cae5e28a519..574af56ba8a6fa6d4b690f4b2079ea459281712c
@@@ -954,7 -954,8 +954,8 @@@ static int __devinit snd_amd7930_create
        amd->regs = of_ioremap(&op->resource[0], 0,
                               resource_size(&op->resource[0]), "amd7930");
        if (!amd->regs) {
-               snd_printk("amd7930-%d: Unable to map chip registers.\n", dev);
+               snd_printk(KERN_ERR
+                          "amd7930-%d: Unable to map chip registers.\n", dev);
                return -EIO;
        }
  
  
        if (request_irq(irq, snd_amd7930_interrupt,
                        IRQF_DISABLED | IRQF_SHARED, "amd7930", amd)) {
-               snd_printk("amd7930-%d: Unable to grab IRQ %d\n",
+               snd_printk(KERN_ERR "amd7930-%d: Unable to grab IRQ %d\n",
                           dev, irq);
                snd_amd7930_free(amd);
                return -EBUSY;
@@@ -1018,10 -1019,9 +1019,10 @@@ static int __devinit amd7930_sbus_probe
                return -ENOENT;
        }
  
 -      card = snd_card_new(index[dev_num], id[dev_num], THIS_MODULE, 0);
 -      if (card == NULL)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev_num], id[dev_num], THIS_MODULE, 0,
 +                            &card);
 +      if (err < 0)
 +              return err;
  
        strcpy(card->driver, "AMD7930");
        strcpy(card->shortname, "Sun AMD7930");
index a26d8d83d3eb85893564463681bc06247dcbe364,fc650c800afc0c46ac977fb4f66913233c134a53..4af8740db7170ea34734037d6544d49ffd8e8953
@@@ -30,9 -30,6 +30,6 @@@
  #include "usbusx2y.h"
  #include "usX2Yhwdep.h"
  
- int usX2Y_hwdep_pcm_new(struct snd_card *card);
  static int snd_us428ctls_vm_fault(struct vm_area_struct *area,
                                  struct vm_fault *vmf)
  {
@@@ -106,6 -103,16 +103,6 @@@ static unsigned int snd_us428ctls_poll(
  }
  
  
 -static int snd_usX2Y_hwdep_open(struct snd_hwdep *hw, struct file *file)
 -{
 -      return 0;
 -}
 -
 -static int snd_usX2Y_hwdep_release(struct snd_hwdep *hw, struct file *file)
 -{
 -      return 0;
 -}
 -
  static int snd_usX2Y_hwdep_dsp_status(struct snd_hwdep *hw,
                                      struct snd_hwdep_dsp_status *info)
  {
@@@ -257,6 -264,8 +254,6 @@@ int usX2Y_hwdep_new(struct snd_card *ca
  
        hw->iface = SNDRV_HWDEP_IFACE_USX2Y;
        hw->private_data = usX2Y(card);
 -      hw->ops.open = snd_usX2Y_hwdep_open;
 -      hw->ops.release = snd_usX2Y_hwdep_release;
        hw->ops.dsp_status = snd_usX2Y_hwdep_dsp_status;
        hw->ops.dsp_load = snd_usX2Y_hwdep_dsp_load;
        hw->ops.mmap = snd_us428ctls_mmap;
index af8b84954054a12aee12eb95c5732a99616544e1,c545a02dee48b148caa90ef533d1fd340ceda190..5ce0da23ee96fd22752b53ffcab1d7f8057672b9
@@@ -227,9 -227,9 +227,9 @@@ static void i_usX2Y_In04Int(struct urb 
        
        if (usX2Y->US04) {
                if (0 == usX2Y->US04->submitted)
-                       do
+                       do {
                                err = usb_submit_urb(usX2Y->US04->urb[usX2Y->US04->submitted++], GFP_ATOMIC);
-                       while (!err && usX2Y->US04->submitted < usX2Y->US04->len);
+                       while (!err && usX2Y->US04->submitted < usX2Y->US04->len);
        } else
                if (us428ctls && us428ctls->p4outLast >= 0 && us428ctls->p4outLast < N_us428_p4out_BUFS) {
                        if (us428ctls->p4outLast != us428ctls->p4outSent) {
@@@ -333,21 -333,18 +333,21 @@@ static struct usb_device_id snd_usX2Y_u
        { /* terminator */ }
  };
  
 -static struct snd_card *usX2Y_create_card(struct usb_device *device)
 +static int usX2Y_create_card(struct usb_device *device, struct snd_card **cardp)
  {
        int             dev;
        struct snd_card *       card;
 +      int err;
 +
        for (dev = 0; dev < SNDRV_CARDS; ++dev)
                if (enable[dev] && !snd_usX2Y_card_used[dev])
                        break;
        if (dev >= SNDRV_CARDS)
 -              return NULL;
 -      card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct usX2Ydev));
 -      if (!card)
 -              return NULL;
 +              return -ENODEV;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE,
 +                            sizeof(struct usX2Ydev), &card);
 +      if (err < 0)
 +              return err;
        snd_usX2Y_card_used[usX2Y(card)->chip.index = dev] = 1;
        card->private_free = snd_usX2Y_card_private_free;
        usX2Y(card)->chip.dev = device;
                usX2Y(card)->chip.dev->bus->busnum, usX2Y(card)->chip.dev->devnum
                );
        snd_card_set_dev(card, &device->dev);
 -      return card;
 +      *cardp = card;
 +      return 0;
  }
  
  
 -static void *usX2Y_usb_probe(struct usb_device *device, struct usb_interface *intf, const struct usb_device_id *device_id)
 +static int usX2Y_usb_probe(struct usb_device *device,
 +                         struct usb_interface *intf,
 +                         const struct usb_device_id *device_id,
 +                         struct snd_card **cardp)
  {
        int             err;
        struct snd_card *       card;
 +
 +      *cardp = NULL;
        if (le16_to_cpu(device->descriptor.idVendor) != 0x1604 ||
            (le16_to_cpu(device->descriptor.idProduct) != USB_ID_US122 &&
             le16_to_cpu(device->descriptor.idProduct) != USB_ID_US224 &&
 -           le16_to_cpu(device->descriptor.idProduct) != USB_ID_US428) ||
 -          !(card = usX2Y_create_card(device)))
 -              return NULL;
 +           le16_to_cpu(device->descriptor.idProduct) != USB_ID_US428))
 +              return -EINVAL;
 +
 +      err = usX2Y_create_card(device, &card);
 +      if (err < 0)
 +              return err;
        if ((err = usX2Y_hwdep_new(card, device)) < 0  ||
            (err = snd_card_register(card)) < 0) {
                snd_card_free(card);
 -              return NULL;
 +              return err;
        }
 -      return card;
 +      *cardp = card;
 +      return 0;
  }
  
  /*
   */
  static int snd_usX2Y_probe(struct usb_interface *intf, const struct usb_device_id *id)
  {
 -      void *chip;
 -      chip = usX2Y_usb_probe(interface_to_usbdev(intf), intf, id);
 -      if (chip) {
 -              usb_set_intfdata(intf, chip);
 -              return 0;
 -      } else
 -              return -EIO;
 +      struct snd_card *card;
 +      int err;
 +
 +      err = usX2Y_usb_probe(interface_to_usbdev(intf), intf, id, &card);
 +      if (err < 0)
 +              return err;
 +      dev_set_drvdata(&intf->dev, card);
 +      return 0;
  }
  
  static void snd_usX2Y_disconnect(struct usb_interface *intf)