Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e720b820 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Takashi Iwai
Browse files

ALSA: ctxfi: prink replacement



as pr_* macros are more preffered over printk, so printk replaced with corresponding pr_err and pr_alert
this patch will generate a warning from checkpatch for an unnecessary space before new line and has not been fixed as this patch is only for printk replacement.

Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 57f2d8b7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ static int get_amixer_rsc(struct amixer_mgr *mgr,
	}
	spin_unlock_irqrestore(&mgr->mgr_lock, flags);
	if (err) {
		printk(KERN_ERR "ctxfi: Can't meet AMIXER resource request!\n");
		pr_err("ctxfi: Can't meet AMIXER resource request!\n");
		goto error;
	}

@@ -411,7 +411,7 @@ static int get_sum_rsc(struct sum_mgr *mgr,
	}
	spin_unlock_irqrestore(&mgr->mgr_lock, flags);
	if (err) {
		printk(KERN_ERR "ctxfi: Can't meet SUM resource request!\n");
		pr_err("ctxfi: Can't meet SUM resource request!\n");
		goto error;
	}

+10 −10
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ static unsigned int convert_format(snd_pcm_format_t snd_format)
	case SNDRV_PCM_FORMAT_FLOAT_LE:
		return SRC_SF_F32;
	default:
		printk(KERN_ERR "ctxfi: not recognized snd format is %d \n",
		pr_err("ctxfi: not recognized snd format is %d \n",
			snd_format);
		return SRC_SF_S16;
	}
