diff options
| author | James Morris <jmorris@namei.org> | 2009-09-30 07:47:33 +1000 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2009-09-30 07:47:33 +1000 |
| commit | 1669b049db50fc7f1d4e694fb115a0f408c63fce (patch) | |
| tree | 9b3b90b5cbff9b8f30ecf0b2a44896ce8bef0c20 /scripts/mod/file2alias.c | |
| parent | 7f366784f5c2b8fc0658b5b374f4c63ee42c789f (diff) | |
| parent | 17d857be649a21ca90008c6dc425d849fa83db5c (diff) | |
Merge branch 'master' into next
Diffstat (limited to 'scripts/mod/file2alias.c')
| -rw-r--r-- | scripts/mod/file2alias.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 40e0045876e..62a9025cdcc 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -657,6 +657,15 @@ static int do_i2c_entry(const char *filename, struct i2c_device_id *id, return 1; } +/* Looks like: spi:S */ +static int do_spi_entry(const char *filename, struct spi_device_id *id, + char *alias) +{ + sprintf(alias, SPI_MODULE_PREFIX "%s", id->name); + + return 1; +} + static const struct dmifield { const char *prefix; int field; @@ -853,6 +862,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, do_table(symval, sym->st_size, sizeof(struct i2c_device_id), "i2c", do_i2c_entry, mod); + else if (sym_is(symname, "__mod_spi_device_table")) + do_table(symval, sym->st_size, + sizeof(struct spi_device_id), "spi", + do_spi_entry, mod); else if (sym_is(symname, "__mod_dmi_device_table")) do_table(symval, sym->st_size, sizeof(struct dmi_system_id), "dmi", |
