diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-06-17 05:34:23 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-23 14:53:33 -0400 |
commit | d59b66c7a575cfa8e01f483875d131e42b539bbc (patch) | |
tree | ef038f24fff0e91d5d5a33cc99dbe4011b4c3afd /drivers/mmc | |
parent | 9eb3a94d022e6c233c0b22ec54516d35d2e87eb9 (diff) |
sdio: add modalias support
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/sdio_bus.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index a3a89e973d94..c834f5150888 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c | |||
@@ -68,7 +68,26 @@ static int | |||
68 | sdio_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf, | 68 | sdio_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf, |
69 | int buf_size) | 69 | int buf_size) |
70 | { | 70 | { |
71 | envp[0] = NULL; | 71 | struct sdio_func *func = dev_to_sdio_func(dev); |
72 | int i = 0, length = 0; | ||
73 | |||
74 | if (add_uevent_var(envp, num_envp, &i, | ||
75 | buf, buf_size, &length, | ||
76 | "SDIO_CLASS=%02X", func->class)) | ||
77 | return -ENOMEM; | ||
78 | |||
79 | if (add_uevent_var(envp, num_envp, &i, | ||
80 | buf, buf_size, &length, | ||
81 | "SDIO_ID=%04X:%04X", func->vendor, func->device)) | ||
82 | return -ENOMEM; | ||
83 | |||
84 | if (add_uevent_var(envp, num_envp, &i, | ||
85 | buf, buf_size, &length, | ||
86 | "MODALIAS=sdio:c%02Xv%04Xd%04X", | ||
87 | func->class, func->vendor, func->device)) | ||
88 | return -ENOMEM; | ||
89 | |||
90 | envp[i] = NULL; | ||
72 | 91 | ||
73 | return 0; | 92 | return 0; |
74 | } | 93 | } |