* [PATCH] firewire-speakers: remove not-reused member from structure
@ 2013-07-09 15:22 Takashi Sakamoto
2013-07-09 16:00 ` Clemens Ladisch
2013-07-09 16:21 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Takashi Sakamoto @ 2013-07-09 15:22 UTC (permalink / raw)
To: clemens, tiwai, perex; +Cc: alsa-devel
"pcm" member in struct fwspk is used to set pcm operations but is not used
again. This commit remove this member and set pcm operations with
snd_pcm_set_ops().
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
sound/firewire/speakers.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c
index 2c63865..fe9e6e2 100644
--- a/sound/firewire/speakers.c
+++ b/sound/firewire/speakers.c
@@ -49,7 +49,6 @@ struct fwspk {
struct snd_card *card;
struct fw_unit *unit;
const struct device_info *device_info;
- struct snd_pcm_substream *pcm;
struct mutex mutex;
struct cmp_connection connection;
struct amdtp_out_stream stream;
@@ -363,8 +362,7 @@ static int fwspk_create_pcm(struct fwspk *fwspk)
return err;
pcm->private_data = fwspk;
strcpy(pcm->name, fwspk->device_info->short_name);
- fwspk->pcm = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
- fwspk->pcm->ops = &ops;
+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &ops);
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] firewire-speakers: remove not-reused member from structure
2013-07-09 15:22 [PATCH] firewire-speakers: remove not-reused member from structure Takashi Sakamoto
@ 2013-07-09 16:00 ` Clemens Ladisch
2013-07-09 16:21 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2013-07-09 16:00 UTC (permalink / raw)
To: tiwai; +Cc: alsa-devel, Takashi Sakamoto
Takashi Sakamoto wrote:
> "pcm" member in struct fwspk is used to set pcm operations but is not used
> again. This commit remove this member and set pcm operations with
> snd_pcm_set_ops().
>
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
> ---
> sound/firewire/speakers.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c
> index 2c63865..fe9e6e2 100644
> --- a/sound/firewire/speakers.c
> +++ b/sound/firewire/speakers.c
> @@ -49,7 +49,6 @@ struct fwspk {
> struct snd_card *card;
> struct fw_unit *unit;
> const struct device_info *device_info;
> - struct snd_pcm_substream *pcm;
> struct mutex mutex;
> struct cmp_connection connection;
> struct amdtp_out_stream stream;
> @@ -363,8 +362,7 @@ static int fwspk_create_pcm(struct fwspk *fwspk)
> return err;
> pcm->private_data = fwspk;
> strcpy(pcm->name, fwspk->device_info->short_name);
> - fwspk->pcm = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
> - fwspk->pcm->ops = &ops;
> + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &ops);
> return 0;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] firewire-speakers: remove not-reused member from structure
2013-07-09 15:22 [PATCH] firewire-speakers: remove not-reused member from structure Takashi Sakamoto
2013-07-09 16:00 ` Clemens Ladisch
@ 2013-07-09 16:21 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2013-07-09 16:21 UTC (permalink / raw)
To: Takashi Sakamoto; +Cc: alsa-devel, clemens
At Wed, 10 Jul 2013 00:22:46 +0900,
Takashi Sakamoto wrote:
>
> "pcm" member in struct fwspk is used to set pcm operations but is not used
> again. This commit remove this member and set pcm operations with
> snd_pcm_set_ops().
>
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Thanks, I'll queue it once when the merge window is closed (thus it's
opened again for 3.12 development).
Takashi
> ---
> sound/firewire/speakers.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c
> index 2c63865..fe9e6e2 100644
> --- a/sound/firewire/speakers.c
> +++ b/sound/firewire/speakers.c
> @@ -49,7 +49,6 @@ struct fwspk {
> struct snd_card *card;
> struct fw_unit *unit;
> const struct device_info *device_info;
> - struct snd_pcm_substream *pcm;
> struct mutex mutex;
> struct cmp_connection connection;
> struct amdtp_out_stream stream;
> @@ -363,8 +362,7 @@ static int fwspk_create_pcm(struct fwspk *fwspk)
> return err;
> pcm->private_data = fwspk;
> strcpy(pcm->name, fwspk->device_info->short_name);
> - fwspk->pcm = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
> - fwspk->pcm->ops = &ops;
> + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &ops);
> return 0;
> }
>
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-09 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-09 15:22 [PATCH] firewire-speakers: remove not-reused member from structure Takashi Sakamoto
2013-07-09 16:00 ` Clemens Ladisch
2013-07-09 16:21 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.