diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-09 15:34:56 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 11:46:18 +0100 |
commit | 80ccb51a0f970ab0935a8be70b677ecbcdf74e3e (patch) | |
tree | cd3edecad8522016a7de2545d34468c09dc511ab /drivers/media/mmc | |
parent | [media] siano: call MSG_SMS_INIT_DEVICE_REQ (diff) | |
download | linux-80ccb51a0f970ab0935a8be70b677ecbcdf74e3e.tar.xz linux-80ccb51a0f970ab0935a8be70b677ecbcdf74e3e.zip |
[media] siano: simplify message endianness logic
Currently, every time a message is sent or received, the endiannes
need to be fixed on big endian machines. This is currently done
on every call to the send API, and on every msg reception logic.
Instead of doing that, move it to the send/receive functions.
That simplifies the logic and avoids the risk of forgetting to
fix it somewhere.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/mmc')
-rw-r--r-- | drivers/media/mmc/siano/smssdio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/mmc/siano/smssdio.c b/drivers/media/mmc/siano/smssdio.c index c96da47bece5..8834c435acae 100644 --- a/drivers/media/mmc/siano/smssdio.c +++ b/drivers/media/mmc/siano/smssdio.c @@ -43,6 +43,7 @@ #include "smscoreapi.h" #include "sms-cards.h" +#include "smsendian.h" /* Registers */ @@ -97,6 +98,7 @@ static int smssdio_sendrequest(void *context, void *buffer, size_t size) sdio_claim_host(smsdev->func); + smsendian_handle_tx_message((struct SmsMsgData_ST *) buffer); while (size >= smsdev->func->cur_blksize) { ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA, buffer, smsdev->func->cur_blksize); @@ -231,6 +233,7 @@ static void smssdio_interrupt(struct sdio_func *func) cb->size = hdr->msgLength; cb->offset = 0; + smsendian_handle_rx_message((struct SmsMsgData_ST *) cb->p); smscore_onresponse(smsdev->coredev, cb); } |