alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 34/36] sound/soc/blackfin: Remove unnecessary casts of private_data
       [not found] <cover.1278967120.git.joe@perches.com>
@ 2010-07-12 20:50 ` Joe Perches
  2010-07-13 10:45   ` Liam Girdwood
  2010-07-13 11:38   ` Mark Brown
  2010-07-12 20:50 ` [PATCH 35/36] sound/soc/davinci: " Joe Perches
  2010-07-12 20:50 ` [PATCH 36/36] sound/core: " Joe Perches
  2 siblings, 2 replies; 5+ messages in thread
From: Joe Perches @ 2010-07-12 20:50 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-kernel, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel

Signed-off-by: Joe Perches <joe@perches.com>
---
 sound/soc/blackfin/bf5xx-ac97.c |    6 ++----
 sound/soc/blackfin/bf5xx-tdm.c  |    6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/sound/soc/blackfin/bf5xx-ac97.c b/sound/soc/blackfin/bf5xx-ac97.c
index 523b7fc..c0eba51 100644
--- a/sound/soc/blackfin/bf5xx-ac97.c
+++ b/sound/soc/blackfin/bf5xx-ac97.c
@@ -255,8 +255,7 @@ EXPORT_SYMBOL_GPL(soc_ac97_ops);
 #ifdef CONFIG_PM
 static int bf5xx_ac97_suspend(struct snd_soc_dai *dai)
 {
-	struct sport_device *sport =
-		(struct sport_device *)dai->private_data;
+	struct sport_device *sport = dai->private_data;
 
 	pr_debug("%s : sport %d\n", __func__, dai->id);
 	if (!dai->active)
@@ -271,8 +270,7 @@ static int bf5xx_ac97_suspend(struct snd_soc_dai *dai)
 static int bf5xx_ac97_resume(struct snd_soc_dai *dai)
 {
 	int ret;
-	struct sport_device *sport =
-		(struct sport_device *)dai->private_data;
+	struct sport_device *sport = dai->private_data;
 
 	pr_debug("%s : sport %d\n", __func__, dai->id);
 	if (!dai->active)
diff --git a/sound/soc/blackfin/bf5xx-tdm.c b/sound/soc/blackfin/bf5xx-tdm.c
index 4b36012..24c1426 100644
--- a/sound/soc/blackfin/bf5xx-tdm.c
+++ b/sound/soc/blackfin/bf5xx-tdm.c
@@ -210,8 +210,7 @@ static int bf5xx_tdm_set_channel_map(struct snd_soc_dai *dai,
 #ifdef CONFIG_PM
 static int bf5xx_tdm_suspend(struct snd_soc_dai *dai)
 {
-	struct sport_device *sport =
-		(struct sport_device *)dai->private_data;
+	struct sport_device *sport = dai->private_data;
 
 	if (!dai->active)
 		return 0;
@@ -225,8 +224,7 @@ static int bf5xx_tdm_suspend(struct snd_soc_dai *dai)
 static int bf5xx_tdm_resume(struct snd_soc_dai *dai)
 {
 	int ret;
-	struct sport_device *sport =
-		(struct sport_device *)dai->private_data;
+	struct sport_device *sport = dai->private_data;
 
 	if (!dai->active)
 		return 0;
-- 
1.7.1.337.g6068.dirty

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 35/36] sound/soc/davinci: Remove unnecessary casts of private_data
       [not found] <cover.1278967120.git.joe@perches.com>
  2010-07-12 20:50 ` [PATCH 34/36] sound/soc/blackfin: Remove unnecessary casts of private_data Joe Perches
@ 2010-07-12 20:50 ` Joe Perches
  2010-07-12 20:50 ` [PATCH 36/36] sound/core: " Joe Perches
  2 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2010-07-12 20:50 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-kernel, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel

Signed-off-by: Joe Perches <joe@perches.com>
---
 sound/soc/davinci/davinci-pcm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
