diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2011-02-10 17:25:54 +1300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-02-10 18:20:39 +0100 |
commit | 5ed15dafa381d1bb7954c7cec0677c45814017f9 (patch) | |
tree | 9b84f60cb479ec118dad870a411d8c08963ade5e /sound | |
parent | 8121d91c02a1be4884821599472acf405efdc3de (diff) |
ALSA: asihpi - Switch to dev_printk.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/asihpi/hpidspcd.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c index 9b10d9a5c255..f9958e9885ff 100644 --- a/sound/pci/asihpi/hpidspcd.c +++ b/sound/pci/asihpi/hpidspcd.c @@ -71,47 +71,51 @@ short hpi_dsp_code_open(u32 adapter, struct dsp_code *ps_dsp_code, int err; sprintf(fw_name, "asihpi/dsp%04x.bin", adapter); - HPI_DEBUG_LOG(INFO, "requesting firmware for %s\n", fw_name); err = request_firmware(&ps_firmware, fw_name, &ps_dsp_code->ps_dev->dev); + if (err != 0) { - HPI_DEBUG_LOG(ERROR, "%d, request_firmware failed for %s\n", - err, fw_name); + dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev, + "%d, request_firmware failed for %s\n", err, + fw_name); goto error1; } if (ps_firmware->size < sizeof(header)) { - HPI_DEBUG_LOG(ERROR, "header size too small %s\n", fw_name); + dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev, + "Header size too small %s\n", fw_name); goto error2; } memcpy(&header, ps_firmware->data, sizeof(header)); if (header.adapter != adapter) { - HPI_DEBUG_LOG(ERROR, "adapter type incorrect %4x != %4x\n", - header.adapter, adapter); + dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev, + "Adapter type incorrect %4x != %4x\n", header.adapter, + adapter); goto error2; } if (header.size != ps_firmware->size) { - HPI_DEBUG_LOG(ERROR, "code size wrong %d != %ld\n", - header.size, (unsigned long)ps_firmware->size); + dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev, + "Code size wrong %d != %ld\n", header.size, + (unsigned long)ps_firmware->size); goto error2; } if (header.version / 10000 != HPI_VER_DECIMAL / 10000) { - HPI_DEBUG_LOG(ERROR, - "firmware major version mismatch " - "DSP image %d != driver %d\n", header.version, + dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev, + "Firmware Major Version mismatch " + "DSP image %d != Driver %d\n", header.version, HPI_VER_DECIMAL); goto error2; } if (header.version != HPI_VER_DECIMAL) { - HPI_DEBUG_LOG(WARNING, - "version mismatch DSP image %d != driver %d\n", + dev_printk(KERN_WARNING, &ps_dsp_code->ps_dev->dev, + "firmware: version mismatch DSP image %d != Driver %d\n", header.version, HPI_VER_DECIMAL); /* goto error2; still allow driver to load */ } - HPI_DEBUG_LOG(INFO, "dsp code %s opened\n", fw_name); + HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name); ps_dsp_code->ps_firmware = ps_firmware; ps_dsp_code->block_length = header.size / sizeof(u32); ps_dsp_code->word_count = sizeof(header) / sizeof(u32); @@ -148,7 +152,7 @@ void hpi_dsp_code_rewind(struct dsp_code *ps_dsp_code) short hpi_dsp_code_read_word(struct dsp_code *ps_dsp_code, u32 *pword) { if (ps_dsp_code->word_count + 1 > ps_dsp_code->block_length) - return (HPI_ERROR_DSP_FILE_FORMAT); + return HPI_ERROR_DSP_FILE_FORMAT; *pword = ((u32 *)(ps_dsp_code->ps_firmware->data))[ps_dsp_code-> word_count]; |