public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: <sameo@linux.intel.com>, <lee.jones@linaro.org>
Cc: <linux-kernel@vger.kernel.org>, <swarren@nvidia.com>,
	Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH 3/4] mfd: palmas: reset pm_power_off if it is set for the device
Date: Thu, 26 Sep 2013 19:03:50 +0530	[thread overview]
Message-ID: <1380202431-4868-4-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1380202431-4868-1-git-send-email-ldewangan@nvidia.com>

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 <ldewangan@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


  parent reply	other threads:[~2013-09-26 13:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 13:33 [PATCH 0/4] mfd: palmas: fix the resource leak issue and cleanups Laxman Dewangan
2013-09-26 13:33 ` [PATCH 1/4] mfd: palmas: remove call of mfd_remove_devices Laxman Dewangan
2013-09-27  8:07   ` Lee Jones
2013-09-26 13:33 ` [PATCH 2/4] mfd: palmas: add MODULE_DEVICE_TABLE for of_device table Laxman Dewangan
2013-09-27  8:04   ` Lee Jones
2013-09-26 13:33 ` Laxman Dewangan [this message]
2013-09-27  8:01   ` [PATCH 3/4] mfd: palmas: reset pm_power_off if it is set for the device Lee Jones
2013-09-26 13:33 ` [PATCH 4/4] mfd: palmas: fix resource leak of i2c_dummy devices Laxman Dewangan
2013-09-27  7:49   ` Lee Jones

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=1380202431-4868-4-git-send-email-ldewangan@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=swarren@nvidia.com \
    /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