index 2dc406f..def454e 100644
--- a/sound/soc/davinci/davinci-pcm.c
+++ b/sound/soc/davinci/davinci-pcm.c
@@ -800,7 +800,7 @@ static void davinci_pcm_free(struct snd_pcm *pcm)
 		dma_free_writecombine(pcm->card->dev, buf->bytes,
 				      buf->area, buf->addr);
 		buf->area = NULL;
-		iram_dma = (struct snd_dma_buffer *)buf->private_data;
+		iram_dma = buf->private_data;
 		if (iram_dma) {
 			sram_free(iram_dma->area, iram_dma->bytes);
 			kfree(iram_dma);
-- 
1.7.1.337.g6068.dirty

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 36/36] sound/core: Remove unnecessary casts of private_data
       [not found] <cover.1278967120.git.joe@perches.com>
  2010-07-12 20:50 ` [PATCH 34/36] sound/soc/blackfin: Remove unnecessary casts of private_data Joe Perches
  2010-07-12 20:50 ` [PATCH 35/36] sound/soc/davinci: " Joe Perches
@ 2010-07-12 20:50 ` Joe Perches
  2 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2010-07-12 20:50 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai, alsa-devel

Signed-off-by: Joe Perches <joe@perches.com>
---
 sound/core/oss/mixer_oss.c |   22 +++++++++++-----------
 sound/core/pcm.c           |    3 +--
 sound/core/timer.c         |    4 ++--
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index f50ebf2..86afb13 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -77,7 +77,7 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file)
 	struct snd_mixer_oss_file *fmixer;
 
 	if (file->private_data) {
-		fmixer = (struct snd_mixer_oss_file *) file->private_data;
+		fmixer = file->private_data;
 		module_put(fmixer->card->module);
 		snd_card_file_remove(fmixer->card, file);
 		kfree(fmixer);
@@ -368,7 +368,7 @@ static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int
 
 static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	return snd_mixer_oss_ioctl1((struct snd_mixer_oss_file *) file->private_data, cmd, arg);
+	return snd_mixer_oss_ioctl1(file->private_data, cmd, arg);
 }
 
 int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg)
@@ -582,7 +582,7 @@ static int snd_mixer_oss_get_volume1(struct snd_mixer_oss_file *fmixer,
 				     struct snd_mixer_oss_slot *pslot,
 				     int *left, int *right)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	
 	*left = *right = 100;
 	if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
@@ -691,7 +691,7 @@ static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer,
 				     struct snd_mixer_oss_slot *pslot,
 				     int left, int right)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	
 	if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
 		snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right);
@@ -740,7 +740,7 @@ static int snd_mixer_oss_get_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
 					struct snd_mixer_oss_slot *pslot,
 					int *active)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	int left, right;
 	
 	left = right = 1;
@@ -753,7 +753,7 @@ static int snd_mixer_oss_get_recsrc1_route(struct snd_mixer_oss_file *fmixer,
 					   struct snd_mixer_oss_slot *pslot,
 					   int *active)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	int left, right;
 	
 	left = right = 1;
@@ -766,7 +766,7 @@ static int snd_mixer_oss_put_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
 					struct snd_mixer_oss_slot *pslot,
 					int active)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	
 	snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0);
 	return 0;
@@ -776,7 +776,7 @@ static int snd_mixer_oss_put_recsrc1_route(struct snd_mixer_oss_file *fmixer,
 					   struct snd_mixer_oss_slot *pslot,
 					   int active)
 {
-	struct slot *slot = (struct slot *)pslot->private_data;
+	struct slot *slot = pslot->private_data;
 	
 	snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1);
 	return 0;
@@ -813,7 +813,7 @@ static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
 		if (!(mixer->mask_recsrc & (1 << idx)))
 			continue;
 		pslot = &mixer->slots[idx];
-		slot = (struct slot *)pslot->private_data;
+		slot = pslot->private_data;
 		if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
 			continue;
 		if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
@@ -861,7 +861,7 @@ static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
 		if (!(mixer->mask_recsrc & (1 << idx)))
 			continue;
 		pslot = &mixer->slots[idx];
-		slot = (struct slot *)pslot->private_data;
+		slot = pslot->private_data;
 		if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
 			continue;
 		if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
@@ -925,7 +925,7 @@ static int snd_mixer_oss_build_test(struct snd_mixer_oss *mixer, struct slot *sl
 
 static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn)
 {
-	struct slot *p = (struct slot *)chn->private_data;
+	struct slot *p = chn->private_data;
 	if (p) {
 		if (p->allocated && p->assigned) {
 			kfree(p->assigned->name);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index cbe815d..de5a0eb 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -358,8 +358,7 @@ static void snd_pcm_stream_proc_info_read(struct snd_info_entry *entry,
 static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry,
 					     struct snd_info_buffer *buffer)
 {
-	snd_pcm_proc_info_read((struct snd_pcm_substream *)entry->private_data,
-			       buffer);
+	snd_pcm_proc_info_read(entry->private_data, buffer);
 }
 
 static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 13afb60..5ab1014 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -962,7 +962,7 @@ static int snd_timer_s_start(struct snd_timer * timer)
 	struct snd_timer_system_private *priv;
 	unsigned long njiff;
 
-	priv = (struct snd_timer_system_private *) timer->private_data;
+	priv = timer->private_data;
 	njiff = (priv->last_jiffies = jiffies);
 	if (priv->correction > timer->sticks - 1) {
 		priv->correction -= timer->sticks - 1;
@@ -981,7 +981,7 @@ static int snd_timer_s_stop(struct snd_timer * timer)
 	struct snd_timer_system_private *priv;
 	unsigned long jiff;
 
-	priv = (struct snd_timer_system_private *) timer->private_data;
+	priv = timer->private_data;
 	del_timer(&priv->tlist);
 	jiff = jiffies;
 	if (time_before(jiff, priv->last_expires))
-- 
1.7.1.337.g6068.dirty

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 34/36] sound/soc/blackfin: Remove unnecessary casts of private_data
  2010-07-12 20:50 ` [PATCH 34/36] sound/soc/blackfin: Remove unnecessary casts of private_data Joe Perches
