mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 22:44:27 +08:00
[media] drivers/media/dvb-core/en50221: move code to dvb_ca_private_free()
Prepare for postponing the call until all file handles have been closed. [mchehab@osg.samsung.com: make checkpatch happy] Signed-off-by: Max Kellermann <max@duempel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
212fa08126
commit
bd3df3c53e
@ -161,6 +161,18 @@ struct dvb_ca_private {
|
|||||||
struct mutex ioctl_mutex;
|
struct mutex ioctl_mutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void dvb_ca_private_free(struct dvb_ca_private *ca)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
dvb_unregister_device(ca->dvbdev);
|
||||||
|
for (i = 0; i < ca->slot_count; i++)
|
||||||
|
vfree(ca->slot_info[i].rx_buffer.data);
|
||||||
|
|
||||||
|
kfree(ca->slot_info);
|
||||||
|
kfree(ca);
|
||||||
|
}
|
||||||
|
|
||||||
static void dvb_ca_en50221_thread_wakeup(struct dvb_ca_private *ca);
|
static void dvb_ca_en50221_thread_wakeup(struct dvb_ca_private *ca);
|
||||||
static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, u8 * ebuf, int ecount);
|
static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, u8 * ebuf, int ecount);
|
||||||
static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot, u8 * ebuf, int ecount);
|
static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot, u8 * ebuf, int ecount);
|
||||||
@ -1759,10 +1771,7 @@ void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca)
|
|||||||
|
|
||||||
for (i = 0; i < ca->slot_count; i++) {
|
for (i = 0; i < ca->slot_count; i++) {
|
||||||
dvb_ca_en50221_slot_shutdown(ca, i);
|
dvb_ca_en50221_slot_shutdown(ca, i);
|
||||||
vfree(ca->slot_info[i].rx_buffer.data);
|
|
||||||
}
|
}
|
||||||
kfree(ca->slot_info);
|
dvb_ca_private_free(ca);
|
||||||
dvb_unregister_device(ca->dvbdev);
|
|
||||||
kfree(ca);
|
|
||||||
pubca->private = NULL;
|
pubca->private = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user