@@ -1282,7 +1282,7 @@ static int atc_identify_card(struct ct_atc *atc, unsigned int ssid)
	p = snd_pci_quirk_lookup_id(vendor_id, device_id, list);
	if (p) {
		if (p->value < 0) {
			printk(KERN_ERR "ctxfi: "
			pr_err("ctxfi: "
			       "Device %04x:%04x is black-listed\n",
			       vendor_id, device_id);
			return -ENOENT;
@@ -1315,7 +1315,7 @@ int ct_atc_create_alsa_devs(struct ct_atc *atc)
		err = alsa_dev_funcs[i].create(atc, i,
				alsa_dev_funcs[i].public_name);
		if (err) {
			printk(KERN_ERR "ctxfi: "
			pr_err("ctxfi: "
			       "Creating alsa device %d failed!\n", i);
			return err;
		}
@@ -1332,7 +1332,7 @@ static int atc_create_hw_devs(struct ct_atc *atc)

	err = create_hw_obj(atc->pci, atc->chip_type, atc->model, &hw);
	if (err) {
		printk(KERN_ERR "Failed to create hw obj!!!\n");
		pr_err("Failed to create hw obj!!!\n");
		return err;
	}
	atc->hw = hw;
@@ -1351,7 +1351,7 @@ static int atc_create_hw_devs(struct ct_atc *atc)

		err = rsc_mgr_funcs[i].create(atc->hw, &atc->rsc_mgrs[i]);
		if (err) {
			printk(KERN_ERR "ctxfi: "
			pr_err("ctxfi: "
			       "Failed to create rsc_mgr %d!!!\n", i);
			return err;
		}
@@ -1399,7 +1399,7 @@ static int atc_get_resources(struct ct_atc *atc)
		err = daio_mgr->get_daio(daio_mgr, &da_desc,
					(struct daio **)&atc->daios[i]);
		if (err) {
			printk(KERN_ERR "ctxfi: Failed to get DAIO "
			pr_err("ctxfi: Failed to get DAIO "
					"resource %d!!!\n", i);
			return err;
		}
@@ -1603,7 +1603,7 @@ static int atc_resume(struct ct_atc *atc)
	/* Do hardware resume. */
	err = atc_hw_resume(atc);
	if (err < 0) {
		printk(KERN_ERR "ctxfi: pci_enable_device failed, "
		pr_err("ctxfi: pci_enable_device failed, "
		       "disabling device\n");
		snd_card_disconnect(atc->card);
		return err;
@@ -1701,7 +1701,7 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,
	/* Find card model */
	err = atc_identify_card(atc, ssid);
	if (err < 0) {
		printk(KERN_ERR "ctatc: Card not recognised\n");
		pr_err("ctatc: Card not recognised\n");
		goto error1;
	}

@@ -1717,7 +1717,7 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,

	err = ct_mixer_create(atc, (struct ct_mixer **)&atc->mixer);
	if (err) {
		printk(KERN_ERR "ctxfi: Failed to create mixer obj!!!\n");
		pr_err("ctxfi: Failed to create mixer obj!!!\n");
		goto error1;
	}

@@ -1744,6 +1744,6 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,

error1:
	ct_atc_destroy(atc);
	printk(KERN_ERR "ctxfi: Something wrong!!!\n");
	pr_err("ctxfi: Something wrong!!!\n");
	return err;
}
+1 −1
Original line number Diff line number Diff line
@@ -541,7 +541,7 @@ static int get_daio_rsc(struct daio_mgr *mgr,
	err = daio_mgr_get_rsc(&mgr->mgr, desc->type);
	spin_unlock_irqrestore(&mgr->mgr_lock, flags);
	if (err) {
		printk(KERN_ERR "Can't meet DAIO resource request!\n");
		pr_err("Can't meet DAIO resource request!\n");
		return err;
	}

+5 −5
Original line number Diff line number Diff line
@@ -1268,7 +1268,7 @@ static int hw_trn_init(struct hw *hw, const struct trn_conf *info)

	/* Set up device page table */
	if ((~0UL) == info->vm_pgt_phys) {
		printk(KERN_ERR "Wrong device page table page address!\n");
		pr_err("Wrong device page table page address!\n");
		return -1;
	}

@@ -1327,7 +1327,7 @@ static int hw_pll_init(struct hw *hw, unsigned int rsr)
		mdelay(40);
	}
	if (i >= 3) {
		printk(KERN_ALERT "PLL initialization failed!!!\n");
		pr_alert("PLL initialization failed!!!\n");
		return -EBUSY;
	}

@@ -1351,7 +1351,7 @@ static int hw_auto_init(struct hw *hw)
			break;
	}
	if (!get_field(gctl, GCTL_AID)) {
		printk(KERN_ALERT "Card Auto-init failed!!!\n");
		pr_alert("Card Auto-init failed!!!\n");
		return -EBUSY;
	}

@@ -1911,7 +1911,7 @@ static int hw_card_start(struct hw *hw)
	/* Set DMA transfer mask */
	if (pci_set_dma_mask(pci, CT_XFI_DMA_MASK) < 0 ||
	    pci_set_consistent_dma_mask(pci, CT_XFI_DMA_MASK) < 0) {
		printk(KERN_ERR "architecture does not support PCI "
		pr_err("architecture does not support PCI "
				"busmaster DMA with mask 0x%llx\n",
		       CT_XFI_DMA_MASK);
		err = -ENXIO;
@@ -1942,7 +1942,7 @@ static int hw_card_start(struct hw *hw)
		err = request_irq(pci->irq, ct_20k1_interrupt, IRQF_SHARED,
				  KBUILD_MODNAME, hw);
		if (err < 0) {
			printk(KERN_ERR "XFi: Cannot get irq %d\n", pci->irq);
			pr_err("XFi: Cannot get irq %d\n", pci->irq);
			goto error2;
		}
		hw->irq = pci->irq;
+8 −8
Original line number Diff line number Diff line
@@ -1187,7 +1187,7 @@ static int hw_daio_init(struct hw *hw, const struct daio_conf *info)
		hw_write_20kx(hw, AUDIO_IO_TX_BLRCLK, 0x21212121);
		hw_write_20kx(hw, AUDIO_IO_RX_BLRCLK, 0);
	} else {
		printk(KERN_ALERT "ctxfi: ERROR!!! Invalid sampling rate!!!\n");
		pr_alert("ctxfi: ERROR!!! Invalid sampling rate!!!\n");
		return -EINVAL;
	}

@@ -1246,7 +1246,7 @@ static int hw_trn_init(struct hw *hw, const struct trn_conf *info)

	/* Set up device page table */
	if ((~0UL) == info->vm_pgt_phys) {
		printk(KERN_ALERT "ctxfi: "
		pr_alert("ctxfi: "
		       "Wrong device page table page address!!!\n");
		return -1;
	}
@@ -1352,7 +1352,7 @@ static int hw_pll_init(struct hw *hw, unsigned int rsr)
		break;
	}
	if (i >= 1000) {
		printk(KERN_ALERT "ctxfi: PLL initialization failed!!!\n");
		pr_alert("ctxfi: PLL initialization failed!!!\n");
		return -EBUSY;
	}

@@ -1376,7 +1376,7 @@ static int hw_auto_init(struct hw *hw)
			break;
	}
	if (!get_field(gctl, GCTL_AID)) {
		printk(KERN_ALERT "ctxfi: Card Auto-init failed!!!\n");
		pr_alert("ctxfi: Card Auto-init failed!!!\n");
		return -EBUSY;
	}

@@ -1847,7 +1847,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
	/* Initialize I2C */
	err = hw20k2_i2c_init(hw, 0x1A, 1, 1);
	if (err < 0) {
		printk(KERN_ALERT "ctxfi: Failure to acquire I2C!!!\n");
		pr_alert("ctxfi: Failure to acquire I2C!!!\n");
		goto error;
	}

@@ -1890,7 +1890,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
		hw20k2_i2c_write(hw, MAKE_WM8775_ADDR(WM8775_MMC, 0x0A),
						MAKE_WM8775_DATA(0x0A));
	} else {
		printk(KERN_ALERT "ctxfi: Invalid master sampling "
		pr_alert("ctxfi: Invalid master sampling "
				  "rate (msr %d)!!!\n", info->msr);
		err = -EINVAL;
		goto error;
@@ -2034,7 +2034,7 @@ static int hw_card_start(struct hw *hw)
	/* Set DMA transfer mask */
	if (pci_set_dma_mask(pci, CT_XFI_DMA_MASK) < 0 ||
	    pci_set_consistent_dma_mask(pci, CT_XFI_DMA_MASK) < 0) {
		printk(KERN_ERR "ctxfi: architecture does not support PCI "
		pr_err("ctxfi: architecture does not support PCI "
		"busmaster DMA with mask 0x%llx\n", CT_XFI_DMA_MASK);
		err = -ENXIO;
		goto error1;
@@ -2063,7 +2063,7 @@ static int hw_card_start(struct hw *hw)
		err = request_irq(pci->irq, ct_20k2_interrupt, IRQF_SHARED,
				  KBUILD_MODNAME, hw);
		if (err < 0) {
			printk(KERN_ERR "XFi: Cannot get irq %d\n", pci->irq);
			pr_err("XFi: Cannot get irq %d\n", pci->irq);
			goto error2;
		}
		hw->irq = pci->irq;
Loading