Re: [linux-dvb] Re: [PATCH] Implement repeat key handling in budget-ci IR

2007-02-26 Thread David Härdeman

On Sun, February 25, 2007 19:20, Oliver Endriss said:
 Jouni wrote:
 During make I get this:

 /usr/local/src/v4ltesti/v4l-dvb/v4l/budget-ci.c:110: error: expected
 identifier before numeric constant
 make[3]: *** [/usr/local/src/v4ltesti/v4l-dvb/v4l/budget-ci.o] Error 1
 make[2]: *** [_module_/usr/local/src/v4ltesti/v4l-dvb/v4l] Error 2
 make[2]: Leaving directory `/usr/src/linux-headers-2.6.17-50-generic'
 make[1]: *** [default] Virhe 2
 make[1]: Poistutaan hakemistosta /usr/local/src/v4ltesti/v4l-dvb/v4l
 make: *** [all] Virhe 2

 Did I botch something or is there a glitch in the code?

 Does the attached patch fix it for you?

 @David:
 This kind of stuff should go to compat.h anyway.
 Fortunately, false/true are already defined there. ;-)

Thanks for fixing the breakage, I was at FOSDEM this weekend so I did not
have time to take care of it myself.

The good news is of course that all drivers are free to use the bool type
now.

-- 
David Härdeman


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Re: [PATCH] Implement repeat key handling in budget-ci IR

2007-02-25 Thread Jouni
During make I get this:

/usr/local/src/v4ltesti/v4l-dvb/v4l/budget-ci.c:110: error: expected
identifier before numeric constant
make[3]: *** [/usr/local/src/v4ltesti/v4l-dvb/v4l/budget-ci.o] Error 1
make[2]: *** [_module_/usr/local/src/v4ltesti/v4l-dvb/v4l] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.17-50-generic'
make[1]: *** [default] Virhe 2
make[1]: Poistutaan hakemistosta /usr/local/src/v4ltesti/v4l-dvb/v4l
make: *** [all] Virhe 2

Did I botch something or is there a glitch in the code?





On Sun, 25 Feb 2007 02:17:54 +0100, Oliver Endriss [EMAIL PROTECTED]
said:
 David Härdeman wrote:
  The attached patch contains the last set of changes to the budget-ci IR 
  handling which makes it use the repeat handling of the input subsystem. 
  
  This allows some code simplification, makes sure that repeat key presses 
  are reported as such and also allows the debounce hack to be removed 
  altogether.
  
  In addition a couple of static variables were removed which would have 
  confused the IR code if more than one card is used.
 
 Thanks, applied.
 
 CU
 Oliver
 
 -- 
 
 VDR Remote Plugin 0.3.9 available at
 http://www.escape-edv.de/endriss/vdr/
 
 
 
 ___
 linux-dvb mailing list
 linux-dvb@linuxtv.org
 http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
-- 
  Jouni
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - Access your email from home and the web


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Re: [PATCH] Implement repeat key handling in budget-ci IR

2007-02-25 Thread Oliver Endriss
Jouni wrote:
 During make I get this:
 
 /usr/local/src/v4ltesti/v4l-dvb/v4l/budget-ci.c:110: error: expected
 identifier before numeric constant
 make[3]: *** [/usr/local/src/v4ltesti/v4l-dvb/v4l/budget-ci.o] Error 1
 make[2]: *** [_module_/usr/local/src/v4ltesti/v4l-dvb/v4l] Error 2
 make[2]: Leaving directory `/usr/src/linux-headers-2.6.17-50-generic'
 make[1]: *** [default] Virhe 2
 make[1]: Poistutaan hakemistosta /usr/local/src/v4ltesti/v4l-dvb/v4l
 make: *** [all] Virhe 2
 
 Did I botch something or is there a glitch in the code?

Does the attached patch fix it for you?

@David:
This kind of stuff should go to compat.h anyway.
Fortunately, false/true are already defined there. ;-)

CU
Oliver

-- 

VDR Remote Plugin 0.3.9 available at
http://www.escape-edv.de/endriss/vdr/

diff -r 065567ae3ae0 linux/drivers/media/dvb/ttpci/budget-ci.c
--- a/linux/drivers/media/dvb/ttpci/budget-ci.c	Sun Feb 25 10:09:33 2007 -0200
+++ b/linux/drivers/media/dvb/ttpci/budget-ci.c	Sun Feb 25 19:11:17 2007 +0100
@@ -100,17 +100,8 @@ struct budget_ci_ir {
 	int rc5_device;
 	u32 last_raw;
 	u32 ir_key;
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,19)
 	bool have_command;
 };
-#else
-	int have_command;
-};
-enum {
-	false	= 0,
-	true	= 1
-};
-#endif
 
 struct budget_ci {
 	struct budget budget;
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] Re: [PATCH] Implement repeat key handling in budget-ci IR

