Skip to contentSkip to conversation

Fix some minor errors in mpc5200 psc i2s driver

PATCH In review Jon Smirl 4 participants 4 messages Oct 29, 2008 – Oct 30, 2008

Subsystems (2)
lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

PATCH 1/1 Fix some minor errors in mpc5200 psc i2s driver

Fix missing unsigned for irqsave flags in psc i2s driver Make attribute visiblity static
Collect all sysfs errors before checking status

---
 sound/soc/fsl/mpc5200_psc_i2s.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/fsl/mpc5200_psc_i2s.c +6 -6
index 8692329..809c5c4 100644
@@ -277,7 +277,7 @@ static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd)
 	struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;
 	u16 imr;
 	u8 psc_cmd;
-	long flags;
+	unsigned long flags;
 
 	if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
 		s = &psc_i2s->capture;
@@ -699,9 +699,9 @@ static ssize_t psc_i2s_stat_store(struct device *dev,
 	return count;
 }
 
-DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL);
-DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
-DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
+static DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL);
+static DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
+static DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
 
 /* ---------------------------------------------------------------------
  * OF platform bus binding code:
@@ -819,8 +819,8 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
 
 	/* Register the SYSFS files */
 	rc = device_create_file(psc_i2s->dev, &dev_attr_status);
-	rc = device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
-	rc = device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
+	rc |= device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
+	rc |= device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
 	if (rc)
 		dev_info(psc_i2s->dev, "error creating sysfs files\n");
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jon Smirl

Fix missing unsigned for irqsave flags in psc i2s driver Make attribute visiblity static
Collect all sysfs errors before checking status

Quoted 43 lines
---
 sound/soc/fsl/mpc5200_psc_i2s.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/fsl/mpc5200_psc_i2s.c +6 -6
index 8692329..809c5c4 100644
@@ -277,7 +277,7 @@ static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd)
       struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;
       u16 imr;
       u8 psc_cmd;
-       long flags;
+       unsigned long flags;
 
       if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
               s = &psc_i2s->capture;
@@ -699,9 +699,9 @@ static ssize_t psc_i2s_stat_store(struct device *dev,
       return count;
 }
 
-DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL);
-DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
-DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
+static DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL);
+static DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
+static DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
 
 /* ---------------------------------------------------------------------
 * OF platform bus binding code:
@@ -819,8 +819,8 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
 
       /* Register the SYSFS files */
       rc = device_create_file(psc_i2s->dev, &dev_attr_status);
-       rc = device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
-       rc = device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
+       rc |= device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
+       rc |= device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
       if (rc)
               dev_info(psc_i2s->dev, "error creating sysfs files\n");
 
Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#3 lore raw

At Thu, 30 Oct 2008 09:09:26 +0000,

Quoted 7 lines · Mark Brown
Quoted 5 lines · Grant Likely
Quoted 4 lines · Jon Smirl

Fix missing unsigned for irqsave flags in psc i2s driver Make attribute visiblity static
Collect all sysfs errors before checking status

Quoted 7 lines
Quoted 2 lines
Quoted 1 line

Takashi, I've got a batch of stuff I intend to push out to you today, I'll add this to it.

OK, thanks. I'll wait for your patch bomb.

Takashi