Skip to content

Commit

Permalink
V4L/DVB (6031): Fix for bug 7819: fixed hotplugging for dvbnet
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 89d969a commit 82e6724
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions drivers/media/dvb/dvb-core/dvb_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,18 +1441,9 @@ static int dvb_net_close(struct inode *inode, struct file *file)
struct dvb_device *dvbdev = file->private_data;
struct dvb_net *dvbnet = dvbdev->priv;

if (!dvbdev)
return -ENODEV;
dvb_generic_release(inode, file);

if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
dvbdev->readers++;
} else {
dvbdev->writers++;
}

dvbdev->users++;

if(dvbdev->users == 1 && dvbnet->exit==1) {
if(dvbdev->users == 1 && dvbnet->exit == 1) {
fops_put(file->f_op);
file->f_op = NULL;
wake_up(&dvbdev->wait_queue);
Expand Down

0 comments on commit 82e6724

Please sign in to comment.