Commit 4ee3bffc authored by Joe Perches's avatar Joe Perches Committed by Takashi Iwai

ALSA: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce multiline formats for easier grep.
Coalesce segmented single line formats too.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9c7066ae
...@@ -49,14 +49,12 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, ...@@ -49,14 +49,12 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
err = request_firmware(&firmware, fw_name, &dev->dev); err = request_firmware(&firmware, fw_name, &dev->dev);
if (err || !firmware) { if (err || !firmware) {
dev_printk(KERN_ERR, &dev->dev, dev_err(&dev->dev, "%d, request_firmware failed for %s\n",
"%d, request_firmware failed for %s\n", err, err, fw_name);
fw_name);
goto error1; goto error1;
} }
if (firmware->size < sizeof(header)) { if (firmware->size < sizeof(header)) {
dev_printk(KERN_ERR, &dev->dev, "Header size too small %s\n", dev_err(&dev->dev, "Header size too small %s\n", fw_name);
fw_name);
goto error2; goto error2;
} }
memcpy(&header, firmware->data, sizeof(header)); memcpy(&header, firmware->data, sizeof(header));
...@@ -64,7 +62,7 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, ...@@ -64,7 +62,7 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
if ((header.type != 0x45444F43) || /* "CODE" */ if ((header.type != 0x45444F43) || /* "CODE" */
(header.adapter != adapter) (header.adapter != adapter)
|| (header.size != firmware->size)) { || (header.size != firmware->size)) {
dev_printk(KERN_ERR, &dev->dev, dev_err(&dev->dev,
"Invalid firmware header size %d != file %zd\n", "Invalid firmware header size %d != file %zd\n",
header.size, firmware->size); header.size, firmware->size);
goto error2; goto error2;
...@@ -72,17 +70,15 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, ...@@ -72,17 +70,15 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
if ((header.version >> 9) != (HPI_VER >> 9)) { if ((header.version >> 9) != (HPI_VER >> 9)) {
/* Consider even and subsequent odd minor versions to be compatible */ /* Consider even and subsequent odd minor versions to be compatible */
dev_printk(KERN_ERR, &dev->dev, dev_err(&dev->dev, "Incompatible firmware version DSP image %X != Driver %X\n",
"Incompatible firmware version " header.version, HPI_VER);
"DSP image %X != Driver %X\n", header.version,
HPI_VER);
goto error2; goto error2;
} }
if (header.version != HPI_VER) { if (header.version != HPI_VER) {
dev_printk(KERN_INFO, &dev->dev, dev_info(&dev->dev,
"Firmware: release version mismatch DSP image %X != Driver %X\n", "Firmware: release version mismatch DSP image %X != Driver %X\n",
header.version, HPI_VER); header.version, HPI_VER);
} }
HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name); HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);
......
...@@ -326,7 +326,7 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev, ...@@ -326,7 +326,7 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
pci_dev->subsystem_device, pci_dev->devfn); pci_dev->subsystem_device, pci_dev->devfn);
if (pci_enable_device(pci_dev) < 0) { if (pci_enable_device(pci_dev) < 0) {
dev_printk(KERN_ERR, &pci_dev->dev, dev_err(&pci_dev->dev,
"pci_enable_device failed, disabling device\n"); "pci_enable_device failed, disabling device\n");
return -EIO; return -EIO;
} }
...@@ -398,9 +398,8 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev, ...@@ -398,9 +398,8 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
mutex_init(&adapters[adapter_index].mutex); mutex_init(&adapters[adapter_index].mutex);
pci_set_drvdata(pci_dev, &adapters[adapter_index]); pci_set_drvdata(pci_dev, &adapters[adapter_index]);
dev_printk(KERN_INFO, &pci_dev->dev, dev_info(&pci_dev->dev, "probe succeeded for ASI%04X HPI index %d\n",
"probe succeeded for ASI%04X HPI index %d\n", adapter.adapter->type, adapter_index);
adapter.adapter->type, adapter_index);
return 0; return 0;
...@@ -448,11 +447,11 @@ void __devexit asihpi_adapter_remove(struct pci_dev *pci_dev) ...@@ -448,11 +447,11 @@ void __devexit asihpi_adapter_remove(struct pci_dev *pci_dev)
pci_set_drvdata(pci_dev, NULL); pci_set_drvdata(pci_dev, NULL);
if (1) if (1)
dev_printk(KERN_INFO, &pci_dev->dev, dev_info(&pci_dev->dev,
"remove %04x:%04x,%04x:%04x,%04x," " HPI index %d.\n", "remove %04x:%04x,%04x:%04x,%04x, HPI index %d\n",
pci_dev->vendor, pci_dev->device, pci_dev->vendor, pci_dev->device,
pci_dev->subsystem_vendor, pci_dev->subsystem_device, pci_dev->subsystem_vendor, pci_dev->subsystem_device,
pci_dev->devfn, pa->adapter->index); pci_dev->devfn, pa->adapter->index);
memset(pa, 0, sizeof(*pa)); memset(pa, 0, sizeof(*pa));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment