mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Kay Sievers <kay.sievers@vrfy.org>,
	Bryan Kadzban <bryan@kadzban.is-a-geek.net>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 2/5] PNP: fix broken pnp lowercasing for acpi module aliases
Date: Tue, 20 Jan 2009 21:19:54 -0800	[thread overview]
Message-ID: <1232515197-3974-2-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20090121051855.GA3665@kroah.com>

From: Kay Sievers <kay.sievers@vrfy.org>

Based on a patch from Brian, who identified the issue.

Signed-off-by: Bryan Kadzban <bryan@kadzban.is-a-geek.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 scripts/mod/file2alias.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index d4dc222..491b8b1 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -366,11 +366,17 @@ static void do_pnp_device_entry(void *symval, unsigned long size,
 
 	for (i = 0; i < count; i++) {
 		const char *id = (char *)devs[i].id;
+		char acpi_id[sizeof(devs[0].id)];
+		int j;
 
 		buf_printf(&mod->dev_table_buf,
 			   "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
+
+		/* fix broken pnp bus lowercasing */
+		for (j = 0; j < sizeof(acpi_id); j++)
+			acpi_id[j] = toupper(id[j]);
 		buf_printf(&mod->dev_table_buf,
-			   "MODULE_ALIAS(\"acpi*:%s:*\");\n", id);
+			   "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id);
 	}
 }
 
@@ -416,10 +422,17 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
 
 			/* add an individual alias for every device entry */
 			if (!dup) {
+				char acpi_id[sizeof(card->devs[0].id)];
+				int k;
+
 				buf_printf(&mod->dev_table_buf,
 					   "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
+
+				/* fix broken pnp bus lowercasing */
+				for (k = 0; k < sizeof(acpi_id); k++)
+					acpi_id[k] = toupper(id[k]);
 				buf_printf(&mod->dev_table_buf,
-					   "MODULE_ALIAS(\"acpi*:%s:*\");\n", id);
+					   "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id);
 			}
 		}
 	}
-- 
1.6.0.4


  parent reply	other threads:[~2009-01-21  5:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21  5:18 [GIT PATCH] driver core fixes for your 2.6-git tree Greg KH
2009-01-21  5:19 ` [PATCH 1/5] driver core: Convert '/' to '!' in dev_set_name() Greg Kroah-Hartman
2009-01-21  5:19 ` Greg Kroah-Hartman [this message]
2009-01-21  5:19 ` [PATCH 3/5] sysfs: fix problems with binary files Greg Kroah-Hartman
2009-01-21  5:19 ` [PATCH 4/5] debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n Greg Kroah-Hartman
2009-01-22  6:41   ` Stephen Rothwell
2009-01-22 18:22     ` Greg KH
2009-01-22 19:53       ` Inaky Perez-Gonzalez
2009-01-21  5:19 ` [PATCH 5/5] klist.c: bit 0 in pointer can't be used as flag Greg Kroah-Hartman

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=1232515197-3974-2-git-send-email-gregkh@suse.de \
    --to=gregkh@suse.de \
    --cc=bryan@kadzban.is-a-geek.net \
    --cc=kay.sievers@vrfy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome