[PATCH v2 13/16] media: i2c: isl7998x: move remove() after the PM callbacks
From: Cong Nguyen
Date: Mon Nov 23 2026 - 10:41:09 EST
Move isl7998x_remove() below the runtime PM callbacks so that the following
patch ("media: i2c: isl7998x: power down the decoder on remove") can call
them from it without a forward declaration.
No functional change.
Signed-off-by: Cong Nguyen <congnt264@xxxxxxxxx>
---
drivers/media/i2c/isl7998x.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/media/i2c/isl7998x.c b/drivers/media/i2c/isl7998x.c
index e36fb355133e..42387bd310fb 100644
--- a/drivers/media/i2c/isl7998x.c
+++ b/drivers/media/i2c/isl7998x.c
@@ -1544,16 +1544,6 @@ static int isl7998x_probe(struct i2c_client *client)
return ret;
}
-static void isl7998x_remove(struct i2c_client *client)
-{
- struct isl7998x *isl7998x = i2c_to_isl7998x(client);
-
- pm_runtime_disable(&client->dev);
- v4l2_async_unregister_subdev(&isl7998x->subdev);
- isl7998x_remove_controls(isl7998x);
- media_entity_cleanup(&isl7998x->subdev.entity);
-}
-
static const struct of_device_id isl7998x_of_match[] = {
{ .compatible = "isil,isl79987", },
{ /* sentinel */ },
@@ -1602,6 +1592,16 @@ static int __maybe_unused isl7998x_runtime_suspend(struct device *dev)
return 0;
}
+static void isl7998x_remove(struct i2c_client *client)
+{
+ struct isl7998x *isl7998x = i2c_to_isl7998x(client);
+
+ pm_runtime_disable(&client->dev);
+ v4l2_async_unregister_subdev(&isl7998x->subdev);
+ isl7998x_remove_controls(isl7998x);
+ media_entity_cleanup(&isl7998x->subdev.entity);
+}
+
static const struct dev_pm_ops isl7998x_pm_ops = {
SET_RUNTIME_PM_OPS(isl7998x_runtime_suspend,
isl7998x_runtime_resume,
--
2.25.1