[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7d310b4db4f7b24bd187d76ab21eabc36e4a7856.1619518193.git.mchehab+huawei@kernel.org>
Date: Tue, 27 Apr 2021 12:12:31 +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>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Songjun Wu <songjun.wu@...rochip.com>,
Wenyou Yang <wenyou.yang@...rochip.com>,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Subject: [PATCH v2 04/79] media: i2c: ov7740: 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: 39c5c4471b8d ("media: i2c: Add the ov7740 image sensor driver")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
drivers/media/i2c/ov7740.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/i2c/ov7740.c b/drivers/media/i2c/ov7740.c
index 47a9003d29d6..ed6904b2e8f5 100644
--- a/drivers/media/i2c/ov7740.c
+++ b/drivers/media/i2c/ov7740.c
@@ -1165,10 +1165,8 @@ static int ov7740_remove(struct i2c_client *client)
v4l2_async_unregister_subdev(sd);
ov7740_free_controls(ov7740);
- pm_runtime_get_sync(&client->dev);
pm_runtime_disable(&client->dev);
pm_runtime_set_suspended(&client->dev);
- pm_runtime_put_noidle(&client->dev);
ov7740_set_power(ov7740, 0);
return 0;
--
2.30.2
Powered by blists - more mailing lists