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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux