Skip to contentSkip to conversation

media: i2c: adv7180: unregister the subdev in remove callback

PATCH In review Lad Prabhakar 2 participants 3 messages Feb 26, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: i2c: adv7180: unregister the subdev in remove callback

From: "Lad, Prabhakar" <[email protected]>

this patch makes sure we unregister the subdev by calling v4l2_device_unregister_subdev() on remove callback.

---
 drivers/media/i2c/adv7180.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/i2c/adv7180.c +1 -0
index b75878c..734d84a 100644
@@ -1270,6 +1270,7 @@ static int adv7180_remove(struct i2c_client *client)
 	if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2)
 		i2c_unregister_device(state->csi_client);
 
+	v4l2_device_unregister_subdev(sd);
 	mutex_destroy(&state->mutex);
 
 	return 0;
Signature · 1 line
1.9.1
#2 lore raw

Hi Lars,

Quoted 11 lines · Lars-Peter Clausen
Quoted 5 lines · Lad Prabhakar

From: "Lad, Prabhakar" <[email protected]>

this patch makes sure we unregister the subdev by calling v4l2_device_unregister_subdev() on remove callback.

This was just removed a while ago, see commit 632f2b0db9da ("[media]
adv7180: Remove duplicate unregister call")[1].

Sorry for the noise, I missed the path v4l2_async_unregister_subdev --> v4l2_async_cleanup --> v4l2_device_unregister_subdev()

Cheers,
--Prabhakar Lad