[media] rc-main: Fix device de-registration logic
authorMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 29 Jul 2011 05:23:20 +0000 (02:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 31 Jul 2011 03:50:56 +0000 (00:50 -0300)
commitb05681b91709a19b40a452f566cc852619b30082
tree7802a9adcf6cb73b534e7f9b197ce7f8c4fcd602
parenteaceba650dea4af61f6f3a4919caa096bb4c2929
[media] rc-main: Fix device de-registration logic

rc unregister logic were deadly broken, preventing some drivers to
be removed. Among the broken things, rc_dev_uevent() is being called
during device_del(), causing a data filling on an area that it is
not ready anymore.

Also, some drivers have a stop callback defined, that needs to be called
before data removal, as it stops data polling.

Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/rc-main.c