mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
m68k: amiga - Zorro bus modalias support
Add Amiga Zorro bus modalias and uevent support Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
0b7f1a7efb
commit
bf54a2b3c0
12 changed files with 66 additions and 12 deletions
|
@ -796,6 +796,16 @@ static int do_platform_entry(const char *filename,
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Looks like: zorro:iN. */
|
||||
static int do_zorro_entry(const char *filename, struct zorro_device_id *id,
|
||||
char *alias)
|
||||
{
|
||||
id->id = TO_NATIVE(id->id);
|
||||
strcpy(alias, "zorro:");
|
||||
ADD(alias, "i", id->id != ZORRO_WILDCARD, id->id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Ignore any prefix, eg. some architectures prepend _ */
|
||||
static inline int sym_is(const char *symbol, const char *name)
|
||||
{
|
||||
|
@ -943,6 +953,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
|
|||
do_table(symval, sym->st_size,
|
||||
sizeof(struct platform_device_id), "platform",
|
||||
do_platform_entry, mod);
|
||||
else if (sym_is(symname, "__mod_zorro_device_table"))
|
||||
do_table(symval, sym->st_size,
|
||||
sizeof(struct zorro_device_id), "zorro",
|
||||
do_zorro_entry, mod);
|
||||
free(zeros);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue