Commit e7e69265 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Takashi Iwai

sound: pci: au88x0: printk replacement

as pr_* macros are more preffered over printk, so printk replaced
with corresponding pr_* macros.
this patch will generate warning from checkpatch as it only did printk
replacement and didnot fixed other style issues.
Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 848f3a82
...@@ -48,10 +48,10 @@ static void vortex_fix_latency(struct pci_dev *vortex) ...@@ -48,10 +48,10 @@ static void vortex_fix_latency(struct pci_dev *vortex)
{ {
int rc; int rc;
if (!(rc = pci_write_config_byte(vortex, 0x40, 0xff))) { if (!(rc = pci_write_config_byte(vortex, 0x40, 0xff))) {
printk(KERN_INFO CARD_NAME pr_info( CARD_NAME
": vortex latency is 0xff\n"); ": vortex latency is 0xff\n");
} else { } else {
printk(KERN_WARNING CARD_NAME pr_warn( CARD_NAME
": could not set vortex latency: pci error 0x%x\n", rc); ": could not set vortex latency: pci error 0x%x\n", rc);
} }
} }
...@@ -70,10 +70,10 @@ static void vortex_fix_agp_bridge(struct pci_dev *via) ...@@ -70,10 +70,10 @@ static void vortex_fix_agp_bridge(struct pci_dev *via)
if (!(rc = pci_read_config_byte(via, 0x42, &value)) if (!(rc = pci_read_config_byte(via, 0x42, &value))
&& ((value & 0x10) && ((value & 0x10)
|| !(rc = pci_write_config_byte(via, 0x42, value | 0x10)))) { || !(rc = pci_write_config_byte(via, 0x42, value | 0x10)))) {
printk(KERN_INFO CARD_NAME pr_info( CARD_NAME
": bridge config is 0x%x\n", value | 0x10); ": bridge config is 0x%x\n", value | 0x10);
} else { } else {
printk(KERN_WARNING CARD_NAME pr_warn( CARD_NAME
": could not set vortex latency: pci error 0x%x\n", rc); ": could not set vortex latency: pci error 0x%x\n", rc);
} }
} }
...@@ -97,7 +97,7 @@ static void snd_vortex_workaround(struct pci_dev *vortex, int fix) ...@@ -97,7 +97,7 @@ static void snd_vortex_workaround(struct pci_dev *vortex, int fix)
PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL); PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL);
} }
if (via) { if (via) {
printk(KERN_INFO CARD_NAME ": Activating latency workaround...\n"); pr_info( CARD_NAME ": Activating latency workaround...\n");
vortex_fix_latency(vortex); vortex_fix_latency(vortex);
vortex_fix_agp_bridge(via); vortex_fix_agp_bridge(via);
} }
...@@ -153,7 +153,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) ...@@ -153,7 +153,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
return err; return err;
if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 || if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
printk(KERN_ERR "error to set DMA mask\n"); pr_err( "error to set DMA mask\n");
pci_disable_device(pci); pci_disable_device(pci);
return -ENXIO; return -ENXIO;
} }
...@@ -182,7 +182,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) ...@@ -182,7 +182,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
chip->mmio = pci_ioremap_bar(pci, 0); chip->mmio = pci_ioremap_bar(pci, 0);
if (!chip->mmio) { if (!chip->mmio) {
printk(KERN_ERR "MMIO area remap failed.\n"); pr_err( "MMIO area remap failed.\n");
err = -ENOMEM; err = -ENOMEM;
goto ioremap_out; goto ioremap_out;
} }
...@@ -191,14 +191,14 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) ...@@ -191,14 +191,14 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
* This must be done before we do request_irq otherwise we can get spurious * This must be done before we do request_irq otherwise we can get spurious
* interrupts that we do not handle properly and make a mess of things */ * interrupts that we do not handle properly and make a mess of things */
if ((err = vortex_core_init(chip)) != 0) { if ((err = vortex_core_init(chip)) != 0) {
printk(KERN_ERR "hw core init failed\n"); pr_err( "hw core init failed\n");
goto core_out; goto core_out;
} }
if ((err = request_irq(pci->irq, vortex_interrupt, if ((err = request_irq(pci->irq, vortex_interrupt,
IRQF_SHARED, KBUILD_MODNAME, IRQF_SHARED, KBUILD_MODNAME,
chip)) != 0) { chip)) != 0) {
printk(KERN_ERR "cannot grab irq\n"); pr_err( "cannot grab irq\n");
goto irq_out; goto irq_out;
} }
chip->irq = pci->irq; chip->irq = pci->irq;
...@@ -342,10 +342,10 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) ...@@ -342,10 +342,10 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
chip->rev = pci->revision; chip->rev = pci->revision;
#ifdef CHIP_AU8830 #ifdef CHIP_AU8830
if ((chip->rev) != 0xfe && (chip->rev) != 0xfa) { if ((chip->rev) != 0xfe && (chip->rev) != 0xfa) {
printk(KERN_ALERT pr_alert(
"vortex: The revision (%x) of your card has not been seen before.\n", "vortex: The revision (%x) of your card has not been seen before.\n",
chip->rev); chip->rev);
printk(KERN_ALERT pr_alert(
"vortex: Please email the results of 'lspci -vv' to openvortex-dev@nongnu.org.\n"); "vortex: Please email the results of 'lspci -vv' to openvortex-dev@nongnu.org.\n");
snd_card_free(card); snd_card_free(card);
err = -ENODEV; err = -ENODEV;
......
...@@ -463,7 +463,7 @@ static void a3dsrc_ZeroSliceIO(a3dsrc_t * a) ...@@ -463,7 +463,7 @@ static void a3dsrc_ZeroSliceIO(a3dsrc_t * a)
static void a3dsrc_ZeroState(a3dsrc_t * a) static void a3dsrc_ZeroState(a3dsrc_t * a)
{ {
/* /*
printk(KERN_DEBUG "vortex: ZeroState slice: %d, source %d\n", pr_debug( "vortex: ZeroState slice: %d, source %d\n",
a->slice, a->source); a->slice, a->source);
*/ */
a3dsrc_SetAtmosState(a, 0, 0, 0, 0); a3dsrc_SetAtmosState(a, 0, 0, 0, 0);
...@@ -489,7 +489,7 @@ static void a3dsrc_ZeroStateA3D(a3dsrc_t * a) ...@@ -489,7 +489,7 @@ static void a3dsrc_ZeroStateA3D(a3dsrc_t * a)
int i, var, var2; int i, var, var2;
if ((a->vortex) == NULL) { if ((a->vortex) == NULL) {
printk(KERN_ERR "vortex: ZeroStateA3D: ERROR: a->vortex is NULL\n"); pr_err( "vortex: ZeroStateA3D: ERROR: a->vortex is NULL\n");
return; return;
} }
...@@ -628,14 +628,14 @@ static void vortex_Vort3D_connect(vortex_t * v, int en) ...@@ -628,14 +628,14 @@ static void vortex_Vort3D_connect(vortex_t * v, int en)
v->mixxtlk[0] = v->mixxtlk[0] =
vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN); vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN);
if (v->mixxtlk[0] < 0) { if (v->mixxtlk[0] < 0) {
printk pr_warn
("vortex: vortex_Vort3D: ERROR: not enough free mixer resources.\n"); ("vortex: vortex_Vort3D: ERROR: not enough free mixer resources.\n");
return; return;
} }
v->mixxtlk[1] = v->mixxtlk[1] =
vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN); vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN);
if (v->mixxtlk[1] < 0) { if (v->mixxtlk[1] < 0) {
printk pr_warn
("vortex: vortex_Vort3D: ERROR: not enough free mixer resources.\n"); ("vortex: vortex_Vort3D: ERROR: not enough free mixer resources.\n");
return; return;
} }
...@@ -679,7 +679,7 @@ static void vortex_Vort3D_connect(vortex_t * v, int en) ...@@ -679,7 +679,7 @@ static void vortex_Vort3D_connect(vortex_t * v, int en)
static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en) static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en)
{ {
if (a->vortex == NULL) { if (a->vortex == NULL) {
printk pr_warn
("vortex: Vort3D_InitializeSource: A3D source not initialized\n"); ("vortex: Vort3D_InitializeSource: A3D source not initialized\n");
return; return;
} }
......
This diff is collapsed.
...@@ -845,7 +845,7 @@ snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *u ...@@ -845,7 +845,7 @@ snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *u
vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count); vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count);
if (count != 20) { if (count != 20) {
printk(KERN_ERR "vortex: peak count error 20 != %d \n", count); pr_err( "vortex: peak count error 20 != %d \n", count);
return -1; return -1;
} }
for (i = 0; i < 20; i++) for (i = 0; i < 20; i++)
......
...@@ -98,7 +98,7 @@ static int vortex_gameport_register(vortex_t *vortex) ...@@ -98,7 +98,7 @@ static int vortex_gameport_register(vortex_t *vortex)
vortex->gameport = gp = gameport_allocate_port(); vortex->gameport = gp = gameport_allocate_port();
if (!gp) { if (!gp) {
printk(KERN_ERR "vortex: cannot allocate memory for gameport\n"); pr_err( "vortex: cannot allocate memory for gameport\n");
return -ENOMEM; return -ENOMEM;
} }
......
...@@ -73,7 +73,7 @@ static int snd_vortex_midi(vortex_t *vortex) ...@@ -73,7 +73,7 @@ static int snd_vortex_midi(vortex_t *vortex)
/* Check if anything is OK. */ /* Check if anything is OK. */
temp = hwread(vortex->mmio, VORTEX_MIDI_DATA); temp = hwread(vortex->mmio, VORTEX_MIDI_DATA);
if (temp != MPU401_ACK /*0xfe */ ) { if (temp != MPU401_ACK /*0xfe */ ) {
printk(KERN_ERR "midi port doesn't acknowledge!\n"); pr_err( "midi port doesn't acknowledge!\n");
return -ENODEV; return -ENODEV;
} }
/* Enable MPU401 interrupts. */ /* Enable MPU401 interrupts. */
......
...@@ -227,11 +227,11 @@ snd_vortex_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -227,11 +227,11 @@ snd_vortex_pcm_hw_params(struct snd_pcm_substream *substream,
err = err =
snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
if (err < 0) { if (err < 0) {
printk(KERN_ERR "Vortex: pcm page alloc failed!\n"); pr_err( "Vortex: pcm page alloc failed!\n");
return err; return err;
} }
/* /*
printk(KERN_INFO "Vortex: periods %d, period_bytes %d, channels = %d\n", params_periods(hw_params), pr_info( "Vortex: periods %d, period_bytes %d, channels = %d\n", params_periods(hw_params),
params_period_bytes(hw_params), params_channels(hw_params)); params_period_bytes(hw_params), params_channels(hw_params));
*/ */
spin_lock_irq(&chip->lock); spin_lock_irq(&chip->lock);
...@@ -371,7 +371,7 @@ static int snd_vortex_pcm_trigger(struct snd_pcm_substream *substream, int cmd) ...@@ -371,7 +371,7 @@ static int snd_vortex_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
} }
#ifndef CHIP_AU8810 #ifndef CHIP_AU8810
else { else {
printk(KERN_INFO "vortex: wt start %d\n", dma); pr_info( "vortex: wt start %d\n", dma);
vortex_wtdma_startfifo(chip, dma); vortex_wtdma_startfifo(chip, dma);
} }
#endif #endif
...@@ -384,7 +384,7 @@ static int snd_vortex_pcm_trigger(struct snd_pcm_substream *substream, int cmd) ...@@ -384,7 +384,7 @@ static int snd_vortex_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
vortex_adbdma_stopfifo(chip, dma); vortex_adbdma_stopfifo(chip, dma);
#ifndef CHIP_AU8810 #ifndef CHIP_AU8810
else { else {
printk(KERN_INFO "vortex: wt stop %d\n", dma); pr_info( "vortex: wt stop %d\n", dma);
vortex_wtdma_stopfifo(chip, dma); vortex_wtdma_stopfifo(chip, dma);
} }
#endif #endif
......
...@@ -90,7 +90,7 @@ static int vortex_wt_allocroute(vortex_t * vortex, int wt, int nr_ch) ...@@ -90,7 +90,7 @@ static int vortex_wt_allocroute(vortex_t * vortex, int wt, int nr_ch)
hwwrite(vortex->mmio, WT_PARM(wt, 2), 0); hwwrite(vortex->mmio, WT_PARM(wt, 2), 0);
temp = hwread(vortex->mmio, WT_PARM(wt, 3)); temp = hwread(vortex->mmio, WT_PARM(wt, 3));
printk(KERN_DEBUG "vortex: WT PARM3: %x\n", temp); pr_debug( "vortex: WT PARM3: %x\n", temp);
//hwwrite(vortex->mmio, WT_PARM(wt, 3), temp); //hwwrite(vortex->mmio, WT_PARM(wt, 3), temp);
hwwrite(vortex->mmio, WT_DELAY(wt, 0), 0); hwwrite(vortex->mmio, WT_DELAY(wt, 0), 0);
...@@ -98,7 +98,7 @@ static int vortex_wt_allocroute(vortex_t * vortex, int wt, int nr_ch) ...@@ -98,7 +98,7 @@ static int vortex_wt_allocroute(vortex_t * vortex, int wt, int nr_ch)
hwwrite(vortex->mmio, WT_DELAY(wt, 2), 0); hwwrite(vortex->mmio, WT_DELAY(wt, 2), 0);
hwwrite(vortex->mmio, WT_DELAY(wt, 3), 0); hwwrite(vortex->mmio, WT_DELAY(wt, 3), 0);
printk(KERN_DEBUG "vortex: WT GMODE: %x\n", hwread(vortex->mmio, WT_GMODE(wt))); pr_debug( "vortex: WT GMODE: %x\n", hwread(vortex->mmio, WT_GMODE(wt)));
hwwrite(vortex->mmio, WT_PARM(wt, 2), 0xffffffff); hwwrite(vortex->mmio, WT_PARM(wt, 2), 0xffffffff);
hwwrite(vortex->mmio, WT_PARM(wt, 3), 0xcff1c810); hwwrite(vortex->mmio, WT_PARM(wt, 3), 0xcff1c810);
...@@ -106,7 +106,7 @@ static int vortex_wt_allocroute(vortex_t * vortex, int wt, int nr_ch) ...@@ -106,7 +106,7 @@ static int vortex_wt_allocroute(vortex_t * vortex, int wt, int nr_ch)
voice->parm0 = voice->parm1 = 0xcfb23e2f; voice->parm0 = voice->parm1 = 0xcfb23e2f;
hwwrite(vortex->mmio, WT_PARM(wt, 0), voice->parm0); hwwrite(vortex->mmio, WT_PARM(wt, 0), voice->parm0);
hwwrite(vortex->mmio, WT_PARM(wt, 1), voice->parm1); hwwrite(vortex->mmio, WT_PARM(wt, 1), voice->parm1);
printk(KERN_DEBUG "vortex: WT GMODE 2 : %x\n", hwread(vortex->mmio, WT_GMODE(wt))); pr_debug( "vortex: WT GMODE 2 : %x\n", hwread(vortex->mmio, WT_GMODE(wt)));
return 0; return 0;
} }
...@@ -196,14 +196,14 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt, ...@@ -196,14 +196,14 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
if ((reg == 5) || ((reg >= 7) && (reg <= 10)) || (reg == 0xc)) { if ((reg == 5) || ((reg >= 7) && (reg <= 10)) || (reg == 0xc)) {
if (wt >= (NR_WT / NR_WT_PB)) { if (wt >= (NR_WT / NR_WT_PB)) {
printk pr_warn
("vortex: WT SetReg: bank out of range. reg=0x%x, wt=%d\n", ("vortex: WT SetReg: bank out of range. reg=0x%x, wt=%d\n",
reg, wt); reg, wt);
return 0; return 0;
} }
} else { } else {
if (wt >= NR_WT) { if (wt >= NR_WT) {
printk(KERN_ERR "vortex: WT SetReg: voice out of range\n"); pr_err( "vortex: WT SetReg: voice out of range\n");
return 0; return 0;
} }
} }
...@@ -214,42 +214,42 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt, ...@@ -214,42 +214,42 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
/* Voice specific parameters */ /* Voice specific parameters */
case 0: /* running */ case 0: /* running */
/* /*
printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n", pr_debug( "vortex: WT SetReg(0x%x) = 0x%08x\n",
WT_RUN(wt), (int)val); WT_RUN(wt), (int)val);
*/ */
hwwrite(vortex->mmio, WT_RUN(wt), val); hwwrite(vortex->mmio, WT_RUN(wt), val);
return 0xc; return 0xc;
case 1: /* param 0 */ case 1: /* param 0 */
/* /*
printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n", pr_debug( "vortex: WT SetReg(0x%x) = 0x%08x\n",
WT_PARM(wt,0), (int)val); WT_PARM(wt,0), (int)val);
*/ */
hwwrite(vortex->mmio, WT_PARM(wt, 0), val); hwwrite(vortex->mmio, WT_PARM(wt, 0), val);
return 0xc; return 0xc;
case 2: /* param 1 */ case 2: /* param 1 */
/* /*
printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n", pr_debug( "vortex: WT SetReg(0x%x) = 0x%08x\n",
WT_PARM(wt,1), (int)val); WT_PARM(wt,1), (int)val);
*/ */
hwwrite(vortex->mmio, WT_PARM(wt, 1), val); hwwrite(vortex->mmio, WT_PARM(wt, 1), val);
return 0xc; return 0xc;
case 3: /* param 2 */ case 3: /* param 2 */
/* /*
printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n", pr_debug( "vortex: WT SetReg(0x%x) = 0x%08x\n",
WT_PARM(wt,2), (int)val); WT_PARM(wt,2), (int)val);
*/ */
hwwrite(vortex->mmio, WT_PARM(wt, 2), val); hwwrite(vortex->mmio, WT_PARM(wt, 2), val);
return 0xc; return 0xc;
case 4: /* param 3 */ case 4: /* param 3 */
/* /*
printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n", pr_debug( "vortex: WT SetReg(0x%x) = 0x%08x\n",
WT_PARM(wt,3), (int)val); WT_PARM(wt,3), (int)val);
*/ */
hwwrite(vortex->mmio, WT_PARM(wt, 3), val); hwwrite(vortex->mmio, WT_PARM(wt, 3), val);
return 0xc; return 0xc;
case 6: /* mute */ case 6: /* mute */
/* /*
printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n", pr_debug( "vortex: WT SetReg(0x%x) = 0x%08x\n",
WT_MUTE(wt), (int)val); WT_MUTE(wt), (int)val);
*/ */
hwwrite(vortex->mmio, WT_MUTE(wt), val); hwwrite(vortex->mmio, WT_MUTE(wt), val);
...@@ -257,7 +257,7 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt, ...@@ -257,7 +257,7 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
case 0xb: case 0xb:
/* delay */ /* delay */
/* /*
printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n", pr_debug( "vortex: WT SetReg(0x%x) = 0x%08x\n",
WT_DELAY(wt,0), (int)val); WT_DELAY(wt,0), (int)val);
*/ */
hwwrite(vortex->mmio, WT_DELAY(wt, 3), val); hwwrite(vortex->mmio, WT_DELAY(wt, 3), val);
...@@ -285,7 +285,7 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt, ...@@ -285,7 +285,7 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
return 0; return 0;
} }
/* /*
printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n", ecx, (int)val); pr_debug( "vortex: WT SetReg(0x%x) = 0x%08x\n", ecx, (int)val);
*/ */
hwwrite(vortex->mmio, ecx, val); hwwrite(vortex->mmio, ecx, val);
return 1; return 1;
......
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