From: Roman Kagan <rkagan@mail.ru>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] drivers/usb/core/usb.c: add MODNAME env var to hotplug
Date: Fri, 04 Mar 2005 10:01:58 +0000 [thread overview]
Message-ID: <20050304100158.GB2219@katya> (raw)
Hi,
The patch below adds MODNAME environment variable to usb hotplug
callout, allowing for its straightforward use with modprobe.
The patch expects a matching change in scripts/mod/file2alias.c I sent
to linux-hotplug-devel list a few days ago (i.e. puts
bcdDevice in MODNAME as dXXXX, rather that dlXXXXdhXXXX).
Please consider applying.
Roman.
Signed-off-by: Roman Kagan <rkagan@mail.ru>
drivers/usb/core/usb.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+)
--- linux-2.6.11/drivers/usb/core/usb.c.modname 2005-03-02 10:38:09.000000000 +0300
+++ linux-2.6.11/drivers/usb/core/usb.c 2005-03-04 12:43:21.000000000 +0300
@@ -615,7 +615,32 @@
alt->desc.bInterfaceSubClass,
alt->desc.bInterfaceProtocol))
return -ENOMEM;
+
+ if (add_hotplug_env_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "MODNAME=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X",
+ le16_to_cpu(usb_dev->descriptor.idVendor),
+ le16_to_cpu(usb_dev->descriptor.idProduct),
+ le16_to_cpu(usb_dev->descriptor.bcdDevice),
+ usb_dev->descriptor.bDeviceClass,
+ usb_dev->descriptor.bDeviceSubClass,
+ usb_dev->descriptor.bDeviceProtocol,
+ alt->desc.bInterfaceClass,
+ alt->desc.bInterfaceSubClass,
+ alt->desc.bInterfaceProtocol))
+ return -ENOMEM;
}
+ else
+ if (add_hotplug_env_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "MODNAME=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic*isc*ip*",
+ le16_to_cpu(usb_dev->descriptor.idVendor),
+ le16_to_cpu(usb_dev->descriptor.idProduct),
+ le16_to_cpu(usb_dev->descriptor.bcdDevice),
+ usb_dev->descriptor.bDeviceClass,
+ usb_dev->descriptor.bDeviceSubClass,
+ usb_dev->descriptor.bDeviceProtocol))
+ return -ENOMEM;
envp[i] = NULL;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next reply other threads:[~2005-03-04 10:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-04 10:01 Roman Kagan [this message]
2005-03-24 22:34 ` [PATCH] drivers/usb/core/usb.c: add MODNAME env var to hotplug Greg KH
2005-03-25 7:43 ` Roman Kagan
2005-03-25 17:40 ` Greg KH
2005-03-26 19:54 ` [linux-usb-devel] Re: [PATCH] drivers/usb/core/usb.c: add MODNAME Michael Tokarev
2005-03-27 20:36 ` [linux-usb-devel] Re: [PATCH] drivers/usb/core/usb.c: add MODNAME env var to hotplug Roman Kagan
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=20050304100158.GB2219@katya \
--to=rkagan@mail.ru \
--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.