From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Shuah Khan" <shuahkh@osg.samsung.com>,
"Javier Martinez Canillas" <javier@osg.samsung.com>,
"Linux Media Mailing List" <linux-media@vger.kernel.org>,
"Mauro Carvalho Chehab" <mchehab@infradead.org>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
"Kukjin Kim" <kgene@kernel.org>,
"Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Hyun Kwon" <hyun.kwon@xilinx.com>,
"Michal Simek" <michal.simek@xilinx.com>,
"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
"Antti Palosaari" <crope@iki.fi>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"Stefan Richter" <stefanr@s5r6.in-berlin.de>,
"Junghak Sung" <jh1009.sung@samsung.com>,
"Inki Dae" <inki.dae@samsung.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Geunyoung Kim" <nenggun.kim@samsung.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Rafael Lourenço de Lima Chehab" <chehabrafael@gmail.com>,
"Tommi Rantala" <tt.rantala@gmail.com>,
"Matthias Schwarzott" <zzam@gentoo.org>,
"Patrick Boettcher" <patrick.boettcher@posteo.de>,
"Luis de Bethencourt" <luis@debethencourt.com>,
"Amitoj Kaur Chawla" <amitoj1606@gmail.com>,
"Julia Lawall" <Julia.Lawall@lip6.fr>,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, devel@driverdev.osuosl.org,
alsa-devel@alsa-project.org
Subject: Re: [PATCH] [media] media: rename media unregister function
Date: Fri, 18 Mar 2016 21:49:27 -0300 [thread overview]
Message-ID: <20160318214927.507f715a@recife.lan> (raw)
In-Reply-To: <56EC0EA3.6010108@linux.intel.com>
Em Fri, 18 Mar 2016 16:20:19 +0200
Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:
> Shuah Khan wrote:
> > On 03/18/2016 08:12 AM, Javier Martinez Canillas wrote:
> >> Hello Shuah,
> >>
> >> On 03/18/2016 11:01 AM, Shuah Khan wrote:
> >>> On 03/18/2016 07:05 AM, Mauro Carvalho Chehab wrote:
> >>>> Now that media_device_unregister() also does a cleanup, rename it
> >>>> to media_device_unregister_cleanup().
> >>>>
> >>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> >>>
> >>> I think adding cleanup is redundant. media_device_unregister()
> >>> would imply that there has to be some cleanup releasing resources.
> >>> I wouldn't make this change.
> >>>
> >>
> >> Problem is that there is a media_device_init() and media_device_register(),
> >> so having both unregister and cleanup in this function will make very clear
> >> that a single function is the counter part of the previous two operations.
> >>
> >
> > Yes. I realized that this change is motivated by the fact that there is
> > the media_device_init() and we had the counterpart media_device_cleanup()
> > as an exported function. I still think there is no need to make the change
> > to add _cleanup() at the end of media_device_unregister(). It can be handled
> > in API documentation that it does both.
>
> I think that's a bad idea. People will only read the documentation when
> something doesn't work. In this case it's easy to miss that.
After thinking about that, I guess the best is to use kref only
if the media_device_*devres functions are used. With this, we don't
need to touch at media_device_cleanup().
Just the patch to the ML:
https://patchwork.linuxtv.org/patch/33533/
It was tested with HVR-950Q.
Regards,
Mauro
prev parent reply other threads:[~2016-03-19 0:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 13:05 [PATCH] [media] media: rename media unregister function Mauro Carvalho Chehab
2016-03-18 13:48 ` Javier Martinez Canillas
2016-03-18 14:01 ` Shuah Khan
2016-03-18 14:12 ` Javier Martinez Canillas
2016-03-18 14:17 ` Shuah Khan
2016-03-18 14:20 ` Sakari Ailus
2016-03-19 0:49 ` Mauro Carvalho Chehab [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160318214927.507f715a@recife.lan \
--to=mchehab@osg.samsung.com \
--cc=Julia.Lawall@lip6.fr \
--cc=akpm@linux-foundation.org \
--cc=alsa-devel@alsa-project.org \
--cc=amitoj1606@gmail.com \
--cc=arnd@arndb.de \
--cc=chehabrafael@gmail.com \
--cc=crope@iki.fi \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hans.verkuil@cisco.com \
--cc=hyun.kwon@xilinx.com \
--cc=inki.dae@samsung.com \
--cc=javier@osg.samsung.com \
--cc=jh1009.sung@samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=luis@debethencourt.com \
--cc=mchehab@infradead.org \
--cc=michal.simek@xilinx.com \
--cc=nenggun.kim@samsung.com \
--cc=patrick.boettcher@posteo.de \
--cc=perex@perex.cz \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@linux.intel.com \
--cc=shuahkh@osg.samsung.com \
--cc=soren.brinkmann@xilinx.com \
--cc=stefanr@s5r6.in-berlin.de \
--cc=tiwai@suse.com \
--cc=tt.rantala@gmail.com \
--cc=zzam@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox