From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] soc: mediatek: SCPSYS: use module_platform_driver
Date: Wed, 16 Dec 2015 12:00:56 +0100 [thread overview]
Message-ID: <1450263656-12513-1-git-send-email-s.hauer@pengutronix.de> (raw)
With regulator support to the scpsys driver needs to be able to defer
probe. Probe deferral is incompatible with module_platform_driver_probe,
so use module_platform_driver. module_platform_driver_probe sets the
suppress_bind_attrs. To prevent unbinding the device with
module_platform_driver we have to set the flag explicitly in the driver
now.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Changes since v1:
- Add suppress_bind_attrs attribute
drivers/soc/mediatek/mtk-scpsys.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
index e425619..ae2d177 100644
--- a/drivers/soc/mediatek/mtk-scpsys.c
+++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -542,11 +542,13 @@ static const struct of_device_id of_scpsys_match_tbl[] = {
};
static struct platform_driver scpsys_drv = {
+ .probe = scpsys_probe,
.driver = {
.name = "mtk-scpsys",
+ .suppress_bind_attrs = true,
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(of_scpsys_match_tbl),
},
};
-module_platform_driver_probe(scpsys_drv, scpsys_probe);
+module_platform_driver(scpsys_drv);
--
2.6.2
next reply other threads:[~2015-12-16 11:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-16 11:00 Sascha Hauer [this message]
2015-12-16 11:22 ` [PATCH v2] soc: mediatek: SCPSYS: use module_platform_driver Arnd Bergmann
2015-12-16 11:55 ` Matthias Brugger
2015-12-17 2:52 ` Daniel Kurtz
2015-12-17 15:16 ` Paul Gortmaker
2015-12-18 8:33 ` Matthias Brugger
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=1450263656-12513-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.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;
as well as URLs for NNTP newsgroup(s).