public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] soc: mediatek: SCPSYS: use module_platform_driver
Date: Tue, 15 Dec 2015 16:45:04 +0100	[thread overview]
Message-ID: <3919968.fveBmeY89b@wuerfel> (raw)
In-Reply-To: <20151215154203.GP11966@pengutronix.de>

On Tuesday 15 December 2015 16:42:03 Sascha Hauer wrote:
> On Tue, Dec 15, 2015 at 03:30:01PM +0100, Arnd Bergmann wrote:
> > On Tuesday 15 December 2015 15:16:06 Sascha Hauer wrote:
> > > @@ -542,6 +542,7 @@ static const struct of_device_id of_scpsys_match_tbl[] = {
> > >  };
> > >  
> > >  static struct platform_driver scpsys_drv = {
> > > +       .probe = scpsys_probe,
> > >         .driver = {
> > >                 .name = "mtk-scpsys",
> > >                 .owner = THIS_MODULE,
> > > @@ -549,4 +550,4 @@ static struct platform_driver scpsys_drv = {
> > >         },
> > >  };
> > >  
> > > -module_platform_driver_probe(scpsys_drv, scpsys_probe);
> > > +module_platform_driver(scpsys_drv);
> > > 
> > 
> > Good idea, but I wonder why there is no remove function in the
> > driver. Do we also need to make the module non-removable and
> > set .suppress_bind_attrs, or is all of the probe function
> > reversible through devm_* helpers?
> 
> pm domains currently can't be unregistered, removal of this driver is
> not supported. The driver can't be compiled as a module.

Ok, then you need the suppress_bind_attrs flag to ensure that users
cannot unbind and rebind the device through sysfs. The module_exit()
function will be dropped implicitly for built-in drivers, so the
module_platform_driver() is ok.

	Arnd

      reply	other threads:[~2015-12-15 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 14:16 [PATCH] soc: mediatek: SCPSYS: use module_platform_driver Sascha Hauer
2015-12-15 14:30 ` Arnd Bergmann
2015-12-15 15:42   ` Sascha Hauer
2015-12-15 15:45     ` Arnd Bergmann [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=3919968.fveBmeY89b@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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