]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
regulator: mcp16502: code cleanup
authorAndrei.Stefanescu@microchip.com <Andrei.Stefanescu@microchip.com>
Mon, 17 Dec 2018 11:44:59 +0000 (11:44 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 19 Dec 2018 18:40:39 +0000 (18:40 +0000)
commit308144ce8e51bb6f9bed0ff0e72e7864f5f405f3
treece254a022a39ef56047a38db71dbd3f45fca257c
parent78e6fbf321a9b4cb46b17d83f25abcd318859c70
regulator: mcp16502: code cleanup

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>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/mcp16502.c