diff options
author | Joe Perches <joe@perches.com> | 2012-10-28 04:05:54 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-10-28 04:56:20 -0400 |
commit | 4ee3bffca4fad13a4cb672158dce0def41ab3a54 (patch) | |
tree | 7eea29ced4e3bb5ec259d6ecae225610d5d9e11b /sound/pci/asihpi | |
parent | 9c7066aef4a5eb8e4063de28f06c508bf6f2963a (diff) |
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: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi')
-rw-r--r-- | sound/pci/asihpi/hpidspcd.c | 22 | ||||
-rw-r--r-- | sound/pci/asihpi/hpioctl.c | 17 |
2 files changed, 17 insertions, 22 deletions
diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c index 456a758f04f6..ac9163770013 100644 --- a/sound/pci/asihpi/hpidspcd.c +++ b/sound/pci/asihpi/hpidspcd.c | |||
@@ -49,14 +49,12 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, | |||
49 | err = request_firmware(&firmware, fw_name, &dev->dev); | 49 | err = request_firmware(&firmware, fw_name, &dev->dev); |
50 | 50 | ||
51 | if (err || !firmware) { | 51 | if (err || !firmware) { |
52 | dev_printk(KERN_ERR, &dev->dev, | 52 | dev_err(&dev->dev, "%d, request_firmware failed for %s\n", |
53 | "%d, request_firmware failed for %s\n", err, | 53 | err, fw_name); |
54 | fw_name); | ||
55 | goto error1; | 54 | goto error1; |
56 | } | 55 | } |
57 | if (firmware->size < sizeof(header)) { | 56 | if (firmware->size < sizeof(header)) { |
58 | dev_printk(KERN_ERR, &dev->dev, "Header size too small %s\n", | 57 | dev_err(&dev->dev, "Header size too small %s\n", fw_name); |
59 | fw_name); | ||
60 | goto error2; | 58 | goto error2; |
61 | } | 59 | } |
62 | memcpy(&header, firmware->data, sizeof(header)); | 60 | 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 | if ((header.type != 0x45444F43) || /* "CODE" */ | 62 | if ((header.type != 0x45444F43) || /* "CODE" */ |
65 | (header.adapter != adapter) | 63 | (header.adapter != adapter) |
66 | || (header.size != firmware->size)) { | 64 | || (header.size != firmware->size)) { |
67 | dev_printk(KERN_ERR, &dev->dev, | 65 | dev_err(&dev->dev, |
68 | "Invalid firmware header size %d != file %zd\n", | 66 | "Invalid firmware header size %d != file %zd\n", |
69 | header.size, firmware->size); | 67 | header.size, firmware->size); |
70 | goto error2; | 68 | goto error2; |
@@ -72,17 +70,15 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, | |||
72 | 70 | ||
73 | if ((header.version >> 9) != (HPI_VER >> 9)) { | 71 | if ((header.version >> 9) != (HPI_VER >> 9)) { |
74 | /* Consider even and subsequent odd minor versions to be compatible */ | 72 | /* Consider even and subsequent odd minor versions to be compatible */ |
75 | dev_printk(KERN_ERR, &dev->dev, | 73 | dev_err(&dev->dev, "Incompatible firmware version DSP image %X != Driver %X\n", |
76 | "Incompatible firmware version " | 74 | header.version, HPI_VER); |
77 | "DSP image %X != Driver %X\n", header.version, | ||
78 | HPI_VER); | ||
79 | goto error2; | 75 | goto error2; |
80 | } | 76 | } |
81 | 77 | ||
82 | if (header.version != HPI_VER) { | 78 | if (header.version != HPI_VER) { |
83 | dev_printk(KERN_INFO, &dev->dev, | 79 | dev_info(&dev->dev, |
84 | "Firmware: release version mismatch DSP image %X != Driver %X\n", | 80 | "Firmware: release version mismatch DSP image %X != Driver %X\n", |
85 | header.version, HPI_VER); | 81 | header.version, HPI_VER); |
86 | } | 82 | } |
87 | 83 | ||
88 | HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name); | 84 | HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name); |
diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c index 609156205562..8f9674972376 100644 --- a/sound/pci/asihpi/hpioctl.c +++ b/sound/pci/asihpi/hpioctl.c | |||
@@ -326,7 +326,7 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev, | |||
326 | pci_dev->subsystem_device, pci_dev->devfn); | 326 | pci_dev->subsystem_device, pci_dev->devfn); |
327 | 327 | ||
328 | if (pci_enable_device(pci_dev) < 0) { | 328 | if (pci_enable_device(pci_dev) < 0) { |
329 | dev_printk(KERN_ERR, &pci_dev->dev, | 329 | dev_err(&pci_dev->dev, |
330 | "pci_enable_device failed, disabling device\n"); | 330 | "pci_enable_device failed, disabling device\n"); |
331 | return -EIO; | 331 | return -EIO; |
332 | } | 332 | } |
@@ -398,9 +398,8 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev, | |||
398 | mutex_init(&adapters[adapter_index].mutex); | 398 | mutex_init(&adapters[adapter_index].mutex); |
399 | pci_set_drvdata(pci_dev, &adapters[adapter_index]); | 399 | pci_set_drvdata(pci_dev, &adapters[adapter_index]); |
400 | 400 | ||
401 | dev_printk(KERN_INFO, &pci_dev->dev, | 401 | dev_info(&pci_dev->dev, "probe succeeded for ASI%04X HPI index %d\n", |
402 | "probe succeeded for ASI%04X HPI index %d\n", | 402 | adapter.adapter->type, adapter_index); |
403 | adapter.adapter->type, adapter_index); | ||
404 | 403 | ||
405 | return 0; | 404 | return 0; |
406 | 405 | ||
@@ -448,11 +447,11 @@ void __devexit asihpi_adapter_remove(struct pci_dev *pci_dev) | |||
448 | 447 | ||
449 | pci_set_drvdata(pci_dev, NULL); | 448 | pci_set_drvdata(pci_dev, NULL); |
450 | if (1) | 449 | if (1) |
451 | dev_printk(KERN_INFO, &pci_dev->dev, | 450 | dev_info(&pci_dev->dev, |
452 | "remove %04x:%04x,%04x:%04x,%04x," " HPI index %d.\n", | 451 | "remove %04x:%04x,%04x:%04x,%04x, HPI index %d\n", |
453 | pci_dev->vendor, pci_dev->device, | 452 | pci_dev->vendor, pci_dev->device, |
454 | pci_dev->subsystem_vendor, pci_dev->subsystem_device, | 453 | pci_dev->subsystem_vendor, pci_dev->subsystem_device, |
455 | pci_dev->devfn, pa->adapter->index); | 454 | pci_dev->devfn, pa->adapter->index); |
456 | 455 | ||
457 | memset(pa, 0, sizeof(*pa)); | 456 | memset(pa, 0, sizeof(*pa)); |
458 | } | 457 | } |