2007-02-25 Thread Oliver Endriss
Oliver Endriss wrote:
 Jouni wrote:
  During make I get this:
  
  /usr/local/src/v4ltesti/v4l-dvb/v4l/budget-ci.c:110: error: expected
  identifier before numeric constant
  make[3]: *** [/usr/local/src/v4ltesti/v4l-dvb/v4l/budget-ci.o] Error 1
  make[2]: *** [_module_/usr/local/src/v4ltesti/v4l-dvb/v4l] Error 2
  make[2]: Leaving directory `/usr/src/linux-headers-2.6.17-50-generic'
  make[1]: *** [default] Virhe 2
  make[1]: Poistutaan hakemistosta /usr/local/src/v4ltesti/v4l-dvb/v4l
  make: *** [all] Virhe 2
  
  Did I botch something or is there a glitch in the code?
 
 Does the attached patch fix it for you?

Ok, I tried to compile against 2.6.18 and it still doesn't work.
The attached patch fixes it...

CU
Oliver

-- 

VDR Remote Plugin 0.3.9 available at
http://www.escape-edv.de/endriss/vdr/

diff -r 1697764d339d linux/drivers/media/dvb/ttpci/budget-ci.c
--- a/linux/drivers/media/dvb/ttpci/budget-ci.c	Sun Feb 25 14:40:47 2007 +0100
+++ b/linux/drivers/media/dvb/ttpci/budget-ci.c	Sun Feb 25 20:02:58 2007 +0100
@@ -100,17 +100,8 @@ struct budget_ci_ir {
 	int rc5_device;
 	u32 last_raw;
 	u32 ir_key;
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,19)
 	bool have_command;
 };
-#else
-	int have_command;
-};
-enum {
-	false	= 0,
-	true	= 1
-};
-#endif
 
 struct budget_ci {
 	struct budget budget;
diff -r 1697764d339d v4l/compat.h
--- a/v4l/compat.h	Sun Feb 25 14:40:47 2007 +0100
+++ b/v4l/compat.h	Sun Feb 25 20:02:39 2007 +0100
@@ -357,6 +357,8 @@ usb_to_input_id(const struct usb_device 
 # define PCIAGP_FAIL 0
 
 #define vmalloc_32_user(a) vmalloc_32(a)
+
+typedef int bool;
 #endif
 
 #ifndef true
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] Re: [PATCH] Implement repeat key handling in budget-ci IR

2007-02-25 Thread Trent Piepho
On Sun, 25 Feb 2007, Oliver Endriss wrote:
  Does the attached patch fix it for you?

 Ok, I tried to compile against 2.6.18 and it still doesn't work.
 The attached patch fixes it...

The bool type was added here, oct 1 2006:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6e21828743247270d09a86756a0c11702500dbfb

This was for kernel 2.6.19.  It looks like budget-ci is the first v4l-dvb
driver to use it, so there wasn't any pre-2.6.19 compat code for it yet.

I suggest adding to compat.h:

#ifndef bool
#define int bool
#endif

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] Re: [PATCH] Implement repeat key handling in budget-ci IR

2007-02-25 Thread Oliver Endriss
Trent Piepho wrote:
 On Sun, 25 Feb 2007, Oliver Endriss wrote:
   Does the attached patch fix it for you?
 
  Ok, I tried to compile against 2.6.18 and it still doesn't work.
  The attached patch fixes it...
 
 The bool type was added here, oct 1 2006:
 http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6e21828743247270d09a86756a0c11702500dbfb
 
 This was for kernel 2.6.19.  It looks like budget-ci is the first v4l-dvb
 driver to use it, so there wasn't any pre-2.6.19 compat code for it yet.
 
 I suggest adding to compat.h:
 
 #ifndef bool
 #define int bool
 #endif

Well, should be
  #define bool int
;-)

Anyway, bool is a typedef, and the C preprocessor cannot detect a
typedef. So your #define would replace all occurrences of bool with int,
no matter which kernel you run.

It has already been fixed in HG master:
I added 'typedef int bool;' for kernel  2.6.19.
Tested ok with 2.6.18 and 2.6.20.

Oliver

-- 

VDR Remote Plugin 0.3.9 available at
http://www.escape-edv.de/endriss/vdr/



___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


[linux-dvb] Re: [PATCH] Implement repeat key handling in budget-ci IR

2007-02-24 Thread Oliver Endriss
David Härdeman wrote:
 The attached patch contains the last set of changes to the budget-ci IR 
 handling which makes it use the repeat handling of the input subsystem. 
 
 This allows some code simplification, makes sure that repeat key presses 
 are reported as such and also allows the debounce hack to be removed 
 altogether.
 
 In addition a couple of static variables were removed which would have 
 confused the IR code if more than one card is used.

Thanks, applied.

CU
Oliver

-- 

VDR Remote Plugin 0.3.9 available at
http://www.escape-edv.de/endriss/vdr/



___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb