From: Hans Verkuil Date: Fri, 31 Dec 2010 14:27:38 +0000 (-0300) Subject: [media] w9966: zero device state after a detach X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bd5ba3ba2ead7248124723dac2481d0992e75e91;p=linux-beck.git [media] w9966: zero device state after a detach After a detach zero the whole device state to ensure a clean slate on the next attach. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c index 019ee206cbee..fa35639d0c15 100644 --- a/drivers/media/video/w9966.c +++ b/drivers/media/video/w9966.c @@ -937,6 +937,7 @@ static void w9966_term(struct w9966 *cam) parport_unregister_device(cam->pdev); w9966_set_state(cam, W9966_STATE_PDEV, 0); } + memset(cam, 0, sizeof(*cam)); }