mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: i2c@lm-sensors.org
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: i2c module aliases
Date: Wed, 6 Jun 2007 23:32:38 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0706062325270.30244@anakin> (raw)

>From browsing through file2alias.c, I have the impression there's a
missing TO_NATIVE() conversion in the handling of 16-bit (hence,
endian-affected) i2c IDs.
This will cause the module aliases to be incorrect when cross-compiling
for a system with a different endianness.  Is that correct?
If yes, the patch below adds the missing conversion.

Of course, no driver seems to use `MODULE_DEVICE_TABLE(i2c, ...)' yet,
hence nobody noticed.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -390,6 +390,7 @@ static int do_vio_entry(const char *file
 
 static int do_i2c_entry(const char *filename, struct i2c_device_id *i2c, char *alias)
 {
+	i2c->id = TO_NATIVE(i2c->id);
 	strcpy(alias, "i2c:");
 	ADD(alias, "id", 1, i2c->id);
 	return 1;

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

             reply	other threads:[~2007-06-06 21:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06 21:32 Geert Uytterhoeven [this message]
2007-06-07 15:53 ` [i2c] " Jean Delvare
2007-06-07 16:02   ` Greg KH
2007-06-08 13:35     ` Jean Delvare
2007-06-08 14:48       ` Geert Uytterhoeven
2007-06-09 10:52         ` Jean Delvare
2007-06-14 19:14           ` Greg KH
2007-06-15 17:52             ` Jean Delvare

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=Pine.LNX.4.64.0706062325270.30244@anakin \
    --to=geert@linux-m68k.org \
    --cc=i2c@lm-sensors.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

all inboxes | Powered by JetHome®