LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-18-2007, 11:58 PM   #1
nukenuke123
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
kernel patch


hi
can any told how to remove this patch from the article and how to do it plzzzzzzzzzzz hellllllllp


=============================================================================================
Try this. I think it is a fault with ir-kbd-i2c, in that it is being probed at the same time as the dst_probe is occurring, and so dst_probe fails. This patch might fix your problem. You can either apply this, or else just delete bttv_probe part yourself. If you use this patch, you need to specify insmod option twinhan=1 for ir-kbd-i2c module
Added twinhan option to bypass "ir_probe", which causes "dst_probe" to fail on Twinhan DST clones.
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 59edf58..0ab2db6 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -52,8 +54,11 @@ module_param(debug, int, 0644); /* de

static int hauppauge = 0;
module_param(hauppauge, int, 0644); /* Choose Hauppauge remote */
-MODULE_PARM_DESC(hauppauge, "Specify Hauppauge remote: 0=black, 1=grey (defaults to 0)"); +MODULE_PARM_DESC(hauppauge, "Specify Hauppauge remote: 0=black, 1=grey (defaults to 0)")
+static int twinhan = 0;
+module_param(twinhan, int, 0644); /* Fix for Twinhan cards */
+MODULE_PARM_DESC(twinhan, "Workaround for Twinhan _write_dst error which causes dst_probe to fail: 1=on, 0=off (default 0)");
#define DEVNAME "ir-kbd-i2c"
#define dprintk(level, fmt, arg...) if (debug >= level) \
@@ -339,7 +344,7 @@ static int ir_attach(struct i2c_adapter
case 0x1a:
name = "Hauppauge";
ir->get_key = get_key_haup;
- ir_type = IR_TYPE_RC5;
+ ir_type = IR_TYPE_OTHER;
if (hauppauge == 1) {
ir_codes = ir_codes_hauppauge_new;
} else {
@@ -447,51 +452,55 @@ static int ir_probe(struct i2c_adapter *

That's why we probe 0x1a (~0x34) first. CB
*/
-
- static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1};
- static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, -1 };
- static const int probe_em28XX[] = { 0x30, 0x47, -1 };
- const int *probe = NULL;
- struct i2c_client c;
- unsigned char buf;
- int i,rc;
-
- switch (adap->id) {
- case I2C_HW_B_BT848:
- probe = probe_bttv;
- break;
- case I2C_HW_B_CX2341X:
- probe = probe_bttv;
- break;
- case I2C_HW_SAA7134:
- probe = probe_saa7134;
- break;
- case I2C_HW_B_EM28XX:
- probe = probe_em28XX;
- break;
- }
- if (NULL == probe)
+ if (twinhan == 1) {
+ dprintk(1,"Twinhan option specified. IR disabled.\n");
return 0;
-
- memset(&c,0,sizeof(c));
- c.adapter = adap;
- for (i = 0; -1 != probe[i]; i++) {
- c.addr = probe[i];
- rc = i2c_master_recv(&c,&buf,0);
- dprintk(1,"probe 0x%02x @ %s: %s\n",
- probe[i], adap->name,
- (0 == rc) ? "yes" : "no");
- if (0 == rc) {
- ir_attach(adap,probe[i],0,0);
+ } else {
+ static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1};
+ static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, -1 };
+ static const int probe_em28XX[] = { 0x30, 0x47, -1 };
+ const int *probe = NULL;
+ struct i2c_client c;
+ unsigned char buf;
+ int i,rc;
+
+ switch (adap->id) {
+ case I2C_HW_B_BT848:
+ probe = probe_bttv;
+ break;
+ case I2C_HW_B_CX2341X:
+ probe = probe_bttv;
+ break;
+ case I2C_HW_SAA7134:
+ probe = probe_saa7134;
+ break;
+ case I2C_HW_B_EM28XX:
+ probe = probe_em28XX;
break;
}
+ if (NULL == probe)
+ return 0;
+
+ memset(&c,0,sizeof(c));
+ c.adapter = adap;
+ for (i = 0; -1 != probe[i]; i++) {
+ c.addr = probe[i];
+ rc = i2c_master_recv(&c,&buf,0);
+ dprintk(1,"probe 0x%02x @ %s: %s\n",
+ probe[i], adap->name,
+ (0 == rc) ? "yes" : "no");
+ if (0 == rc) {
+ ir_attach(adap,probe[i],0,0);
+ break;
+ }
+ }
+ return 0;
}
- return 0;
}


=============================================================================

Last edited by nukenuke123; 03-19-2007 at 12:01 AM.
 
Old 03-19-2007, 03:15 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
The patch is everything below (not including) the line that begins with diff up to (not including) the line of all equals signs at the bottom. Copy that portion to a file in the top directory of your Linux kernel source. Then do:

patch -p1 < filename.diff

Where filename.diff is the file you made. Check for errors applying the patch. If there are none go ahead and go through the usual procedure of rebuilding the kernel and/or the particular driver you want.
 
Old 03-19-2007, 03:12 PM   #3
nukenuke123
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
thanx
i'll try
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i patch 2.4.21-37 kernel with antidote2 security patch suchi Linux - Kernel 4 09-05-2006 03:29 AM
Kernel Patch (Patch-2.6.13) ukez Linux - Hardware 4 08-30-2005 04:40 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 04:59 AM
Unable to patch 2.6.11.7 kernel with Reiser4 mm patch SlackwareInAZ Slackware 9 04-26-2005 07:33 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 02:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration