diff options
author | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:22:22 -0600 |
---|---|---|
committer | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:22:22 -0600 |
commit | c70c242dc8726a3e48805dda08624251f41353ad (patch) | |
tree | fb127b6399d3fcf9ef53253129aba7def81090d2 /scripts | |
parent | 7eeec8642b84086fcff550f1d1d8f24a55ad5fc3 (diff) |
Community MMC/SD/SDIO support from Pierre Ossman's tree
Patch to add Community MMC/SD/SDIO support from Pierre Ossman's tree
git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc.git
Author: Pierre Ossman
Snapshot taken 20070910, and applied to linux 2.6.22.6 by Quinn Jensen.
Portions Copyright Pierre Ossman and Monta Vista.
http://www.bitshrine.org/gpp/linux-2.6.22-mx-Community-MMC-SD-SDIO-support-from-Pierre-.patch
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/file2alias.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index f646381dc015..fffedc5b1bc1 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -476,6 +476,22 @@ static int do_parisc_entry(const char *filename, struct parisc_device_id *id, return 1; } +/* Looks like: sdio:cNvNdN. */ +static int do_sdio_entry(const char *filename, + struct sdio_device_id *id, char *alias) +{ + id->class = TO_NATIVE(id->class); + id->vendor = TO_NATIVE(id->vendor); + id->device = TO_NATIVE(id->device); + + strcpy(alias, "sdio:"); + ADD(alias, "c", id->class != (__u8)SDIO_ANY_ID, id->class); + ADD(alias, "v", id->vendor != (__u16)SDIO_ANY_ID, id->vendor); + ADD(alias, "d", id->device != (__u16)SDIO_ANY_ID, id->device); + + return 1; +} + /* Ignore any prefix, eg. v850 prepends _ */ static inline int sym_is(const char *symbol, const char *name) { @@ -587,6 +603,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, do_table(symval, sym->st_size, sizeof(struct parisc_device_id), "parisc", do_parisc_entry, mod); + else if (sym_is(symname, "__mod_sdio_device_table")) + do_table(symval, sym->st_size, + sizeof(struct sdio_device_id), "sdio", + do_sdio_entry, mod); } /* Now add out buffered information to the generated C source */ |