Skip to contentSkip to conversation

sound/pci: coding style fixes: sound/pci/e*

PATCH In review Alexander Beregalov 1 participant 1 message Sep 9, 2008 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 9/24 sound/pci: coding style fixes: sound/pci/e*

- <asm/io.h> -> <linux/io.h>
- remove trailing whitespaces
- convert comments

Only compile tested.

---

 sound/pci/ens1370.c |   60 ++++++++++++++++++++--------------------
 sound/pci/es1938.c  |   68 +++++++++++++++++++++++-----------------------
 sound/pci/es1968.c  |   74 +++++++++++++++++++++++++-------------------------
 3 files changed, 101 insertions(+), 101 deletions(-)
sound/pci/ens1370.c +30 -30
index 9bf9536..56a8f7c 100644
@@ -26,7 +26,7 @@
  * by Kurt J. Bosch
  */
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
@@ -467,13 +467,13 @@ MODULE_DEVICE_TABLE(pci, snd_audiopci_ids);
 static unsigned int snd_es1370_fixed_rates[] =
 	{5512, 11025, 22050, 44100};
 static struct snd_pcm_hw_constraint_list snd_es1370_hw_constraints_rates = {
-	.count = 4, 
+	.count = 4,
 	.list = snd_es1370_fixed_rates,
 	.mask = 0,
 };
 static struct snd_ratnum es1370_clock = {
 	.num = ES_1370_SRCLOCK,
-	.den_min = 29, 
+	.den_min = 29,
 	.den_max = 353,
 	.den_step = 1,
 };
@@ -494,7 +494,7 @@ static struct snd_pcm_hw_constraint_ratdens snd_es1371_hw_constraints_dac_clock
 };
 static struct snd_ratnum es1371_adc_clock = {
 	.num = 48000 << 15,
-	.den_min = 32768, 
+	.den_min = 32768,
 	.den_max = 393216,
 	.den_step = 1,
 };
@@ -542,7 +542,7 @@ static unsigned int snd_es1371_src_read(struct ensoniq * ensoniq, unsigned short
 
 	/* now, wait for busy and the correct time to read */
 	temp = snd_es1371_wait_src_ready(ensoniq);
-	
+
 	if ((temp & 0x00870000) != 0x00010000) {
 		/* wait for the right state */
 		for (i = 0; i < POLL_COUNT; i++) {
@@ -552,12 +552,12 @@ static unsigned int snd_es1371_src_read(struct ensoniq * ensoniq, unsigned short
 		}
 	}
 
-	/* hide the state bits */	
+	/* hide the state bits */
 	r = orig & (ES_1371_SRC_DISABLE | ES_1371_DIS_P1 |
 		   ES_1371_DIS_P2 | ES_1371_DIS_R1);
 	r |= ES_1371_SRC_RAM_ADDRO(reg);
 	outl(r, ES_REG(ensoniq, 1371_SMPRATE));
-	
+
 	return temp;
 }
 
@@ -648,7 +648,7 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97,
 	struct ensoniq *ensoniq = ac97->private_data;
 	unsigned int t, x, fail = 0;
 
-      __again:
+__again:
 	mutex_lock(&ensoniq->src_mutex);
 	for (t = 0; t < POLL_COUNT; t++) {
 		if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) {
@@ -677,7 +677,7 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97,
 			/* wait for WIP again */
 			for (t = 0; t < POLL_COUNT; t++) {
 				if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP))
-					break;		
+					break;
 			}
 			/* now wait for the stinkin' data (RDY) */
 			for (t = 0; t < POLL_COUNT; t++) {
@@ -1053,7 +1053,7 @@ static struct snd_pcm_hardware snd_ensoniq_playback1 =
 				SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
 #else
 				(SNDRV_PCM_RATE_KNOT | 	/* 5512Hz rate */
-				 SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_22050 | 
+				 SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_22050 |
 				 SNDRV_PCM_RATE_44100),
 #endif
 	.rate_min =		4000,
@@ -1072,7 +1072,7 @@ static struct snd_pcm_hardware snd_ensoniq_playback2 =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
-				 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE | 
+				 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE |
 				 SNDRV_PCM_INFO_SYNC_START),
 	.formats =		SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
 	.rates =		SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
