[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4af597b4d09d874308a23680cf3fed4a31a1674a.1619621413.git.mchehab+huawei@kernel.org>
Date: Wed, 28 Apr 2021 16:51:26 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: linuxarm@...wei.com, mauro.chehab@...wei.com,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Akinobu Mita <akinobu.mita@...il.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Matt Ranostay <matt.ranostay@...sulko.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Subject: [PATCH v4 05/79] media: i2c: video-i2c: don't resume at remove time
Calling pm_runtime_get_sync() at driver's removal time is
not right, as this will resume PM runtime. This is clearly
not what it is desired there, since it calls
pm_runtime_set_suspended() afterwards.
So, just remove pm runtime get/put logic from the device
removal logic.
Fixes: 69d2a734c5dc ("media: video-i2c: support runtime PM")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
drivers/media/i2c/video-i2c.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index 0465832a4090..c9a774f4c8d2 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -893,10 +893,8 @@ static int video_i2c_remove(struct i2c_client *client)
{
struct video_i2c_data *data = i2c_get_clientdata(client);
- pm_runtime_get_sync(&client->dev);
pm_runtime_disable(&client->dev);
pm_runtime_set_suspended(&client->dev);
- pm_runtime_put_noidle(&client->dev);
if (data->chip->set_power)
data->chip->set_power(data, false);
--
2.30.2
Powered by blists - more mailing lists