aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/file2alias.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 40e0045876ee..9d446e34519c 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,
657 return 1; 657 return 1;
658} 658}
659 659
660/* Looks like: S */
661static int do_spi_entry(const char *filename, struct spi_device_id *id,
662 char *alias)
663{
664 sprintf(alias, "%s", id->name);
665
666 return 1;
667}
668
660static const struct dmifield { 669static const struct dmifield {
661 const char *prefix; 670 const char *prefix;
662 int field; 671 int field;
@@ -853,6 +862,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
853 do_table(symval, sym->st_size, 862 do_table(symval, sym->st_size,
854 sizeof(struct i2c_device_id), "i2c", 863 sizeof(struct i2c_device_id), "i2c",
855 do_i2c_entry, mod); 864 do_i2c_entry, mod);
865 else if (sym_is(symname, "__mod_spi_device_table"))
866 do_table(symval, sym->st_size,
867 sizeof(struct spi_device_id), "spi",
868 do_spi_entry, mod);
856 else if (sym_is(symname, "__mod_dmi_device_table")) 869 else if (sym_is(symname, "__mod_dmi_device_table"))
857 do_table(symval, sym->st_size, 870 do_table(symval, sym->st_size,
858 sizeof(struct dmi_system_id), "dmi", 871 sizeof(struct dmi_system_id), "dmi",