ALSA: ice17xx: Use standard printk helpers
authorTakashi Iwai <tiwai@suse.de>
Tue, 25 Feb 2014 16:16:16 +0000 (17:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 26 Feb 2014 15:45:27 +0000 (16:45 +0100)
Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ice1712/aureon.c
sound/pci/ice1712/delta.c
sound/pci/ice1712/ews.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c
sound/pci/ice1712/juli.c
sound/pci/ice1712/prodigy192.c
sound/pci/ice1712/quartet.c

index 55902ec40344d824b17d56d37d047f79281ba294..3b3cf4ac9060ac41b9876e52c94a4151e61cdce5 100644 (file)
@@ -1937,9 +1937,12 @@ static int aureon_add_controls(struct snd_ice1712 *ice)
                snd_ice1712_save_gpio_status(ice);
                id = aureon_cs8415_get(ice, CS8415_ID);
                if (id != 0x41)
-                       snd_printk(KERN_INFO "No CS8415 chip. Skipping CS8415 controls.\n");
+                       dev_info(ice->card->dev,
+                                "No CS8415 chip. Skipping CS8415 controls.\n");
                else if ((id & 0x0F) != 0x01)
-                       snd_printk(KERN_INFO "Detected unsupported CS8415 rev. (%c)\n", (char)((id & 0x0F) + 'A' - 1));
+                       dev_info(ice->card->dev,
+                                "Detected unsupported CS8415 rev. (%c)\n",
+                                (char)((id & 0x0F) + 'A' - 1));
                else {
                        for (i = 0; i < ARRAY_SIZE(cs8415_controls); i++) {
                                struct snd_kcontrol *kctl;
index 9e28cc12969b3632357ae4f198634da499864903..98e5e955261ef4b6d7db73012ab3e5cb961174c9 100644 (file)
@@ -425,7 +425,8 @@ static int snd_ice1712_delta1010lt_wordclock_status_get(struct snd_kcontrol *kco
        struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
 
        if (snd_i2c_sendbytes(ice->cs8427, &reg, 1) != 1)
-               snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
+               dev_err(ice->card->dev,
+                       "unable to send register 0x%x byte to CS8427\n", reg);
        snd_i2c_readbytes(ice->cs8427, &reg, 1);
        ucontrol->value.integer.value[0] = (reg & CS8427_UNLOCK) ? 1 : 0;
        return 0;
@@ -637,7 +638,7 @@ static int snd_ice1712_delta_init(struct snd_ice1712 *ice)
        case ICE1712_SUBDEVICE_VX442:
        case ICE1712_SUBDEVICE_DELTA66E:
                if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) {
-                       snd_printk(KERN_ERR "unable to create I2C bus\n");
+                       dev_err(ice->card->dev, "unable to create I2C bus\n");
                        return err;
                }
                ice->i2c->private_data = ice;
index bc2e7011c55d7fa184b63197f82ea7d6fab00a95..817a1bc50a60137e5c6674de07ac0c1a1b928ab1 100644 (file)
@@ -163,7 +163,8 @@ static int snd_ice1712_ews88mt_chip_select(struct snd_ice1712 *ice, int chip_mas
 
      __error:
        snd_i2c_unlock(ice->i2c);
-       snd_printk(KERN_ERR "AK4524 chip select failed, check cable to the front module\n");
+       dev_err(ice->card->dev,
+               "AK4524 chip select failed, check cable to the front module\n");
        return -EIO;
 }
 
@@ -174,7 +175,7 @@ static void ews88mt_ak4524_lock(struct snd_akm4xxx *ak, int chip)
        unsigned char tmp;
        /* assert AK4524 CS */
        if (snd_ice1712_ews88mt_chip_select(ice, ~(1 << chip) & 0x0f) < 0)
-               snd_printk(KERN_ERR "fatal error (ews88mt chip select)\n");
+               dev_err(ice->card->dev, "fatal error (ews88mt chip select)\n");
        snd_ice1712_save_gpio_status(ice);
        tmp = ICE1712_EWS88_SERIAL_DATA |
                ICE1712_EWS88_SERIAL_CLOCK |
@@ -456,7 +457,7 @@ static int snd_ice1712_ews_init(struct snd_ice1712 *ice)
 
        /* create i2c */
        if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) {
-               snd_printk(KERN_ERR "unable to create I2C bus\n");
+               dev_err(ice->card->dev, "unable to create I2C bus\n");
                return err;
        }
        ice->i2c->private_data = ice;
@@ -469,7 +470,8 @@ static int snd_ice1712_ews_init(struct snd_ice1712 *ice)
                                            ICE1712_6FIRE_PCF9554_ADDR,
                                            &spec->i2cdevs[EWS_I2C_6FIRE]);
                if (err < 0) {
-                       snd_printk(KERN_ERR "PCF9554 initialization failed\n");
+                       dev_err(ice->card->dev,
+                               "PCF9554 initialization failed\n");
                        return err;
                }
                snd_ice1712_6fire_write_pca(ice, PCF9554_REG_CONFIG, 0x80);
@@ -834,7 +836,7 @@ static int snd_ice1712_6fire_read_pca(struct snd_ice1712 *ice, unsigned char reg
        byte = 0;
        if (snd_i2c_readbytes(spec->i2cdevs[EWS_I2C_6FIRE], &byte, 1) != 1) {
                snd_i2c_unlock(ice->i2c);
-               printk(KERN_ERR "cannot read pca\n");
+               dev_err(ice->card->dev, "cannot read pca\n");
                return -EIO;
        }
        snd_i2c_unlock(ice->i2c);
index 99c022a0d61247d00231b85be36b1c4119da4c29..0710ec7e69d3fdeba9d2e0b8616e271cc7d3924c 100644 (file)
@@ -394,7 +394,7 @@ int snd_ice1712_init_cs8427(struct snd_ice1712 *ice, int addr)
        err = snd_cs8427_create(ice->i2c, addr,
                (ice->cs8427_timeout * HZ) / 1000, &ice->cs8427);
        if (err < 0) {
-               snd_printk(KERN_ERR "CS8427 initialization failed\n");
+               dev_err(ice->card->dev, "CS8427 initialization failed\n");
                return err;
        }
        ice->spdif.ops.open = open_cs8427;
@@ -467,7 +467,7 @@ static irqreturn_t snd_ice1712_interrupt(int irq, void *dev_id)
                        u16 pbkstatus;
                        struct snd_pcm_substream *substream;
                        pbkstatus = inw(ICEDS(ice, INTSTAT));
-                       /* printk(KERN_DEBUG "pbkstatus = 0x%x\n", pbkstatus); */
+                       /* dev_dbg(ice->card->dev, "pbkstatus = 0x%x\n", pbkstatus); */
                        for (idx = 0; idx < 6; idx++) {
                                if ((pbkstatus & (3 << (idx * 2))) == 0)
                                        continue;
@@ -903,7 +903,8 @@ static int snd_ice1712_pcm(struct snd_ice1712 *ice, int device, struct snd_pcm *
        if (rpcm)
                *rpcm = pcm;
 
-       printk(KERN_WARNING "Consumer PCM code does not work well at the moment --jk\n");
+       dev_warn(ice->card->dev,
+                "Consumer PCM code does not work well at the moment --jk\n");
 
        return 0;
 }
@@ -1534,7 +1535,8 @@ static int snd_ice1712_ac97_mixer(struct snd_ice1712 *ice)
                ac97.private_free = snd_ice1712_mixer_free_ac97;
                err = snd_ac97_mixer(pbus, &ac97, &ice->ac97);
                if (err < 0)
-                       printk(KERN_WARNING "ice1712: cannot initialize ac97 for consumer, skipped\n");
+                       dev_warn(ice->card->dev,
+                                "cannot initialize ac97 for consumer, skipped\n");
                else {
                        err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_digmix_route_ac97, ice));
                        if (err < 0)
@@ -1552,7 +1554,8 @@ static int snd_ice1712_ac97_mixer(struct snd_ice1712 *ice)
                ac97.private_free = snd_ice1712_mixer_free_ac97;
                err = snd_ac97_mixer(pbus, &ac97, &ice->ac97);
                if (err < 0)
-                       printk(KERN_WARNING "ice1712: cannot initialize pro ac97, skipped\n");
+                       dev_warn(ice->card->dev,
+                                "cannot initialize pro ac97, skipped\n");
                else
                        return 0;
        }
@@ -2332,7 +2335,8 @@ static int snd_ice1712_read_eeprom(struct snd_ice1712 *ice,
                        pci_read_config_word(ice->pci, PCI_SUBSYSTEM_ID, &device);
                        ice->eeprom.subvendor = ((unsigned int)swab16(vendor) << 16) | swab16(device);
                        if (ice->eeprom.subvendor == 0 || ice->eeprom.subvendor == (unsigned int)-1) {
-                               printk(KERN_ERR "ice1712: No valid ID is found\n");
+                               dev_err(ice->card->dev,
+                                       "No valid ID is found\n");
                                return -ENXIO;
                        }
                }
@@ -2340,21 +2344,22 @@ static int snd_ice1712_read_eeprom(struct snd_ice1712 *ice,
        for (tbl = card_tables; *tbl; tbl++) {
                for (c = *tbl; c->subvendor; c++) {
                        if (modelname && c->model && !strcmp(modelname, c->model)) {
-                               printk(KERN_INFO "ice1712: Using board model %s\n", c->name);
+                               dev_info(ice->card->dev,
+                                        "Using board model %s\n", c->name);
                                ice->eeprom.subvendor = c->subvendor;
                        } else if (c->subvendor != ice->eeprom.subvendor)
                                continue;
                        if (!c->eeprom_size || !c->eeprom_data)
                                goto found;
                        /* if the EEPROM is given by the driver, use it */
-                       snd_printdd("using the defined eeprom..\n");
+                       dev_dbg(ice->card->dev, "using the defined eeprom..\n");
                        ice->eeprom.version = 1;
                        ice->eeprom.size = c->eeprom_size + 6;
                        memcpy(ice->eeprom.data, c->eeprom_data, c->eeprom_size);
                        goto read_skipped;
                }
        }
-       printk(KERN_WARNING "ice1712: No matching model found for ID 0x%x\n",
+       dev_warn(ice->card->dev, "No matching model found for ID 0x%x\n",
               ice->eeprom.subvendor);
 
  found:
@@ -2362,12 +2367,13 @@ static int snd_ice1712_read_eeprom(struct snd_ice1712 *ice,
        if (ice->eeprom.size < 6)
                ice->eeprom.size = 32; /* FIXME: any cards without the correct size? */
        else if (ice->eeprom.size > 32) {
-               snd_printk(KERN_ERR "invalid EEPROM (size = %i)\n", ice->eeprom.size);
+               dev_err(ice->card->dev,
+                       "invalid EEPROM (size = %i)\n", ice->eeprom.size);
                return -EIO;
        }
        ice->eeprom.version = snd_ice1712_read_i2c(ice, dev, 0x05);
        if (ice->eeprom.version != 1) {
-               snd_printk(KERN_ERR "invalid EEPROM version %i\n",
+               dev_err(ice->card->dev, "invalid EEPROM version %i\n",
                           ice->eeprom.version);
                /* return -EIO; */
        }
@@ -2553,7 +2559,8 @@ static int snd_ice1712_create(struct snd_card *card,
        /* check, if we can restrict PCI DMA transfers to 28 bits */
        if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
            pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
-               snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
+               dev_err(card->dev,
+                       "architecture does not support 28bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
        }
@@ -2609,7 +2616,7 @@ static int snd_ice1712_create(struct snd_card *card,
 
        if (request_irq(pci->irq, snd_ice1712_interrupt, IRQF_SHARED,
                        KBUILD_MODNAME, ice)) {
-               snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
+               dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
                snd_ice1712_free(ice);
                return -EIO;
        }
index cf1ba116a7723c04bdd9890bc6ca08353a88c458..5e7948f3efe91d80609543c1b090a48f969251db 100644 (file)
@@ -146,7 +146,7 @@ static unsigned char snd_vt1724_ac97_ready(struct snd_ice1712 *ice)
                        continue;
                return old_cmd;
        }
-       snd_printd(KERN_ERR "snd_vt1724_ac97_ready: timeout\n");
+       dev_dbg(ice->card->dev, "snd_vt1724_ac97_ready: timeout\n");
        return old_cmd;
 }
 
@@ -156,7 +156,7 @@ static int snd_vt1724_ac97_wait_bit(struct snd_ice1712 *ice, unsigned char bit)
        for (tm = 0; tm < 0x10000; tm++)
                if ((inb(ICEMT1724(ice, AC97_CMD)) & bit) == 0)
                        return 0;
-       snd_printd(KERN_ERR "snd_vt1724_ac97_wait_bit: timeout\n");
+       dev_dbg(ice->card->dev, "snd_vt1724_ac97_wait_bit: timeout\n");
        return -EIO;
 }
 
@@ -430,10 +430,10 @@ static irqreturn_t snd_vt1724_interrupt(int irq, void *dev_id)
                spin_lock(&ice->reg_lock);
                if (++timeout > 10) {
                        status = inb(ICEREG1724(ice, IRQSTAT));
-                       printk(KERN_ERR "ice1724: Too long irq loop, "
-                              "status = 0x%x\n", status);
+                       dev_err(ice->card->dev,
+                               "Too long irq loop, status = 0x%x\n", status);
                        if (status & VT1724_IRQ_MPU_TX) {
-                               printk(KERN_ERR "ice1724: Disabling MPU_TX\n");
+                               dev_err(ice->card->dev, "Disabling MPU_TX\n");
                                enable_midi_irq(ice, VT1724_IRQ_MPU_TX, 0);
                        }
                        spin_unlock(&ice->reg_lock);
@@ -801,7 +801,7 @@ static int snd_vt1724_playback_pro_prepare(struct snd_pcm_substream *substream)
        spin_unlock_irq(&ice->reg_lock);
 
        /*
-       printk(KERN_DEBUG "pro prepare: ch = %d, addr = 0x%x, "
+       dev_dbg(ice->card->dev, "pro prepare: ch = %d, addr = 0x%x, "
               "buffer = 0x%x, period = 0x%x\n",
               substream->runtime->channels,
               (unsigned int)substream->runtime->dma_addr,
@@ -821,13 +821,13 @@ static snd_pcm_uframes_t snd_vt1724_playback_pro_pointer(struct snd_pcm_substrea
 #if 0 /* read PLAYBACK_ADDR */
        ptr = inl(ICEMT1724(ice, PLAYBACK_ADDR));
        if (ptr < substream->runtime->dma_addr) {
-               snd_printd("ice1724: invalid negative ptr\n");
+               dev_dbg(ice->card->dev, "invalid negative ptr\n");
                return 0;
        }
        ptr -= substream->runtime->dma_addr;
        ptr = bytes_to_frames(substream->runtime, ptr);
        if (ptr >= substream->runtime->buffer_size) {
-               snd_printd("ice1724: invalid ptr %d (size=%d)\n",
+               dev_dbg(ice->card->dev, "invalid ptr %d (size=%d)\n",
                           (int)ptr, (int)substream->runtime->period_size);
                return 0;
        }
@@ -840,7 +840,7 @@ static snd_pcm_uframes_t snd_vt1724_playback_pro_pointer(struct snd_pcm_substrea
        else if (ptr <= substream->runtime->buffer_size)
                ptr = substream->runtime->buffer_size - ptr;
        else {
-               snd_printd("ice1724: invalid ptr %d (size=%d)\n",
+               dev_dbg(ice->card->dev, "invalid ptr %d (size=%d)\n",
                           (int)ptr, (int)substream->runtime->buffer_size);
                ptr = 0;
        }
@@ -884,7 +884,7 @@ static snd_pcm_uframes_t snd_vt1724_pcm_pointer(struct snd_pcm_substream *substr
        else if (ptr <= substream->runtime->buffer_size)
                ptr = substream->runtime->buffer_size - ptr;
        else {
-               snd_printd("ice1724: invalid ptr %d (size=%d)\n",
+               dev_dbg(ice->card->dev, "invalid ptr %d (size=%d)\n",
                           (int)ptr, (int)substream->runtime->buffer_size);
                ptr = 0;
        }
@@ -1508,7 +1508,8 @@ static int snd_vt1724_ac97_mixer(struct snd_ice1712 *ice)
                ac97.private_data = ice;
                err = snd_ac97_mixer(pbus, &ac97, &ice->ac97);
                if (err < 0)
-                       printk(KERN_WARNING "ice1712: cannot initialize pro ac97, skipped\n");
+                       dev_warn(ice->card->dev,
+                                "cannot initialize pro ac97, skipped\n");
                else
                        return 0;
        }
@@ -2271,7 +2272,7 @@ static void wait_i2c_busy(struct snd_ice1712 *ice)
        while ((inb(ICEREG1724(ice, I2C_CTRL)) & VT1724_I2C_BUSY) && t--)
                ;
        if (t == -1)
-               printk(KERN_ERR "ice1724: i2c busy timeout\n");
+               dev_err(ice->card->dev, "i2c busy timeout\n");
 }
 
 unsigned char snd_vt1724_read_i2c(struct snd_ice1712 *ice,
@@ -2287,7 +2288,7 @@ unsigned char snd_vt1724_read_i2c(struct snd_ice1712 *ice,
        val = inb(ICEREG1724(ice, I2C_DATA));
        mutex_unlock(&ice->i2c_mutex);
        /*
-       printk(KERN_DEBUG "i2c_read: [0x%x,0x%x] = 0x%x\n", dev, addr, val);
+       dev_dbg(ice->card->dev, "i2c_read: [0x%x,0x%x] = 0x%x\n", dev, addr, val);
        */
        return val;
 }
@@ -2298,7 +2299,7 @@ void snd_vt1724_write_i2c(struct snd_ice1712 *ice,
        mutex_lock(&ice->i2c_mutex);
        wait_i2c_busy(ice);
        /*
-       printk(KERN_DEBUG "i2c_write: [0x%x,0x%x] = 0x%x\n", dev, addr, data);
+       dev_dbg(ice->card->dev, "i2c_write: [0x%x,0x%x] = 0x%x\n", dev, addr, data);
        */
        outb(addr, ICEREG1724(ice, I2C_BYTE_ADDR));
        outb(data, ICEREG1724(ice, I2C_DATA));
@@ -2335,7 +2336,8 @@ static int snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
                                ((unsigned int)swab16(vendor) << 16) | swab16(device);
                        if (ice->eeprom.subvendor == 0 ||
                            ice->eeprom.subvendor == (unsigned int)-1) {
-                               printk(KERN_ERR "ice1724: No valid ID is found\n");
+                               dev_err(ice->card->dev,
+                                       "No valid ID is found\n");
                                return -ENXIO;
                        }
                }
@@ -2344,7 +2346,8 @@ static int snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
                for (c = *tbl; c->name; c++) {
                        if (modelname && c->model &&
                            !strcmp(modelname, c->model)) {
-                               printk(KERN_INFO "ice1724: Using board model %s\n",
+                               dev_info(ice->card->dev,
+                                        "Using board model %s\n",
                                       c->name);
                                ice->eeprom.subvendor = c->subvendor;
                        } else if (c->subvendor != ice->eeprom.subvendor)
@@ -2353,14 +2356,14 @@ static int snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
                        if (!c->eeprom_size || !c->eeprom_data)
                                goto found;
                        /* if the EEPROM is given by the driver, use it */
-                       snd_printdd("using the defined eeprom..\n");
+                       dev_dbg(ice->card->dev, "using the defined eeprom..\n");
                        ice->eeprom.version = 2;
                        ice->eeprom.size = c->eeprom_size + 6;
                        memcpy(ice->eeprom.data, c->eeprom_data, c->eeprom_size);
                        goto read_skipped;
                }
        }
-       printk(KERN_WARNING "ice1724: No matching model found for ID 0x%x\n",
+       dev_warn(ice->card->dev, "No matching model found for ID 0x%x\n",
               ice->eeprom.subvendor);
 #ifdef CONFIG_PM_SLEEP
        /* assume AC97-only card which can suspend without additional code */
@@ -2372,13 +2375,13 @@ static int snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
        if (ice->eeprom.size < 6)
                ice->eeprom.size = 32;
        else if (ice->eeprom.size > 32) {
-               printk(KERN_ERR "ice1724: Invalid EEPROM (size = %i)\n",
+               dev_err(ice->card->dev, "Invalid EEPROM (size = %i)\n",
                       ice->eeprom.size);
                return -EIO;
        }
        ice->eeprom.version = snd_vt1724_read_i2c(ice, dev, 0x05);
        if (ice->eeprom.version != 1 && ice->eeprom.version != 2)
-               printk(KERN_WARNING "ice1724: Invalid EEPROM version %i\n",
+               dev_warn(ice->card->dev, "Invalid EEPROM version %i\n",
                       ice->eeprom.version);
        size = ice->eeprom.size - 6;
        for (i = 0; i < size; i++)
@@ -2586,7 +2589,7 @@ static int snd_vt1724_create(struct snd_card *card,
 
        if (request_irq(pci->irq, snd_vt1724_interrupt,
                        IRQF_SHARED, KBUILD_MODNAME, ice)) {
-               snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
+               dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
                snd_vt1724_free(ice);
                return -EIO;
        }
index 8855933e710d7fe54e60ddffe6e509558f9b4589..7a6c0786c55c29f9a104c11298148d9e15d0d3a2 100644 (file)
@@ -244,7 +244,7 @@ static void juli_akm_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
        /* AK5385 first, since it requires cold reset affecting both codecs */
        old_gpio = ice->gpio.get_data(ice);
        new_gpio =  (old_gpio & ~GPIO_AK5385A_MASK) | ak5385_pins;
-       /* printk(KERN_DEBUG "JULI - ak5385 set_rate_val: new gpio 0x%x\n",
+       /* dev_dbg(ice->card->dev, "JULI - ak5385 set_rate_val: new gpio 0x%x\n",
                new_gpio); */
        ice->gpio.set_data(ice, new_gpio);
 
@@ -344,7 +344,7 @@ static int juli_mute_put(struct snd_kcontrol *kcontrol,
                        new_gpio =  old_gpio &
                                ~((unsigned int) kcontrol->private_value);
        }
-       /* printk(KERN_DEBUG
+       /* dev_dbg(ice->card->dev,
                "JULI - mute/unmute: control_value: 0x%x, old_gpio: 0x%x, "
                "new_gpio 0x%x\n",
                (unsigned int)ucontrol->value.integer.value[0], old_gpio,
@@ -439,9 +439,9 @@ static void add_slaves(struct snd_card *card,
 {
        for (; *list; list++) {
                struct snd_kcontrol *slave = ctl_find(card, *list);
-               /* printk(KERN_DEBUG "add_slaves - %s\n", *list); */
+               /* dev_dbg(card->dev, "add_slaves - %s\n", *list); */
                if (slave) {
-                       /* printk(KERN_DEBUG "slave %s found\n", *list); */
+                       /* dev_dbg(card->dev, "slave %s found\n", *list); */
                        snd_ctl_add_slave(master, slave);
                }
        }
@@ -536,7 +536,7 @@ static void juli_set_rate(struct snd_ice1712 *ice, unsigned int rate)
 
        old = ice->gpio.get_data(ice);
        new =  (old & ~GPIO_RATE_MASK) | get_gpio_val(rate);
-       /* printk(KERN_DEBUG "JULI - set_rate: old %x, new %x\n",
+       /* dev_dbg(ice->card->dev, "JULI - set_rate: old %x, new %x\n",
                        old & GPIO_RATE_MASK,
                        new & GPIO_RATE_MASK); */
 
@@ -573,7 +573,7 @@ static void juli_ak4114_change(struct ak4114 *ak4114, unsigned char c0,
        if (ice->is_spdif_master(ice) && c1) {
                /* only for SPDIF master mode, rate was changed */
                rate = snd_ak4114_external_rate(ak4114);
-               /* printk(KERN_DEBUG "ak4114 - input rate changed to %d\n",
+               /* dev_dbg(ice->card->dev, "ak4114 - input rate changed to %d\n",
                                rate); */
                juli_akm_set_rate_val(ice->akm, rate);
        }
@@ -628,7 +628,7 @@ static int juli_init(struct snd_ice1712 *ice)
 #endif
 
        if (spec->analog) {
-               printk(KERN_INFO "juli@: analog I/O detected\n");
+               dev_info(ice->card->dev, "juli@: analog I/O detected\n");
                ice->num_total_dacs = 2;
                ice->num_total_adcs = 2;
 
index e610339f7601416c972364192011e4f176819727..f3b491aa3e223ce8fc8825e921ebe9e49067afac 100644 (file)
@@ -98,7 +98,7 @@ static int stac9460_dac_mute(struct snd_ice1712 *ice, int idx,
        new = (~mute << 7 & 0x80) | (old & ~0x80);
        change = (new != old);
        if (change)
-               /*printk ("Volume register 0x%02x: 0x%02x\n", idx, new);*/
+               /* dev_dbg(ice->card->dev, "Volume register 0x%02x: 0x%02x\n", idx, new);*/
                stac9460_put(ice, idx, new);
        return change;
 }
@@ -133,7 +133,7 @@ static int stac9460_dac_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
        /* due to possible conflicts with stac9460_set_rate_val, mutexing */
        mutex_lock(&spec->mute_mutex);
        /*
-       printk(KERN_DEBUG "Mute put: reg 0x%02x, ctrl value: 0x%02x\n", idx,
+       dev_dbg(ice->card->dev, "Mute put: reg 0x%02x, ctrl value: 0x%02x\n", idx,
               ucontrol->value.integer.value[0]);
        */
        change = stac9460_dac_mute(ice, idx, ucontrol->value.integer.value[0]);
@@ -187,7 +187,7 @@ static int stac9460_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
        if (change) {
                ovol =  (0x7f - nvol) | (tmp & 0x80);
                /*
-               printk(KERN_DEBUG "DAC Volume: reg 0x%02x: 0x%02x\n",
+               dev_dbg(ice->card->dev, "DAC Volume: reg 0x%02x: 0x%02x\n",
                       idx, ovol);
                */
                stac9460_put(ice, idx, (0x7f - nvol) | (tmp & 0x80));
@@ -348,7 +348,7 @@ static void stac9460_set_rate_val(struct snd_ice1712 *ice, unsigned int rate)
        for (idx = 0; idx < 7 ; ++idx)
                changed[idx] = stac9460_dac_mute(ice,
                                STAC946X_MASTER_VOLUME + idx, 0);
-       /*printk(KERN_DEBUG "Rate change: %d, new MC: 0x%02x\n", rate, new);*/
+       /*dev_dbg(ice->card->dev, "Rate change: %d, new MC: 0x%02x\n", rate, new);*/
        stac9460_put(ice, STAC946X_MASTER_CLOCKING, new);
        udelay(10);
        /* unmuting - only originally unmuted dacs -
@@ -768,9 +768,10 @@ static int prodigy192_init(struct snd_ice1712 *ice)
                /* from this moment if err = 0 then
                 * spec->ak4114 should not be null
                 */
-               snd_printdd("AK4114 initialized with status %d\n", err);
+               dev_dbg(ice->card->dev,
+                       "AK4114 initialized with status %d\n", err);
        } else
-               snd_printdd("AK4114 not found\n");
+               dev_dbg(ice->card->dev, "AK4114 not found\n");
        if (err < 0)
                return err;
 
index 71c6003ef338a04d5c400b3c0c300d58cf4ddede..2c2df4b74e01420966853324fbeebae6c66b53fa 100644 (file)
@@ -280,7 +280,7 @@ static void qtet_akm_write(struct snd_akm4xxx *ak, int chip,
 
        if (snd_BUG_ON(chip < 0 || chip >= 4))
                return;
-       /*printk(KERN_DEBUG "Writing to AK4620: chip=%d, addr=0x%x,
+       /*dev_dbg(ice->card->dev, "Writing to AK4620: chip=%d, addr=0x%x,
          data=0x%x\n", chip, addr, data);*/
        orig_dir = ice->gpio.get_dir(ice);
        ice->gpio.set_dir(ice, orig_dir | GPIO_SPI_ALL);
@@ -898,7 +898,7 @@ static void qtet_set_rate(struct snd_ice1712 *ice, unsigned int rate)
        new =  (get_cpld(ice) & ~CPLD_CKS_MASK) | get_cks_val(rate);
        /* switch to internal clock, drop CPLD_SYNC_SEL */
        new &= ~CPLD_SYNC_SEL;
-       /* printk(KERN_DEBUG "QT - set_rate: old %x, new %x\n",
+       /* dev_dbg(ice->card->dev, "QT - set_rate: old %x, new %x\n",
           get_cpld(ice), new); */
        set_cpld(ice, new);
 }
@@ -978,7 +978,7 @@ static void qtet_ak4113_change(struct ak4113 *ak4113, unsigned char c0,
                        c1) {
                /* only for SPDIF master mode, rate was changed */
                rate = snd_ak4113_external_rate(ak4113);
-               /* printk(KERN_DEBUG "ak4113 - input rate changed to %d\n",
+               /* dev_dbg(ice->card->dev, "ak4113 - input rate changed to %d\n",
                   rate); */
                qtet_akm_set_rate_val(ice->akm, rate);
        }