[2/2] mfd: Make mfd_cell_disable() return void
Commit Message
mfd_cell_disable() returns 0 unconditionally. Change it to return void
instead to make its usage a bit more obvious.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/leds/leds-asic3.c | 6 ++++--
drivers/mfd/mfd-core.c | 12 ++++--------
include/linux/mfd/core.h | 2 +-
3 files changed, 9 insertions(+), 11 deletions(-)
@@ -117,7 +117,7 @@ static int asic3_led_probe(struct platform_device *pdev)
return 0;
out:
- (void) mfd_cell_disable(pdev);
+ mfd_cell_disable(pdev);
return ret;
}
@@ -127,7 +127,9 @@ static int asic3_led_remove(struct platform_device *pdev)
led_classdev_unregister(led->cdev);
- return mfd_cell_disable(pdev);
+ mfd_cell_disable(pdev);
+
+ return 0;
}
#ifdef CONFIG_PM_SLEEP
@@ -46,18 +46,14 @@ int mfd_cell_enable(struct platform_device *pdev)
}
EXPORT_SYMBOL(mfd_cell_enable);
-int mfd_cell_disable(struct platform_device *pdev)
+void mfd_cell_disable(struct platform_device *pdev)
{
const struct mfd_cell *cell = mfd_get_cell(pdev);
- if (!cell->disable) {
+ if (cell->disable)
+ cell->disable(pdev);
+ else
dev_dbg(&pdev->dev, "No .disable() call-back registered\n");
- return 0;
- }
-
- cell->disable(pdev);
-
- return 0;
}
EXPORT_SYMBOL(mfd_cell_disable);
@@ -130,7 +130,7 @@ struct mfd_cell {
* clients are making use of it.
*/
extern int mfd_cell_enable(struct platform_device *pdev);
-extern int mfd_cell_disable(struct platform_device *pdev);
+extern void mfd_cell_disable(struct platform_device *pdev);
/*
* Given a platform device that's been created by mfd_add_devices(), fetch