···1/*2 * Device tables which are exported to userspace via3- * scripts/table2alias.c. You must keep that file in sync with this4 * header.5 */6···190#endif191};19200000193194/* PCMCIA */195
···1/*2 * Device tables which are exported to userspace via3+ * scripts/mod/file2alias.c. You must keep that file in sync with this4 * header.5 */6···190#endif191};192193+/* VIO */194+struct vio_device_id {195+ char type[32];196+ char compat[32];197+};198199/* PCMCIA */200
+19
scripts/mod/file2alias.c
···341 return 1;342}3430000000000000000344/* Ignore any prefix, eg. v850 prepends _ */345static inline int sym_is(const char *symbol, const char *name)346{···438 else if (sym_is(symname, "__mod_of_device_table"))439 do_table(symval, sym->st_size, sizeof(struct of_device_id),440 do_of_entry, mod);000441442}443
···341 return 1;342}343344+static int do_vio_entry(const char *filename, struct vio_device_id *vio,345+ char *alias)346+{347+ char *tmp;348+349+ sprintf(alias, "vio:T%sS%s", vio->type[0] ? vio->type : "*",350+ vio->compat[0] ? vio->compat : "*");351+352+ /* Replace all whitespace with underscores */353+ for (tmp = alias; tmp && *tmp; tmp++)354+ if (isspace (*tmp))355+ *tmp = '_';356+357+ return 1;358+}359+360/* Ignore any prefix, eg. v850 prepends _ */361static inline int sym_is(const char *symbol, const char *name)362{···422 else if (sym_is(symname, "__mod_of_device_table"))423 do_table(symval, sym->st_size, sizeof(struct of_device_id),424 do_of_entry, mod);425+ else if (sym_is(symname, "__mod_vio_device_table"))426+ do_table(symval, sym->st_size, sizeof(struct vio_device_id),427+ do_vio_entry, mod);428429}430