Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] little bug in saa7146_core.c



Hello!

My saa7146_v4l.o tells me about unresolved symbols.
In despair of that I looked in the code "saa7146_core.c"
from where these symbos come from and I found a litle bug
in the function: saa7146_add_extension()

--- schnipp ---
int	saa7146_add_extension(struct saa7146_extension* ext)
{
	int i = 0, j = 0;

	hprintk("saa7146_core.o: ==> saa7146_attach_extension\n");

	for (i = 0; i < SAA7146_MAX_EXTENSIONS; i++) {
		if (NULL == saa7146_ext[i])
			break;
		if (SAA7146_MAX_EXTENSIONS == i) {
			printk(KERN_WARNING "saa7146.o: attach_extension(%s) - enlarge 
SAA7146_MAX_EXTENSIONS.\n",ext->name);
			return -ENOMEM;
		}
	}
	saa7146_ext[i] = ext;
	saa7146_extension_count++;
--- schnapp ---

The second "If" statement will never be executed. It must be outside the
"for" statement to work. OK, the longer the speech, the less thought.
Here is the diff that correct these:

diff -c2 saa7146_core.c my_core.c
--- diff begin ---
*** DVB/driver/saa7146_core.c	Mon Apr 15 02:49:12 2002
--- saa7146_core.c	Sat May 25 15:26:04 2002
***************
*** 821,829 ****
  		if (NULL == saa7146_ext[i])
  			break;
- 		if (SAA7146_MAX_EXTENSIONS == i) {
- 			printk(KERN_WARNING "saa7146.o: attach_extension(%s) - enlarge 
SAA7146_MAX_EXTENSIONS.\n",ext->name);
- 			return -ENOMEM;
- 		}
  	}
  	saa7146_ext[i] = ext;
  	saa7146_extension_count++;
--- 821,830 ----
  		if (NULL == saa7146_ext[i])
  			break;
  	}
+         if (SAA7146_MAX_EXTENSIONS == i) {
+ 		printk(KERN_WARNING "saa7146.o: attach_extension(%s) - enlarge 
SAA7146_MAX_EXTENSIONS.\n",ext->name);
+ 		return -ENOMEM;
+ 	}
+ 
  	saa7146_ext[i] = ext;
  	saa7146_extension_count++;
--- diff end ---

But my problem is not soved :-(
If anyone knows why saa7146_v4l.o can not find the symbols:
saa7146_add_extension
saa7146_del_extension
I would be lucky.

My system is GNU/Debina sid, kernel 2.4.18

Bye
Arndt Heuvel


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index