Hi Daniele,

what source tree are you referencing? Your patch does not applies to the dvb-kernel source files in the LinuxTV CVS.

Holger


Daniele Bellucci (by way of Daniele Bellucci ) wrote:
This patch applies both to 2.5.69 and to 2.5.70



diff -urN linux-2.5.69-my/drivers/media/dvb/dvb-core/dvb_frontend.c
 linux-2.5.69/drivers/media/dvb/dvb-core/dvb_frontend.c ---
 linux-2.5.69-my/drivers/media/dvb/dvb-core/dvb_frontend.c      2003-06-03
 21:54:32.000000000 +0200 +++
 linux-2.5.69/drivers/media/dvb/dvb-core/dvb_frontend.c 2003-06-03
 22:08:07.000000000 +0200 @@ -20,6 +20,10 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 USA. * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+ *
+ * Changes:
+ * 03/06/2003:   handling failure of dvb_frontend_start in dvb_frontend_open
+ *               Daniele Bellucci <[EMAIL PROTECTED]>.
  */

 #include <linux/sched.h>
@@ -527,20 +531,21 @@


static -void dvb_frontend_start (struct dvb_frontend_data *fe) +pid_t dvb_frontend_start (struct dvb_frontend_data *fe) { + pid_t dvb_kthread; dprintk ("%s\n", __FUNCTION__);

        if (fe->thread)
                dvb_frontend_stop (fe);

        if (down_interruptible (&fe->sem))
-               return;
+               return -ERESTARTSYS;

        fe->exit = 0;
        fe->thread = (void*) ~0;

-       kernel_thread (dvb_frontend_thread, fe, 0);
+       return kernel_thread (dvb_frontend_thread, fe, 0);
 }


@@ -610,6 +615,7 @@ { struct dvb_device *dvbdev = file->private_data; struct dvb_frontend_data *fe = dvbdev->priv; + pid_t dvb_kthread; int ret;

        dprintk ("%s\n", __FUNCTION__);
@@ -618,12 +624,18 @@
                return ret;

        if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
-               dvb_frontend_start (fe);
+               dvb_kthread = dvb_frontend_start (fe);
+               if (dvb_kthread < 0) {
+                       ret = dvb_kthread;
+                       dvb_generic_release(inode, file);
+                       goto out;
+               }
+       }

                /*  empty event queue */
                fe->events.eventr = fe->events.eventw;
        }
-
+out:
        return ret;
 }



Bros... please apply.

Daniele.




-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- PGP PKEY http://pgp.mit.edu:11371/pks/[EMAIL PROTECTED]&op=index ICQ# 104896040
Netphone/Fax 178.605.7063
Homepage http://web.tiscali.it/bellucda
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
---


Daniele Bellucci






-- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as subject.



Reply via email to