From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: Ben Backx <ben@bbackx.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] ieee1394: prevent device binding of raw1394, video1394, dv1394
Date: Mon, 18 Feb 2008 21:11:07 +0100 (CET) [thread overview]
Message-ID: <tkrat.5595a80fa6bc4dfa@s5r6.in-berlin.de> (raw)
In-Reply-To: <47B9DD08.5000206@s5r6.in-berlin.de>
These drivers don't need to match any unit_directory type device.
They just need the id_table for module autoloading per module alias.
Not binding any of these drivers allows special-purpose drivers with
similar or same IDs to bind to devices. This currently only benefits
out-of-tree drivers; on the other hand it is in no way detrimental to
in-tree drivers.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/ieee1394/dv1394.c | 3 +--
drivers/ieee1394/nodemgr.c | 6 +++++-
drivers/ieee1394/raw1394.c | 1 -
drivers/ieee1394/video1394.c | 3 +--
4 files changed, 7 insertions(+), 6 deletions(-)
Index: linux-2.6.25-rc2/drivers/ieee1394/raw1394.c
===================================================================
--- linux-2.6.25-rc2.orig/drivers/ieee1394/raw1394.c
+++ linux-2.6.25-rc2/drivers/ieee1394/raw1394.c
@@ -2959,7 +2959,6 @@ MODULE_DEVICE_TABLE(ieee1394, raw1394_id
static struct hpsb_protocol_driver raw1394_driver = {
.name = "raw1394",
- .id_table = raw1394_id_table,
};
/******************************************************************************/
Index: linux-2.6.25-rc2/drivers/ieee1394/video1394.c
===================================================================
--- linux-2.6.25-rc2.orig/drivers/ieee1394/video1394.c
+++ linux-2.6.25-rc2/drivers/ieee1394/video1394.c
@@ -1315,8 +1315,7 @@ static struct ieee1394_device_id video13
MODULE_DEVICE_TABLE(ieee1394, video1394_id_table);
static struct hpsb_protocol_driver video1394_driver = {
- .name = VIDEO1394_DRIVER_NAME,
- .id_table = video1394_id_table,
+ .name = VIDEO1394_DRIVER_NAME,
};
Index: linux-2.6.25-rc2/drivers/ieee1394/dv1394.c
===================================================================
--- linux-2.6.25-rc2.orig/drivers/ieee1394/dv1394.c
+++ linux-2.6.25-rc2/drivers/ieee1394/dv1394.c
@@ -2179,8 +2179,7 @@ static struct ieee1394_device_id dv1394_
MODULE_DEVICE_TABLE(ieee1394, dv1394_id_table);
static struct hpsb_protocol_driver dv1394_driver = {
- .name = "dv1394",
- .id_table = dv1394_id_table,
+ .name = "dv1394",
};
Index: linux-2.6.25-rc2/drivers/ieee1394/nodemgr.c
===================================================================
--- linux-2.6.25-rc2.orig/drivers/ieee1394/nodemgr.c
+++ linux-2.6.25-rc2/drivers/ieee1394/nodemgr.c
@@ -701,7 +701,11 @@ static int nodemgr_bus_match(struct devi
return 0;
driver = container_of(drv, struct hpsb_protocol_driver, driver);
- for (id = driver->id_table; id->match_flags != 0; id++) {
+ id = driver->id_table;
+ if (!id)
+ return 0;
+
+ for (; id->match_flags != 0; id++) {
if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) &&
id->vendor_id != ud->vendor_id)
continue;
--
Stefan Richter
-=====-==--- --=- =--=-
http://arcgraph.de/sr/
parent reply other threads:[~2008-02-18 20:11 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <47B9DD08.5000206@s5r6.in-berlin.de>]
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=tkrat.5595a80fa6bc4dfa@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=ben@bbackx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®