25 Jul 2012 10:06
[PATCH RESEND] mmc: core: Remove bounce buffer in mmc_send_cxd_data()
Kyungsik Lee <kyungsik.lee <at> lge.com>
2012-07-25 08:06:18 GMT
2012-07-25 08:06:18 GMT
It is expected that Extended CSD register(the size of this register
is larger than CID/CSD) will be referenced more frequently as more
fields have been added to Extended CSD and it seems that it is not
a good option to double the memory used.
This patch is intended to avoid the use of bounce buffer for reading
Extended CSD register in mmc_send_cxd_data().
Signed-off-by: Kyungsik Lee <kyungsik.lee <at> lge.com>
---
drivers/mmc/core/mmc_ops.c | 45 ++++++++++++++++++++++++++++---------------
1 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 0ed2cc5..95d94a0 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
<at> <at> -238,14 +238,6 <at> <at> mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host,
struct mmc_command cmd = {0};
struct mmc_data data = {0};
struct scatterlist sg;
- void *data_buf;
-
- /* dma onto stack is unsafe/nonportable, but callers to this
- * routine normally provide temporary on-stack buffers ...
- */
- data_buf = kmalloc(len, GFP_KERNEL);
- if (data_buf == NULL)
- return -ENOMEM;
(Continue reading)
RSS Feed