diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-08-17 16:49:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:05:21 -0400 |
commit | 82e67246cd2a860637ee9d27776ad48d32734f6c (patch) | |
tree | 1c4386c279d6cd314657f0a4a8cd9146f4b8b13b /drivers | |
parent | 89d969a39da8e9ee5db1c1fb49f55f4206a445ac (diff) |
V4L/DVB (6031): Fix for bug 7819: fixed hotplugging for dvbnet
The first part of dvb_net_close() is just a cut&paste from
dvb_generic_release(), so maybe it would be better to just call
dvb_generic_release() instead?
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Markus Rechberger <mrechberger@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_net.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c index b9c78d03a7fe..13e2998a4043 100644 --- a/drivers/media/dvb/dvb-core/dvb_net.c +++ b/drivers/media/dvb/dvb-core/dvb_net.c | |||
@@ -1441,18 +1441,9 @@ static int dvb_net_close(struct inode *inode, struct file *file) | |||
1441 | struct dvb_device *dvbdev = file->private_data; | 1441 | struct dvb_device *dvbdev = file->private_data; |
1442 | struct dvb_net *dvbnet = dvbdev->priv; | 1442 | struct dvb_net *dvbnet = dvbdev->priv; |
1443 | 1443 | ||
1444 | if (!dvbdev) | 1444 | dvb_generic_release(inode, file); |
1445 | return -ENODEV; | ||
1446 | 1445 | ||
1447 | if ((file->f_flags & O_ACCMODE) == O_RDONLY) { | 1446 | if(dvbdev->users == 1 && dvbnet->exit == 1) { |
1448 | dvbdev->readers++; | ||
1449 | } else { | ||
1450 | dvbdev->writers++; | ||
1451 | } | ||
1452 | |||
1453 | dvbdev->users++; | ||
1454 | |||
1455 | if(dvbdev->users == 1 && dvbnet->exit==1) { | ||
1456 | fops_put(file->f_op); | 1447 | fops_put(file->f_op); |
1457 | file->f_op = NULL; | 1448 | file->f_op = NULL; |
1458 | wake_up(&dvbdev->wait_queue); | 1449 | wake_up(&dvbdev->wait_queue); |