Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65613
b: refs/heads/master
c: d59b66c
h: refs/heads/master
i:
  65611: 020fb2a
v: v3
  • Loading branch information
Pierre Ossman committed Sep 23, 2007
1 parent 967d0b7 commit dda9c13
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9eb3a94d022e6c233c0b22ec54516d35d2e87eb9
refs/heads/master: d59b66c7a575cfa8e01f483875d131e42b539bbc
21 changes: 20 additions & 1 deletion trunk/drivers/mmc/core/sdio_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,26 @@ static int
sdio_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf,
int buf_size)
{
envp[0] = NULL;
struct sdio_func *func = dev_to_sdio_func(dev);
int i = 0, length = 0;

if (add_uevent_var(envp, num_envp, &i,
buf, buf_size, &length,
"SDIO_CLASS=%02X", func->class))
return -ENOMEM;

if (add_uevent_var(envp, num_envp, &i,
buf, buf_size, &length,
"SDIO_ID=%04X:%04X", func->vendor, func->device))
return -ENOMEM;

if (add_uevent_var(envp, num_envp, &i,
buf, buf_size, &length,
"MODALIAS=sdio:c%02Xv%04Xd%04X",
func->class, func->vendor, func->device))
return -ENOMEM;

envp[i] = NULL;

return 0;
}
Expand Down
20 changes: 20 additions & 0 deletions trunk/scripts/mod/file2alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,22 @@ static int do_parisc_entry(const char *filename, struct parisc_device_id *id,
return 1;
}

/* Looks like: sdio:cNvNdN. */
static int do_sdio_entry(const char *filename,
struct sdio_device_id *id, char *alias)
{
id->class = TO_NATIVE(id->class);
id->vendor = TO_NATIVE(id->vendor);
id->device = TO_NATIVE(id->device);

strcpy(alias, "sdio:");
ADD(alias, "c", id->class != (__u8)SDIO_ANY_ID, id->class);
ADD(alias, "v", id->vendor != (__u16)SDIO_ANY_ID, id->vendor);
ADD(alias, "d", id->device != (__u16)SDIO_ANY_ID, id->device);

return 1;
}

/* Ignore any prefix, eg. v850 prepends _ */
static inline int sym_is(const char *symbol, const char *name)
{
Expand Down Expand Up @@ -599,6 +615,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
do_table(symval, sym->st_size,
sizeof(struct parisc_device_id), "parisc",
do_parisc_entry, mod);
else if (sym_is(symname, "__mod_sdio_device_table"))
do_table(symval, sym->st_size,
sizeof(struct sdio_device_id), "sdio",
do_sdio_entry, mod);
}

/* Now add out buffered information to the generated C source */
Expand Down

0 comments on commit dda9c13

Please sign in to comment.