[media] dvbdev: split dvb_unregister_device()
authorMax Kellermann <max.kellermann@gmail.com>
Tue, 9 Aug 2016 21:32:11 +0000 (18:32 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 18 Nov 2016 17:02:39 +0000 (15:02 -0200)
commit1f4ed6cd58f36574237926f35bdec50116669909
tree1c9da70bf6753eaa1c91ab7627d40b02f8f8a35f
parentbd336e63441bcdeeccca6a698087d913a32478c5
[media] dvbdev: split dvb_unregister_device()

dvb_unregister_device() has a major problem: it combines unregistering
with memory disposal.  Sometimes, it is necessary to unregister a
device, but no memory can be freed yet, because a process still has a
(stale) file handle.  Therefore, we need to split
dvb_unregister_device().  This will allow sanitizing a few callers.

With my new design, dvb_unregister_device() appears misnamed, but to
reduce patch noise, I'm not renaming it just yet.

Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-core/dvbdev.c
drivers/media/dvb-core/dvbdev.h