From: Adam Belay <ambx1@neo.rr.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PnP Updates for 2.6.2-rc2
Date: Thu, 29 Jan 2004 23:59:51 +0000 [thread overview]
Message-ID: <20040129235951.GG12308@neo.rr.com> (raw)
In-Reply-To: <20040129235304.GA12308@neo.rr.com>
This patch updates file2alias.c to support pnp ids. It is from Takashi Iwai
<tiwai@suse.de>.
--- a/scripts/file2alias.c 2004-01-09 06:59:33.000000000 +0000
+++ b/scripts/file2alias.c 2004-01-29 20:34:35.000000000 +0000
@@ -176,6 +176,29 @@
return 1;
}
+/* looks like: "pnp:dD" */
+static int do_pnp_entry(const char *filename,
+ struct pnp_device_id *id, char *alias)
+{
+ sprintf(alias, "pnp:d%s", id->id);
+ return 1;
+}
+
+/* looks like: "pnp:cCdD..." */
+static int do_pnp_card_entry(const char *filename,
+ struct pnp_card_device_id *id, char *alias)
+{
+ int i;
+
+ sprintf(alias, "pnp:c%s", id->id);
+ for (i = 0; i < PNP_MAX_DEVICES; i++) {
+ if (! *id->devs[i].id)
+ break;
+ sprintf(alias + strlen(alias), "d%s", id->devs[i].id);
+ }
+ return 1;
+}
+
/* Ignore any prefix, eg. v850 prepends _ */
static inline int sym_is(const char *symbol, const char *name)
{
@@ -242,6 +265,12 @@
else if (sym_is(symname, "__mod_ccw_device_table"))
do_table(symval, sym->st_size, sizeof(struct ccw_device_id),
do_ccw_entry, mod);
+ else if (sym_is(symname, "__mod_pnp_device_table"))
+ do_table(symval, sym->st_size, sizeof(struct pnp_device_id),
+ do_pnp_entry, mod);
+ else if (sym_is(symname, "__mod_pnp_card_device_table"))
+ do_table(symval, sym->st_size, sizeof(struct pnp_card_device_id),
+ do_pnp_card_entry, mod);
}
/* Now add out buffered information to the generated C source */
next prev parent reply other threads:[~2004-01-30 5:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-29 23:53 [PATCH] PnP Updates for 2.6.2-rc2 Adam Belay
2004-01-29 23:55 ` Adam Belay
2004-01-29 23:56 ` Adam Belay
2004-01-29 23:57 ` Adam Belay
2004-01-29 23:57 ` Adam Belay
2004-01-29 23:59 ` Adam Belay
2004-01-29 23:59 ` Adam Belay [this message]
2004-01-30 0:00 ` Adam Belay
2004-01-30 0:01 ` Adam Belay
2004-01-30 0:02 ` Adam Belay
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=20040129235951.GG12308@neo.rr.com \
--to=ambx1@neo.rr.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@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.