diff mbox

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

Message ID 1424974769-27095-1-git-send-email-prabhakar.csengg@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lad, Prabhakar Feb. 26, 2015, 6:19 p.m. UTC
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>

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

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
 drivers/media/i2c/adv7180.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Lars-Peter Clausen Feb. 26, 2015, 6:25 p.m. UTC | #1
On 02/26/2015 07:19 PM, Lad Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> 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].

- Lars

[1] 
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=632f2b0db9dabbaa5835b50a75a3a1639d6f6f38
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lad, Prabhakar Feb. 26, 2015, 6:32 p.m. UTC | #2
Hi Lars,

On Thu, Feb 26, 2015 at 6:25 PM, Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 02/26/2015 07:19 PM, Lad Prabhakar wrote:
>>
>> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>>
>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index b75878c..734d84a 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -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;