lkml.org 
[lkml]   [2005]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Input sysbsystema and hotplug
Date
On Tuesday 14 June 2005 12:47 am, Hannes Reinecke wrote:
>
> Because there are _two_ events with the name 'input'.
> Both run under the same name but carry different information.
> One is required to load the module and the other is required to create
> the device node.
>
> That's what I call an abomination.

Or at least messy, though it's been true forever that all the
event classes have included multiple events. USB hotplug has
aided both "interface" and "device" driver match policies since
before 2.4.0, for example. I guess "input" has seemed simpler,
partially because it started later and slimmer.


Maybe starting with the next kernel or so, distros should be
starting to avoid these issues by converting to slim versions
of the /sbin/hotplug script, handling the two steps separately.

First the driver loading ... for USB, PCI/Cardbus, and PCMCIA
this usually suffices:

if [ "$ACTION" = "add" -a -n "$MODALIAS" -a ! -L $DEVPATH/driver ]
then
modprobe -q $MODALIAS
fi

Then (otherwise?) the device node creation

if [ -n "$DEVPATH" ]
then
/sbin/udevsend $1
fi

And don't have any /etc/hotplug or /etc/hotplug.d scripts.
(There'd still need to be an /etc/init.d/coldplug to make
up for hotplug events that preceded viable userspace.)

One problem with that is that not all subsystems yet support
the new $MODALIAS (and /sys/devices/.../modalias) stuff, and
of course "input" is one subsystem that doesn't.

That support shifts the "what module to load" logic from
hotplug scripts (slow and no-longer-appropriate) over to
module-init-tools (3.2 and newer for the PCMCIA support).

- Dave

-
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-06-19 16:50    [W:0.077 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site