From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Felipe Balbi <balbi@ti.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-fbdev@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
t.figa@samsung.com, jg1.han@samsung.com, dh09.lee@samsung.com,
kishon@ti.com, inki.dae@samsung.com, kyungmin.park@samsung.com,
kgene.kim@samsung.com, plagnioj@jcrosoft.com,
devicetree-discuss@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH v2 1/5] phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs
Date: Thu, 27 Jun 2013 09:49:02 +0100 [thread overview]
Message-ID: <20130627084902.GB4283@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20130627061713.GF15455@arwen.pp.htv.fi>
On Thu, Jun 27, 2013 at 09:17:13AM +0300, Felipe Balbi wrote:
> On Wed, Jun 26, 2013 at 05:00:34PM +0200, Sylwester Nawrocki wrote:
> > Hi,
> >
> > On 06/25/2013 05:06 PM, Felipe Balbi wrote:
> > >> +static struct platform_driver exynos_video_phy_driver = {
> > >> > + .probe = exynos_video_phy_probe,
> > >
> > > you *must* provide a remove method. drivers with NULL remove are
> > > non-removable :-)
> >
> > Actually the remove() callback can be NULL, it's just missing module_exit
> > function that makes a module not unloadable.
>
> look at the implementation of platform_drv_remove():
>
> 499 static int platform_drv_remove(struct device *_dev)
> 500 {
> 501 struct platform_driver *drv = to_platform_driver(_dev->driver);
> 502 struct platform_device *dev = to_platform_device(_dev);
> 503 int ret;
> 504
> 505 ret = drv->remove(dev);
> 506 if (ACPI_HANDLE(_dev))
> 507 acpi_dev_pm_detach(_dev, true);
> 508
> 509 return ret;
> 510 }
>
> that's not a conditional call right :-)
Wrong.
if (drv->remove)
drv->driver.remove = platform_drv_remove;
The function you quote will only be used if drv->remove is non-NULL.
You do not need to provide a remove method.
prev parent reply other threads:[~2013-06-27 8:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 14:21 [PATCH v2 1/5] phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs Sylwester Nawrocki
2013-06-25 14:21 ` [PATCH v2 2/5] ARM: dts: Add MIPI PHY node to exynos4.dtsi Sylwester Nawrocki
2013-06-25 14:21 ` [PATCH v2 3/5] video: exynos_mipi_dsim: Use generic PHY driver Sylwester Nawrocki
[not found] ` <1372170110-12993-3-git-send-email-s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-06-25 15:08 ` Felipe Balbi
2013-06-25 14:21 ` [PATCH v2 4/5] exynos4-is: Use generic MIPI CSIS " Sylwester Nawrocki
2013-06-25 15:09 ` Felipe Balbi
2013-06-25 14:21 ` [PATCH v2 5/5] ARM: Samsung: Remove MIPI PHY setup code Sylwester Nawrocki
2013-06-25 15:09 ` Felipe Balbi
2013-06-25 15:06 ` [PATCH v2 1/5] phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs Felipe Balbi
2013-06-25 17:44 ` Sylwester Nawrocki
2013-06-25 18:05 ` Tomasz Figa
2013-06-25 20:54 ` Felipe Balbi
2013-06-25 21:47 ` Sylwester Nawrocki
2013-06-26 5:23 ` Felipe Balbi
2013-06-26 11:21 ` Kishon Vijay Abraham I
2013-06-26 12:03 ` Sylwester Nawrocki
2013-06-26 12:22 ` Felipe Balbi
2013-06-26 12:48 ` Kishon Vijay Abraham I
2013-06-26 12:48 ` Kishon Vijay Abraham I
2013-06-26 15:00 ` Sylwester Nawrocki
2013-06-27 6:17 ` Felipe Balbi
2013-06-27 7:47 ` Andrzej Hajda
2013-06-27 7:51 ` Felipe Balbi
2013-06-27 8:49 ` Russell King - ARM Linux [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=20130627084902.GB4283@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=balbi@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dh09.lee@samsung.com \
--cc=inki.dae@samsung.com \
--cc=jg1.han@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=kishon@ti.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=s.nawrocki@samsung.com \
--cc=t.figa@samsung.com \
/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;
as well as URLs for NNTP newsgroup(s).