From: Andrew Morton Signed-off-by: Andrew Morton --- drivers/mmc/core/bus.c | 26 +++++++++++++++----------- include/linux/mmc/sdio.h | 8 -------- scripts/mod/file2alias.c | 4 ++++ 3 files changed, 19 insertions(+), 19 deletions(-) diff -puN include/linux/mmc/sdio.h~git-mmc-fixup2 include/linux/mmc/sdio.h --- a/include/linux/mmc/sdio.h~git-mmc-fixup2 +++ a/include/linux/mmc/sdio.h @@ -41,21 +41,13 @@ /* SDIO status in R5 Type -<<<<<<< HEAD:include/linux/mmc/sdio.h - e : error bit -======= e : error bit ->>>>>>> c4ef1f58940c5b1a2ab03ed9f11cb98a97438309:include/linux/mmc/sdio.h s : status bit r : detected and set for the actual command response x : detected and set during command execution. the host must poll the card by sending status command in order to read these bits. Clear condition -<<<<<<< HEAD:include/linux/mmc/sdio.h - a : according to the card state -======= a : according to the card state ->>>>>>> c4ef1f58940c5b1a2ab03ed9f11cb98a97438309:include/linux/mmc/sdio.h b : always related to the previous command. Reception of a valid command will clear it (with a delay of one command) c : clear by read diff -puN drivers/mmc/core/bus.c~git-mmc-fixup2 drivers/mmc/core/bus.c --- a/drivers/mmc/core/bus.c~git-mmc-fixup2 +++ a/drivers/mmc/core/bus.c @@ -73,26 +73,30 @@ static int mmc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) { struct mmc_card *card = dev_to_mmc_card(dev); - int retval = 0; - -#define add_env(fmt,val) do { \ - retval = add_uevent_var(env, fmt, val); \ - if (retval) \ - return retval; \ -} while (0); + const char *type; + int i = 0, length = 0; switch (card->type) { case MMC_TYPE_MMC: - add_env("MMC_TYPE=%s", "MMC"); + type = "MMC"; break; case MMC_TYPE_SD: - add_env("MMC_TYPE=%s", "SD"); + type = "SD"; break; + case MMC_TYPE_SDIO: + type = "SDIO"; + break; + default: + type = NULL; } - add_env("MMC_NAME=%s", mmc_card_name(card)); + if (type) { + if (add_uevent_var(env, "MMC_TYPE=%s", type)) + return -ENOMEM; + } -#undef add_env + if (add_uevent_var(env, "MMC_NAME=%s", mmc_card_name(card))) + return -ENOMEM; return 0; } diff -puN scripts/mod/file2alias.c~git-mmc-fixup2 scripts/mod/file2alias.c --- a/scripts/mod/file2alias.c~git-mmc-fixup2 +++ a/scripts/mod/file2alias.c @@ -629,6 +629,10 @@ void handle_moddevtable(struct module *m 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); free(zeros); } _