aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 66537b10132c..3ff37cfde6ab 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -507,7 +507,7 @@ static int dvb_frontend_is_exiting(struct dvb_frontend *fe)
507 return 1; 507 return 1;
508 508
509 if (fepriv->dvbdev->writers == 1) 509 if (fepriv->dvbdev->writers == 1)
510 if (time_after(jiffies, fepriv->release_jiffies + 510 if (time_after_eq(jiffies, fepriv->release_jiffies +
511 dvb_shutdown_timeout * HZ)) 511 dvb_shutdown_timeout * HZ))
512 return 1; 512 return 1;
513 513
@@ -2116,12 +2116,15 @@ static int dvb_frontend_release(struct inode *inode, struct file *file)
2116 2116
2117 dprintk ("%s\n", __func__); 2117 dprintk ("%s\n", __func__);
2118 2118
2119 if ((file->f_flags & O_ACCMODE) != O_RDONLY) 2119 if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
2120 fepriv->release_jiffies = jiffies; 2120 fepriv->release_jiffies = jiffies;
2121 mb();
2122 }
2121 2123
2122 ret = dvb_generic_release (inode, file); 2124 ret = dvb_generic_release (inode, file);
2123 2125
2124 if (dvbdev->users == -1) { 2126 if (dvbdev->users == -1) {
2127 wake_up(&fepriv->wait_queue);
2125 if (fepriv->exit != DVB_FE_NO_EXIT) { 2128 if (fepriv->exit != DVB_FE_NO_EXIT) {
2126 fops_put(file->f_op); 2129 fops_put(file->f_op);
2127 file->f_op = NULL; 2130 file->f_op = NULL;