From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965187AbcBDKq7 (ORCPT ); Thu, 4 Feb 2016 05:46:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:54852 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756174AbcBDKqr (ORCPT ); Thu, 4 Feb 2016 05:46:47 -0500 Date: Thu, 04 Feb 2016 11:46:42 +0100 Message-ID: From: Takashi Iwai To: "Mauro Carvalho Chehab" Cc: "Shuah Khan" , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v2 21/22] sound/usb: Use Media Controller API to share media resources In-Reply-To: <20160204083600.334a43f9@recife.lan> References: <20160204083600.334a43f9@recife.lan> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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