From: <Andrei.Stefanescu@microchip.com>
To: <broonie@kernel.org>, <lgirdwood@gmail.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <Cristian.Birsan@microchip.com>,
<Nicolas.Ferre@microchip.com>, <Andrei.Stefanescu@microchip.com>
Subject: [PATCH] regulator: mcp16502: code cleanup
Date: Mon, 17 Dec 2018 11:44:59 +0000 [thread overview]
Message-ID: <1545047086-30286-1-git-send-email-andrei.stefanescu@microchip.com> (raw)
This patch does the following:
- align parameter with parenthesis
- fix compile error
If CONFIG_SUSPEND is not set the dummy pm_ops
callbacks are named mcp16502_suspend and mcp16502_resume
instead of mcp16502_suspend_noirq and mcp16502_resume_noirq.
Excerpt from compile log (kbuild test robot):
In file included from include/linux/device.h:23:0,
from include/linux/gpio/driver.h:5,
from include/asm-generic/gpio.h:13,
from include/linux/gpio.h:62,
from drivers/regulator/mcp16502.c:11:
>> drivers/regulator/mcp16502.c:527:32: error: 'mcp16502_suspend_noirq'
undeclared here (not in a function); did you mean 'mcp16502_suspend'?
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mcp16502_suspend_noirq,
>> drivers/regulator/mcp16502.c:528:10: error: 'mcp16502_resume_noirq'
undeclared here (not in a function); did you mean 'mcp16502_suspend_noirq'?
mcp16502_resume_noirq)
vim +527 drivers/regulator/mcp16502.c
524
525 #ifdef CONFIG_PM
526 static const struct dev_pm_ops mcp16502_pm_ops = {
> 527 SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mcp16502_suspend_noirq,
> 528 mcp16502_resume_noirq)
529 };
530 #endif
531 static const struct i2c_device_id mcp16502_i2c_id[] = {
532 { "mcp16502", 0 },
533 { }
534 };
535 MODULE_DEVICE_TABLE(i2c, mcp16502_i2c_id);
536
Signed-off-by: Andrei Stefanescu <andrei.stefanescu@microchip.com>
---
drivers/regulator/mcp16502.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 25d7b43..809a664 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -518,14 +518,14 @@ static int mcp16502_resume_noirq(struct device *dev)
return 0;
}
#else /* !CONFIG_SUSPEND */
-#define mcp16502_suspend NULL
-#define mcp16502_resume NULL
+#define mcp16502_suspend_noirq NULL
+#define mcp16502_resume_noirq NULL
#endif /* !CONFIG_SUSPEND */
#ifdef CONFIG_PM
static const struct dev_pm_ops mcp16502_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mcp16502_suspend_noirq,
- mcp16502_resume_noirq)
+ mcp16502_resume_noirq)
};
#endif
static const struct i2c_device_id mcp16502_i2c_id[] = {
--
2.7.4
next reply other threads:[~2018-12-17 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 11:44 Andrei.Stefanescu [this message]
2018-12-19 18:40 ` [PATCH] regulator: mcp16502: code cleanup Mark Brown
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=1545047086-30286-1-git-send-email-andrei.stefanescu@microchip.com \
--to=andrei.stefanescu@microchip.com \
--cc=Cristian.Birsan@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.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).