Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1326646

Re: [PATCH v2 21/22] sound/usb: Use Media Controller API to share media resources

From Takashi Iwai <tiwai@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2 21/22] sound/usb: Use Media Controller API to share media resources
Date 2016-02-04 11:50 +0100
Message-ID <qYpE7-7qG-37@gated-at.bofh.it> (permalink)
References <qYjoZ-3uR-3@gated-at.bofh.it> <qYjp1-3uR-35@gated-at.bofh.it> <qYpE5-7qG-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 04 Feb 2016 11:36:00 +0100,
Mauro Carvalho Chehab wrote:
> 
> > diff --git a/sound/usb/card.h b/sound/usb/card.h
> > index 71778ca..c15a03c 100644
> > --- a/sound/usb/card.h
> > +++ b/sound/usb/card.h
> > @@ -156,6 +156,7 @@ struct snd_usb_substream {
> >  	} dsd_dop;
> >  
> >  	bool trigger_tstamp_pending_update; /* trigger timestamp being updated from initial estimate */
> > +	void *media_ctl;
> >  };
> 
> This is Takashi's call, but I would prefer to avoid using a void *
> here. Fortunately, GCC is smart enough to handle struct pointers
> even if the header doesn't have a full declaration of the struct.
> 
> So, I would change the above to:
> 
> struct media_device;
> 
> struct snd_usb_substream {
> ...
> 	struct media_device *media_ctl;
> };
> 
> This way, we ensure strong typecast checks when compiling the code under
> sound/usb/media.c, while not needing to include media_device.h header here.

Agreed, this is no big merit to make it a void pointer.


Takashi

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v2 21/22] sound/usb: Use Media Controller API to share media resources Shuah Khan <shuahkh@osg.samsung.com> - 2016-02-04 05:10 +0100
  Re: [PATCH v2 21/22] sound/usb: Use Media Controller API to share  media resources Mauro Carvalho Chehab <mchehab@osg.samsung.com> - 2016-02-04 11:50 +0100
    Re: [PATCH v2 21/22] sound/usb: Use Media Controller API to share media resources Takashi Iwai <tiwai@suse.de> - 2016-02-04 11:50 +0100

csiph-web