If Palams supports the system power controller and pm_power_off is implemented through the Palmas driver then reset the pm_power_off in driver remove.
This will avoid the call of Palmas driver after removal of driver. Signed-off-by: Laxman Dewangan <ldewan...@nvidia.com> --- drivers/mfd/palmas.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c index 3b63139..6aab016 100644 --- a/drivers/mfd/palmas.c +++ b/drivers/mfd/palmas.c @@ -570,6 +570,11 @@ static int palmas_i2c_remove(struct i2c_client *i2c) regmap_del_irq_chip(palmas->irq, palmas->irq_data); + if (palmas == palmas_dev) { + pm_power_off = NULL; + palmas_dev = NULL; + } + return 0; } -- 1.7.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/