lkml.org 
[lkml]   [2003]   [Feb]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateWed, 12 Feb 2003 12:04:54 +0100
FromVojtech Pavlik <>
Subject[patch] input: Give preferential treatment to gameport at 0x201 [9/14]
You can pull this changeset from:
	bk://kernel.bkbits.net/vojtech/input

===================================================================
ChangeSet@1.1012, 2003-02-12 11:03:11+01:00, vojtech@suse.cz
  input: Give preferential treatment to gameport at 0x201, and use
    the odd addresses for access.


 ns558.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
===================================================================
diff -Nru a/drivers/input/gameport/ns558.c b/drivers/input/gameport/ns558.c
--- a/drivers/input/gameport/ns558.c	Wed Feb 12 11:56:47 2003
+++ b/drivers/input/gameport/ns558.c	Wed Feb 12 11:56:47 2003
@@ -46,7 +46,7 @@
 #define NS558_ISA	1
 #define NS558_PNP	2
 
-static int ns558_isa_portlist[] = { 0x200, 0x201, 0x202, 0x203, 0x204, 0x205, 0x207, 0x209,
+static int ns558_isa_portlist[] = { 0x201, 0x200, 0x202, 0x203, 0x204, 0x205, 0x207, 0x209,
 				    0x20b, 0x20c, 0x20e, 0x20f, 0x211, 0x219, 0x101, 0 };
 
 struct ns558 {
@@ -140,7 +140,7 @@
 	
 	port->type = NS558_ISA;
 	port->size = (1 << i);
-	port->gameport.io = io & (-1 << i);
+	port->gameport.io = io;
 	port->gameport.phys = port->phys;
 	port->gameport.name = port->name;
 	port->gameport.id.bustype = BUS_ISA;
@@ -148,7 +148,7 @@
 	sprintf(port->phys, "isa%04x/gameport0", io & (-1 << i));
 	sprintf(port->name, "NS558 ISA");
 
-	request_region(port->gameport.io, (1 << i), "ns558-isa");
+	request_region(io & (-1 << i), (1 << i), "ns558-isa");
 
 	gameport_register_port(&port->gameport);
 
@@ -275,7 +275,7 @@
 				/* fall through */
 #endif
 			case NS558_ISA:
-				release_region(port->gameport.io, port->size);
+				release_region(port->gameport.io & ~(port->size - 1), port->size);
 				break;
 		
 			default:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:33    [from the cache]
©2003-2008