All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] rules: avoid reading DRIVER for devices without modalias
Date: Wed, 03 Jun 2009 14:51:33 +0000	[thread overview]
Message-ID: <4A268DF5.2030108@tuffmail.co.uk> (raw)

DRIVER requires a readlink() in sysfs.  The MODALIAS key is provided by
uevent and requires no additional read.  Test MODALIAS first.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>

diff --git a/rules/rules.d/80-drivers.rules b/rules/rules.d/80-drivers.rules
index 7e13e80..2b68ddc 100644
--- a/rules/rules.d/80-drivers.rules
+++ b/rules/rules.d/80-drivers.rules
@@ -2,7 +2,7 @@
 
 ACTION!="add", GOTO="drivers_end"
 
-DRIVER!="?*", ENV{MODALIAS}="?*", RUN{ignore_error}+="/sbin/modprobe -b $env{MODALIAS}"
+ENV{MODALIAS}="?*", DRIVER!="?*", RUN{ignore_error}+="/sbin/modprobe -b $env{MODALIAS}"
 SUBSYSTEM="tifm", ENV{TIFM_CARD_TYPE}="SD", RUN+="/sbin/modprobe -b tifm_sd"
 SUBSYSTEM="tifm", ENV{TIFM_CARD_TYPE}="MS", RUN+="/sbin/modprobe -b tifm_ms"
 SUBSYSTEM="memstick", RUN+="/sbin/modprobe -b --all ms_block mspro_block"


             reply	other threads:[~2009-06-03 14:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 14:51 Alan Jenkins [this message]
2009-06-03 19:54 ` [PATCH] rules: avoid reading DRIVER for devices without modalias Kay Sievers
2009-06-03 20:10 ` Alan Jenkins
2009-08-15 23:32 ` [PATCH] rules: avoid reading DRIVER for devices without Marco d'Itri
2009-08-16  8:46 ` [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
2009-08-16 10:51 ` [PATCH] rules: avoid reading DRIVER for devices without Marco d'Itri

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=4A268DF5.2030108@tuffmail.co.uk \
    --to=alan-jenkins@tuffmail.co.uk \
    --cc=linux-hotplug@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.