@@ -1424,7 +1424,7 @@ static int snd_es1371_spdif_get(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_value *ucontrol)
 {
 	struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
-	
+
 	spin_lock_irq(&ensoniq->reg_lock);
 	ucontrol->value.integer.value[0] = ensoniq->ctrl & ES_1373_SPDIF_THRU ? 1 : 0;
 	spin_unlock_irq(&ensoniq->reg_lock);
@@ -1437,7 +1437,7 @@ static int snd_es1371_spdif_put(struct snd_kcontrol *kcontrol,
 	struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
 	unsigned int nval1, nval2;
 	int change;
-	
+
 	nval1 = ucontrol->value.integer.value[0] ? ES_1373_SPDIF_THRU : 0;
 	nval2 = ucontrol->value.integer.value[0] ? ES_1373_SPDIF_EN : 0;
 	spin_lock_irq(&ensoniq->reg_lock);
@@ -1487,7 +1487,7 @@ static int snd_es1373_rear_get(struct snd_kcontrol *kcontrol,
 {
 	struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
 	int val = 0;
-	
+
 	spin_lock_irq(&ensoniq->reg_lock);
 	if ((ensoniq->cssr & (ES_1373_REAR_BIT27|ES_1373_REAR_BIT26|
 			      ES_1373_REAR_BIT24)) == ES_1373_REAR_BIT26)
@@ -1503,7 +1503,7 @@ static int snd_es1373_rear_put(struct snd_kcontrol *kcontrol,
 	struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
 	unsigned int nval1;
 	int change;
-	
+
 	nval1 = ucontrol->value.integer.value[0] ?
 		ES_1373_REAR_BIT26 : (ES_1373_REAR_BIT27|ES_1373_REAR_BIT24);
 	spin_lock_irq(&ensoniq->reg_lock);
@@ -1532,7 +1532,7 @@ static int snd_es1373_line_get(struct snd_kcontrol *kcontrol,
 {
 	struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
 	int val = 0;
-	
+
 	spin_lock_irq(&ensoniq->reg_lock);
 	if ((ensoniq->ctrl & ES_1371_GPIO_OUTM) >= 4)
 	    	val = 1;
@@ -1547,7 +1547,7 @@ static int snd_es1373_line_put(struct snd_kcontrol *kcontrol,
 	struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
 	int changed;
 	unsigned int ctrl;
-	
+
 	spin_lock_irq(&ensoniq->reg_lock);
 	ctrl = ensoniq->ctrl;
 	if (ucontrol->value.integer.value[0])
@@ -1690,7 +1690,7 @@ static int snd_ensoniq_control_get(struct snd_kcontrol *kcontrol,
 {
 	struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
 	int mask = kcontrol->private_value;
-	
+
 	spin_lock_irq(&ensoniq->reg_lock);
 	ucontrol->value.integer.value[0] = ensoniq->ctrl & mask ? 1 : 0;
 	spin_unlock_irq(&ensoniq->reg_lock);
@@ -1704,7 +1704,7 @@ static int snd_ensoniq_control_put(struct snd_kcontrol *kcontrol,
 	int mask = kcontrol->private_value;
 	unsigned int nval;
 	int change;
-	
+
 	nval = ucontrol->value.integer.value[0] ? mask : 0;
 	spin_lock_irq(&ensoniq->reg_lock);
 	change = (ensoniq->ctrl & mask) != nval;
@@ -1864,7 +1864,7 @@ static inline void snd_ensoniq_free_gameport(struct ensoniq *ensoniq) { }
 
  */
 
-static void snd_ensoniq_proc_read(struct snd_info_entry *entry, 
+static void snd_ensoniq_proc_read(struct snd_info_entry *entry,
 				  struct snd_info_buffer *buffer)
 {
 	struct ensoniq *ensoniq = entry->private_data;
@@ -1891,7 +1891,7 @@ static void __devinit snd_ensoniq_proc_init(struct ensoniq * ensoniq)
 {
 	struct snd_info_entry *entry;
 
-	if (! snd_card_proc_new(ensoniq->card, "audiopci", &entry))
+	if (!snd_card_proc_new(ensoniq->card, "audiopci", &entry))
 		snd_info_set_text_ops(entry, ensoniq, snd_ensoniq_proc_read);
 }
 
@@ -1914,7 +1914,7 @@ static int snd_ensoniq_free(struct ensoniq *ensoniq)
 	if (ensoniq->irq >= 0)
 		synchronize_irq(ensoniq->irq);
 	pci_set_power_state(ensoniq->pci, 3);
-      __hw_end:
+__hw_end:
 #ifdef CHIP1370
 	if (ensoniq->dma_bug.area)
 		snd_dma_free_pages(&ensoniq->dma_bug);
@@ -1982,7 +1982,7 @@ static void snd_ensoniq_chip_init(struct ensoniq *ensoniq)
 	udelay(20);
 	outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL));
 	/* Init the sample rate converter */
-	snd_es1371_wait_src_ready(ensoniq);	
+	snd_es1371_wait_src_ready(ensoniq);
 	outl(ES_1371_SRC_DISABLE, ES_REG(ensoniq, 1371_SMPRATE));
 	for (idx = 0; idx < 0x80; idx++)
 		snd_es1371_src_write(ensoniq, idx, 0);
@@ -2021,13 +2021,13 @@ static int snd_ensoniq_suspend(struct pci_dev *pci, pm_message_t state)
 {
 	struct snd_card *card = pci_get_drvdata(pci);
 	struct ensoniq *ensoniq = card->private_data;
-	
+
 	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 
 	snd_pcm_suspend_all(ensoniq->pcm1);
 	snd_pcm_suspend_all(ensoniq->pcm2);
-	
-#ifdef CHIP1371	
+
+#ifdef CHIP1371
 	snd_ac97_suspend(ensoniq->u.es1371.ac97);
 #else
 	/* try to reset AK4531 */
@@ -2038,7 +2038,7 @@ static int snd_ensoniq_suspend(struct pci_dev *pci, pm_message_t state)
 	inw(ES_REG(ensoniq, 1370_CODEC));
 	udelay(100);
 	snd_ak4531_suspend(ensoniq->u.es1370.ak4531);
-#endif	
+#endif
 
 	pci_disable_device(pci);
 	pci_save_state(pci);
@@ -2063,11 +2063,11 @@ static int snd_ensoniq_resume(struct pci_dev *pci)
 
 	snd_ensoniq_chip_init(ensoniq);
 
-#ifdef CHIP1371	
+#ifdef CHIP1371
 	snd_ac97_resume(ensoniq->u.es1371.ac97);
 #else
 	snd_ak4531_resume(ensoniq->u.es1370.ak4531);
-#endif	
+#endif
 	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
@@ -2482,7 +2482,7 @@ static struct pci_driver driver = {
 	.resume = snd_ensoniq_resume,
 #endif
 };
-	
+
 static int __init alsa_card_ens137x_init(void)
 {
 	return pci_register_driver(&driver);
sound/pci/es1938.c +34 -34

227 lines not on this page · raw message

sound/pci/es1968.c +37 -37

287 lines not on this page · raw message