linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andi Kleen <ak@muc.de>,
	vojtech@suse.cz, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PS/2 mouse rate setting
Date: Mon, 27 Oct 2003 20:29:50 +0100	[thread overview]
Message-ID: <20031027192950.GA2192@averell> (raw)
In-Reply-To: <Pine.LNX.4.44.0310271054120.1636-100000@home.osdl.org>

jOn Mon, Oct 27, 2003 at 10:56:16AM -0800, Linus Torvalds wrote:
> 
> Which makes no sense.

Ok new patch with this fixed.

---------------------------

Only set PS/2 mouse rate when the user specified a value.

Allow specifying it from the command line when the driver is compiled in.

Make rates[] static.

diff -u linux-2.6.0test9-averell/drivers/input/mouse/psmouse-base.c-o linux-2.6.0test9-averell/drivers/input/mouse/psmouse-base.c
--- linux-2.6.0test9-averell/drivers/input/mouse/psmouse-base.c-o	2003-09-28 10:53:17.000000000 +0200
+++ linux-2.6.0test9-averell/drivers/input/mouse/psmouse-base.c	2003-10-27 20:16:25.000000000 +0100
@@ -40,7 +40,7 @@
 
 static int psmouse_noext;
 int psmouse_resolution;
-unsigned int psmouse_rate = 60;
+unsigned int psmouse_rate = 0;
 int psmouse_smartscroll = PSMOUSE_LOGITECH_SMARTSCROLL;
 unsigned int psmouse_resetafter;
 
@@ -451,9 +451,12 @@
 
 static void psmouse_set_rate(struct psmouse *psmouse)
 {
-	unsigned char rates[] = { 200, 100, 80, 60, 40, 20, 10, 0 };
+	static unsigned char rates[] = { 200, 100, 80, 60, 40, 20, 10, 0 };
 	int i = 0;
 
+	if (!psmouse_rate)
+		return; 
+
 	while (rates[i] > psmouse_rate) i++;
 	psmouse_command(psmouse, rates + i, PSMOUSE_CMD_SETRATE);
 }
@@ -651,10 +654,17 @@
 	return 1;
 }
 
+static int __init psmouse_rate_setup(char *str)
+{
+	get_option(&str, &psmouse_rate);
+	return 1;
+}
+
 __setup("psmouse_noext", psmouse_noext_setup);
 __setup("psmouse_resolution=", psmouse_resolution_setup);
 __setup("psmouse_smartscroll=", psmouse_smartscroll_setup);
 __setup("psmouse_resetafter=", psmouse_resetafter_setup);
+__setup("psmouse_rate=", psmouse_rate_setup);
 
 #endif
 

  reply	other threads:[~2003-10-27 19:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-27 14:02 [PATCH] PS/2 mouse rate setting Andi Kleen
2003-10-27 16:32 ` Linus Torvalds
2003-10-27 18:38   ` Andi Kleen
2003-10-27 18:56     ` Linus Torvalds
2003-10-27 19:29       ` Andi Kleen [this message]
2003-10-28  0:55         ` Vojtech Pavlik
2003-10-28  1:23           ` Linus Torvalds
2003-10-28  1:29             ` Vojtech Pavlik
2003-10-27 22:47     ` Andries Brouwer
2003-10-27 23:13       ` Linus Torvalds
2003-10-28  3:52   ` jhf
2003-10-28  3:56     ` jhf
2003-10-28  9:47       ` Vojtech Pavlik
2003-10-29  6:36         ` Dmitry Torokhov
2003-10-29  8:30           ` Vojtech Pavlik
2003-10-28 16:25 Jon Smirl
2003-10-28 17:02 ` Felipe Alfaro Solana
2003-10-28 17:13   ` Jon Smirl
     [not found] <1067372443.864.15.camel@teapot.felipe-alfaro.com>
2003-10-28 20:55 ` Jon Smirl
2003-10-28 23:12   ` Felipe Alfaro Solana
     [not found] <20031027140217.GA1065@averell.suse.lists.linux.kernel>
     [not found] ` <20031028035625.GB20145@rivenstone.net.suse.lists.linux.kernel>
     [not found]   ` <20031028094709.GA4325@ucw.cz.suse.lists.linux.kernel>
     [not found]     ` <200310290136.06439.dtor_core@ameritech.net.suse.lists.linux.kernel>
     [not found]       ` <20031029083040.GA18135@ucw.cz.suse.lists.linux.kernel>
2003-10-29 12:47         ` Andi Kleen
2003-11-18 13:52           ` Vojtech Pavlik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031027192950.GA2192@averell \
    --to=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).