linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Vojtech Pavlik <vojtech@suse.cz>
Subject: Re: [PATCH 2/2] Remove input_call_hotplug
Date: Wed, 19 Jan 2005 09:44:20 -0500	[thread overview]
Message-ID: <d120d500050119064461d21d80@mail.gmail.com> (raw)
In-Reply-To: <41EE6BA8.6020705@suse.de>

On Wed, 19 Jan 2005 15:16:08 +0100, Hannes Reinecke <hare@suse.de> wrote:
> Dmitry Torokhov wrote:
> > Hi Hannes,
> >
> > On Wed, 19 Jan 2005 10:59:30 +0100, Hannes Reinecke <hare@suse.de> wrote:
> >
> >>Dmitry Torokhov wrote:
> >>
> >>>But the real question is whether we really need class devices have
> >>>unique names or we could do with inputX thus leaving individual
> >>>drivers intact and only modifying the input core. As far as I
> >>>understand userspace should be concerned only with device
> >>>capabilities, not particular name, besides, it gets PRODUCT string
> >>>which has all needed data encoded.
> >>>
> >>
> >>Indeed. What about using 'phys' (with all '/' replaced by '-') as the
> >>class_id? This way we'll retain compability with /proc/bus/input/devices
> >>and do not have to touch every single driver.
> >>
> >
> >
> > I want to kill phys at some point - we have topology information
> > already present in sysfs in much better form. Can we have a new
> > hotplug variable HWDEV= which is kobject_path(input_dev->dev). If
> > input_dev is not set then we can just dump phys in it. And the class
> > id will still be inputX. Will this work?
> >  
> Sure. And we don't need a special HWDEV variable, as there is already a
> PHYSDEVPATH variable providing exactly this information.

Oh right! Even better.

> I'm not too happy about this 'inputX' thing (as this doesn't carry any
> information, whereas 'phys' gives you at least a rough guess what this
> device's about), but if phys is to go it would be the logical choice.
> 

The problem with encoding phys in class ID is the following: you have
to guarantee that the moment you destroy underlying hw device yur
input_device has to be gone too. Imagine you have input_device for
your PS/2 mouse and you decide to unload psmouse module. You also have
one of user processes holding any of the class device attributes open.
This causes input_device to be pinned into memory so when you load
psmouse module back again it will not be able to create new
input_device and mouse will be dead. With monotonicaly increasing
inputX name you will never have this issue.

You had a workaround for this problem with your original path but when
you fold it all in core you lost it.

-- 
Dmitry

  reply	other threads:[~2005-01-19 14:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-18 14:59 [PATCH 2/2] Remove input_call_hotplug Hannes Reinecke
2005-01-18 15:56 ` Dmitry Torokhov
2005-01-19  9:59   ` Hannes Reinecke
2005-01-19 14:05     ` Dmitry Torokhov
2005-01-19 14:16       ` Hannes Reinecke
2005-01-19 14:44         ` Dmitry Torokhov [this message]
2005-01-19 14:56           ` Hannes Reinecke
2005-01-19 15:49             ` Vojtech Pavlik
2005-01-19 15:50               ` Hannes Reinecke
2005-01-19 16:53                 ` 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=d120d500050119064461d21d80@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=dtor_core@ameritech.net \
    --cc=hare@suse.de \
    --cc=linux-kernel@vger.kernel.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).