@ 2010-07-13 10:45   ` Liam Girdwood
  2010-07-13 11:38   ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Liam Girdwood @ 2010-07-13 10:45 UTC (permalink / raw)
  To: Joe Perches
  Cc: alsa-devel, Jiri Kosina, Takashi Iwai, Mark Brown, linux-kernel

On Mon, 2010-07-12 at 13:50 -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>

Fwiw, we are getting rid of the void * private_data in the ASoC
multi-component patch series and will use dev_get_drvdata() style
accessors.

Both ASoC patches

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 34/36] sound/soc/blackfin: Remove unnecessary casts of private_data
  2010-07-12 20:50 ` [PATCH 34/36] sound/soc/blackfin: Remove unnecessary casts of private_data Joe Perches
  2010-07-13 10:45   ` Liam Girdwood
@ 2010-07-13 11:38   ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2010-07-13 11:38 UTC (permalink / raw)
  To: Joe Perches
  Cc: alsa-devel, Jiri Kosina, Takashi Iwai, linux-kernel,
	Liam Girdwood

On Mon, Jul 12, 2010 at 01:50:26PM -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>

Applied both, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-13 11:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1278967120.git.joe@perches.com>
2010-07-12 20:50 ` [PATCH 34/36] sound/soc/blackfin: Remove unnecessary casts of private_data Joe Perches
2010-07-13 10:45   ` Liam Girdwood
2010-07-13 11:38   ` Mark Brown
2010-07-12 20:50 ` [PATCH 35/36] sound/soc/davinci: " Joe Perches
2010-07-12 20:50 ` [PATCH 36/36] sound/core: " Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).