Skip to contentSkip to conversation

Linux 2.5.68 - Fix gameport_close(gameport); after return in drivers/input/gameport/gameport.c

PATCH Applied Gabriel Devenyi 2 participants 2 messages Apr 30, 2003 – Jun 14, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Linux 2.5.68 - Fix gameport_close(gameport); after return in drivers/input/gameport/gameport.c

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This patch applies to 2.5.68, it is listed on kbugs.org. The gameport is never closed after calibrating it.

Please CC me with any discussion.
- --
Building the Future,
Gabriel Devenyi
[email protected]

- ---FILE---

- --- linux-2.5.68/drivers/input/gameport/gameport.c 2003-04-19 22:49:31.000000000 -0400
+++ linux-2.5.68-changed/drivers/input/gameport/gameport.c 2003-05-01 14:57:51.000000000 -0400
@@ -84,6 +84,7 @@
if ((t = DELTA(t2,t1) - DELTA(t3,t2)) < tx) tx = t;
}

+ gameport_close(gameport);
return 59659 / (tx < 1 ? 1 : tx);

#else
@@ -93,11 +94,10 @@
j = jiffies; while (j == jiffies);
j = jiffies; while (j == jiffies) { t++; gameport_read(gameport); }

+ gameport_close(gameport);
return t * HZ / 1000;

#endif
- -
- - gameport_close(gameport);
}

static void gameport_find_dev(struct gameport *gameport)

- ---ENFILE---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+sX8e7I5UBdiZaF4RAv8DAKCPpHLHADzNWUmRpHrHw7ldAfUdeACgklGx 9V+o3A+iUO8Jzb7T1Mr/6eU=
=EABS
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 6 lines · Gabriel Devenyi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This patch applies to 2.5.68, it is listed on kbugs.org. The gameport is never closed after calibrating it.

Please CC me with any discussion.

Thanks, applied.

Quoted 35 lines

- ---FILE---

- --- linux-2.5.68/drivers/input/gameport/gameport.c 2003-04-19 22:49:31.000000000 -0400
+++ linux-2.5.68-changed/drivers/input/gameport/gameport.c 2003-05-01 14:57:51.000000000 -0400

(quoted diff) +2 -4
@@ -84,6 +84,7 @@
 		if ((t = DELTA(t2,t1) - DELTA(t3,t2)) < tx) tx = t;
 	}
 
+	gameport_close(gameport);
 	return 59659 / (tx < 1 ? 1 : tx);
 
 #else
@@ -93,11 +94,10 @@
 	j = jiffies; while (j == jiffies);
 	j = jiffies; while (j == jiffies) { t++; gameport_read(gameport); }
 
+	gameport_close(gameport);
 	return t * HZ / 1000;
 
 #endif
- -
- -	gameport_close(gameport);
 }
 
 static void gameport_find_dev(struct gameport *gameport)
 
- ---ENFILE---
-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+sX8e7I5UBdiZaF4RAv8DAKCPpHLHADzNWUmRpHrHw7ldAfUdeACgklGx 9V+o3A+iUO8Jzb7T1Mr/6eU=
=EABS
-----END PGP SIGNATURE-----

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR