public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Pavel Machek <pavel@ucw.cz>,
	kernel list <linux-kernel@vger.kernel.org>,
	vojtech@ucw.cz
Subject: Re: Corrected drivermodel for i8042.c
Date: Sun, 16 Nov 2003 15:20:03 -0500	[thread overview]
Message-ID: <200311161520.03425.dtor_core@ameritech.net> (raw)
In-Reply-To: <20031116131134.GA301@elf.ucw.cz>

On Sunday 16 November 2003 08:11 am, Pavel Machek wrote:

>
> +static int i8042_resume_port(struct serio *port)
> +{
> +	struct serio_dev *dev = port->dev;
> +	if (dev) {
> +		dev->disconnect(port);
> +		dev->connect(port, dev);
> +	}
> +}

You want to do that event if there was nothing attached to the port
as a mouse might get plugged in while the box is suspended. I think
serio_rescan() is more appropriate (it will do a disconnect if needed
for you).

Overall there is a problem with disconnect/connect method as it will 
cause a new input device created for the same hardware if old input
device is held open by some process. If ever serio_reconnect patches
will make in the tree then serio_reconnect() can be used instead of
serio_rescan() as it will try to keep the same input device.

Dmitry

  reply	other threads:[~2003-11-16 20:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-16 13:11 Corrected drivermodel for i8042.c Pavel Machek
2003-11-16 20:20 ` Dmitry Torokhov [this message]
2003-11-17  8:51   ` Pavel Machek
2003-11-21  4:03     ` Dmitry Torokhov
     [not found] <SuZ0.4nW.7@gated-at.bofh.it>
2003-11-17 20:51 ` Karol Kozimor
2003-11-17 21:27   ` Pavel Machek

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=200311161520.03425.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=vojtech@ucw.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