diff options
Diffstat (limited to 'drivers/mmc')
| -rw-r--r-- | drivers/mmc/core/bus.c | 21 | ||||
| -rw-r--r-- | drivers/mmc/core/host.c | 2 | ||||
| -rw-r--r-- | drivers/mmc/core/sdio_bus.c | 15 | ||||
| -rw-r--r-- | drivers/mmc/host/mmc_spi.c | 2 | 
4 files changed, 13 insertions, 27 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 8d6f6014870f..b0c22cad9423 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c  | |||
| @@ -58,12 +58,11 @@ static int mmc_bus_match(struct device *dev, struct device_driver *drv) | |||
| 58 | } | 58 | } | 
| 59 | 59 | ||
| 60 | static int | 60 | static int | 
| 61 | mmc_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf, | 61 | mmc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) | 
| 62 | int buf_size) | ||
| 63 | { | 62 | { | 
| 64 | struct mmc_card *card = dev_to_mmc_card(dev); | 63 | struct mmc_card *card = dev_to_mmc_card(dev); | 
| 65 | const char *type; | 64 | const char *type; | 
| 66 | int i = 0, length = 0; | 65 | int retval = 0; | 
| 67 | 66 | ||
| 68 | switch (card->type) { | 67 | switch (card->type) { | 
| 69 | case MMC_TYPE_MMC: | 68 | case MMC_TYPE_MMC: | 
| @@ -80,20 +79,14 @@ mmc_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf, | |||
| 80 | } | 79 | } | 
| 81 | 80 | ||
| 82 | if (type) { | 81 | if (type) { | 
| 83 | if (add_uevent_var(envp, num_envp, &i, | 82 | retval = add_uevent_var(env, "MMC_TYPE=%s", type); | 
| 84 | buf, buf_size, &length, | 83 | if (retval) | 
| 85 | "MMC_TYPE=%s", type)) | 84 | return retval; | 
| 86 | return -ENOMEM; | ||
| 87 | } | 85 | } | 
| 88 | 86 | ||
| 89 | if (add_uevent_var(envp, num_envp, &i, | 87 | retval = add_uevent_var(env, "MMC_NAME=%s", mmc_card_name(card)); | 
| 90 | buf, buf_size, &length, | ||
| 91 | "MMC_NAME=%s", mmc_card_name(card))) | ||
| 92 | return -ENOMEM; | ||
| 93 | 88 | ||
| 94 | envp[i] = NULL; | 89 | return retval; | 
| 95 | |||
| 96 | return 0; | ||
| 97 | } | 90 | } | 
| 98 | 91 | ||
| 99 | static int mmc_bus_probe(struct device *dev) | 92 | static int mmc_bus_probe(struct device *dev) | 
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 64fbc9759a30..c65d203a846d 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c  | |||
| @@ -143,7 +143,7 @@ void mmc_remove_host(struct mmc_host *host) | |||
| 143 | 143 | ||
| 144 | device_del(&host->class_dev); | 144 | device_del(&host->class_dev); | 
| 145 | 145 | ||
| 146 | led_trigger_unregister(host->led); | 146 | led_trigger_unregister_simple(host->led); | 
| 147 | 147 | ||
| 148 | spin_lock(&mmc_host_lock); | 148 | spin_lock(&mmc_host_lock); | 
| 149 | idr_remove(&mmc_host_idr, host->index); | 149 | idr_remove(&mmc_host_idr, host->index); | 
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index 0713a8c71e54..233d0f9b3c4b 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c  | |||
| @@ -96,30 +96,23 @@ static int sdio_bus_match(struct device *dev, struct device_driver *drv) | |||
| 96 | } | 96 | } | 
| 97 | 97 | ||
| 98 | static int | 98 | static int | 
| 99 | sdio_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf, | 99 | sdio_bus_uevent(struct device *dev, struct kobj_uevent_env *env) | 
| 100 | int buf_size) | ||
| 101 | { | 100 | { | 
| 102 | struct sdio_func *func = dev_to_sdio_func(dev); | 101 | struct sdio_func *func = dev_to_sdio_func(dev); | 
| 103 | int i = 0, length = 0; | ||
| 104 | 102 | ||
| 105 | if (add_uevent_var(envp, num_envp, &i, | 103 | if (add_uevent_var(env, | 
| 106 | buf, buf_size, &length, | ||
| 107 | "SDIO_CLASS=%02X", func->class)) | 104 | "SDIO_CLASS=%02X", func->class)) | 
| 108 | return -ENOMEM; | 105 | return -ENOMEM; | 
| 109 | 106 | ||
| 110 | if (add_uevent_var(envp, num_envp, &i, | 107 | if (add_uevent_var(env, | 
| 111 | buf, buf_size, &length, | ||
| 112 | "SDIO_ID=%04X:%04X", func->vendor, func->device)) | 108 | "SDIO_ID=%04X:%04X", func->vendor, func->device)) | 
| 113 | return -ENOMEM; | 109 | return -ENOMEM; | 
| 114 | 110 | ||
| 115 | if (add_uevent_var(envp, num_envp, &i, | 111 | if (add_uevent_var(env, | 
| 116 | buf, buf_size, &length, | ||
| 117 | "MODALIAS=sdio:c%02Xv%04Xd%04X", | 112 | "MODALIAS=sdio:c%02Xv%04Xd%04X", | 
| 118 | func->class, func->vendor, func->device)) | 113 | func->class, func->vendor, func->device)) | 
| 119 | return -ENOMEM; | 114 | return -ENOMEM; | 
| 120 | 115 | ||
| 121 | envp[i] = NULL; | ||
| 122 | |||
| 123 | return 0; | 116 | return 0; | 
| 124 | } | 117 | } | 
| 125 | 118 | ||
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index f30327bba6f6..254b194e7625 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c  | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | */ | 26 | */ | 
| 27 | #include <linux/hrtimer.h> | 27 | #include <linux/hrtimer.h> | 
| 28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> | 
| 29 | #include <linux/blkdev.h> | 29 | #include <linux/bio.h> | 
| 30 | #include <linux/dma-mapping.h> | 30 | #include <linux/dma-mapping.h> | 
| 31 | #include <linux/crc7.h> | 31 | #include <linux/crc7.h> | 
| 32 | #include <linux/crc-itu-t.h> | 32 | #include <linux/crc-itu-t.h> | 
