···11/*22 * Device tables which are exported to userspace via33- * scripts/table2alias.c. You must keep that file in sync with this33+ * scripts/mod/file2alias.c. You must keep that file in sync with this44 * header.55 */66···190190#endif191191};192192193193+/* VIO */194194+struct vio_device_id {195195+ char type[32];196196+ char compat[32];197197+};193198194199/* PCMCIA */195200
+19
scripts/mod/file2alias.c
···341341 return 1;342342}343343344344+static int do_vio_entry(const char *filename, struct vio_device_id *vio,345345+ char *alias)346346+{347347+ char *tmp;348348+349349+ sprintf(alias, "vio:T%sS%s", vio->type[0] ? vio->type : "*",350350+ vio->compat[0] ? vio->compat : "*");351351+352352+ /* Replace all whitespace with underscores */353353+ for (tmp = alias; tmp && *tmp; tmp++)354354+ if (isspace (*tmp))355355+ *tmp = '_';356356+357357+ return 1;358358+}359359+344360/* Ignore any prefix, eg. v850 prepends _ */345361static inline int sym_is(const char *symbol, const char *name)346362{···438422 else if (sym_is(symname, "__mod_of_device_table"))439423 do_table(symval, sym->st_size, sizeof(struct of_device_id),440424 do_of_entry, mod);425425+ else if (sym_is(symname, "__mod_vio_device_table"))426426+ do_table(symval, sym->st_size, sizeof(struct vio_device_id),427427+ do_vio_entry, mod);441428442429}443430