summaryrefslogtreecommitdiff
path: root/drivers/media/common/siano/smsdvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-03-09 11:34:56 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 07:46:18 -0300
commit80ccb51a0f970ab0935a8be70b677ecbcdf74e3e (patch)
treecd3edecad8522016a7de2545d34468c09dc511ab /drivers/media/common/siano/smsdvb.c
parentfe802fd92d6abd1fce2ae8d03a073807d25e9453 (diff)
[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/common/siano/smsdvb.c')
-rw-r--r--drivers/media/common/siano/smsdvb.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/media/common/siano/smsdvb.c b/drivers/media/common/siano/smsdvb.c
index dbb807e3a212..6335574e9342 100644
--- a/drivers/media/common/siano/smsdvb.c
+++ b/drivers/media/common/siano/smsdvb.c
@@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dvb_frontend.h"
#include "smscoreapi.h"
-#include "smsendian.h"
#include "sms-cards.h"
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
@@ -324,8 +323,6 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
/*u32 MsgDataLen = phdr->msgLength - sizeof(struct SmsMsgHdr_ST);*/
bool is_status_update = false;
- smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr);
-
switch (phdr->msgType) {
case MSG_SMS_DVBT_BDA_DATA:
dvb_dmx_swfilter(&client->demux, (u8 *)(phdr + 1),
@@ -545,7 +542,6 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed)
PidMsg.xMsgHeader.msgLength = sizeof(PidMsg);
PidMsg.msgData[0] = feed->pid;
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg);
return smsclient_sendrequest(client->smsclient,
&PidMsg, sizeof(PidMsg));
}
@@ -566,7 +562,6 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed)
PidMsg.xMsgHeader.msgLength = sizeof(PidMsg);
PidMsg.msgData[0] = feed->pid;
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg);
return smsclient_sendrequest(client->smsclient,
&PidMsg, sizeof(PidMsg));
}
@@ -577,7 +572,6 @@ static int smsdvb_sendrequest_and_wait(struct smsdvb_client_t *client,
{
int rc;
- smsendian_handle_tx_message((struct SmsMsgHdr_ST *)buffer);
rc = smsclient_sendrequest(client->smsclient, buffer, size);
if (rc < 0)
return rc;
@@ -606,8 +600,6 @@ static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
else
Msg.msgType = MSG_SMS_GET_STATISTICS_REQ;
- smsendian_handle_tx_message((struct SmsMsgHdr_S *)&Msg);
-
rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
&client->stats_done);