Re: [PATCH] mfd: ssbi: promote the driver to subsys level

From: Lee Jones
Date: Wed Sep 17 2014 - 12:49:35 EST


On Wed, 17 Sep 2014, Srinivas Kandagatla wrote:

> On 17 Sep 2014 09:03, "Lee Jones" <lee.jones@xxxxxxxxxx> wrote:
> >
> > On Wed, 17 Sep 2014, Srinivas Kandagatla wrote:
> >
> > > This patch promtes the driver to be at subsystem level as this driver
> > > will be used by gpio controller drivers which inturn are used by many
> > > platform drivers.
> >
> > Any reason why you're not using -EPROBE?
> >
> EPROBE is possible but it's going to add few more cycles to boot time.
>
> As this driver is a very basic driver on which other drivers depend
> ensuring the sequence would improve the boot time.

We only tend to promote drivers' init level as a last resort. If
-EPROBE_DEFER is possible, please use that instead.

> > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
> > > ---
> > > drivers/mfd/ssbi.c | 7 ++++++-
> > > 1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
> > > index b78942e..4fbe02e 100644
> > > --- a/drivers/mfd/ssbi.c
> > > +++ b/drivers/mfd/ssbi.c
> > > @@ -331,7 +331,12 @@ static struct platform_driver ssbi_driver = {
> > > .of_match_table = ssbi_match_table,
> > > },
> > > };
> > > -module_platform_driver(ssbi_driver);
> > > +
> > > +static int ssbi_init(void)
> > > +{
> > > + return platform_driver_register(&ssbi_driver);
> > > +}
> > > +subsys_initcall(ssbi_init);
> > >
> > > MODULE_LICENSE("GPL v2");
> > > MODULE_VERSION("1.0");
> >

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/