aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 07:49:43 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 09:03:16 -0400
commitdfef84fc135832ad5c270758b6834fcb4bf448fc (patch)
treebcf5373af316c462196221b60072f02ea387b890 /drivers/media/common
parentc8b8fdb39dabef67307df884212401c20877d9d2 (diff)
[media] siano: get rid of CammelCase from smscoreapi.h
It is almost impossible to see a compliant with checkpatch.pl on those Siano drivers, as there are simply too much violations on it. So, now that a big change was done, the better is to cleanup the checkpatch compliants. Let's first replace all CammelCase symbols found at smscoreapi.h using camel_case namespace. That removed 144 checkpatch.pl compliants on this file. Of course, the other files need to be fixed accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/siano/sms-cards.c12
-rw-r--r--drivers/media/common/siano/smscoreapi.c336
-rw-r--r--drivers/media/common/siano/smscoreapi.h420
-rw-r--r--drivers/media/common/siano/smsdvb-debugfs.c230
-rw-r--r--drivers/media/common/siano/smsdvb-main.c250
-rw-r--r--drivers/media/common/siano/smsdvb.h32
-rw-r--r--drivers/media/common/siano/smsendian.c30
7 files changed, 655 insertions, 655 deletions
diff --git a/drivers/media/common/siano/sms-cards.c b/drivers/media/common/siano/sms-cards.c
index 6680134d2336..9bd7aa1f43ec 100644
--- a/drivers/media/common/siano/sms-cards.c
+++ b/drivers/media/common/siano/sms-cards.c
@@ -167,13 +167,13 @@ struct sms_board *sms_get_board(unsigned id)
167} 167}
168EXPORT_SYMBOL_GPL(sms_get_board); 168EXPORT_SYMBOL_GPL(sms_get_board);
169static inline void sms_gpio_assign_11xx_default_led_config( 169static inline void sms_gpio_assign_11xx_default_led_config(
170 struct smscore_config_gpio *pGpioConfig) { 170 struct smscore_config_gpio *p_gpio_config) {
171 pGpioConfig->direction = SMS_GPIO_DIRECTION_OUTPUT; 171 p_gpio_config->direction = SMS_GPIO_DIRECTION_OUTPUT;
172 pGpioConfig->inputcharacteristics = 172 p_gpio_config->inputcharacteristics =
173 SMS_GPIO_INPUTCHARACTERISTICS_NORMAL; 173 SMS_GPIO_INPUTCHARACTERISTICS_NORMAL;
174 pGpioConfig->outputdriving = SMS_GPIO_OUTPUTDRIVING_4mA; 174 p_gpio_config->outputdriving = SMS_GPIO_OUTPUTDRIVING_4mA;
175 pGpioConfig->outputslewrate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS; 175 p_gpio_config->outputslewrate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS;
176 pGpioConfig->pullupdown = SMS_GPIO_PULLUPDOWN_NONE; 176 p_gpio_config->pullupdown = SMS_GPIO_PULLUPDOWN_NONE;
177} 177}
178 178
179int sms_board_event(struct smscore_device_t *coredev, 179int sms_board_event(struct smscore_device_t *coredev,
diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c
index 5006d1ce2806..e5fa4056adb3 100644
--- a/drivers/media/common/siano/smscoreapi.c
+++ b/drivers/media/common/siano/smscoreapi.c
@@ -792,22 +792,22 @@ static int smscore_init_ir(struct smscore_device_t *coredev)
792 if (rc != 0) 792 if (rc != 0)
793 sms_err("Error initialization DTV IR sub-module"); 793 sms_err("Error initialization DTV IR sub-module");
794 else { 794 else {
795 buffer = kmalloc(sizeof(struct SmsMsgData_ST2) + 795 buffer = kmalloc(sizeof(struct sms_msg_data2) +
796 SMS_DMA_ALIGNMENT, 796 SMS_DMA_ALIGNMENT,
797 GFP_KERNEL | GFP_DMA); 797 GFP_KERNEL | GFP_DMA);
798 if (buffer) { 798 if (buffer) {
799 struct SmsMsgData_ST2 *msg = 799 struct sms_msg_data2 *msg =
800 (struct SmsMsgData_ST2 *) 800 (struct sms_msg_data2 *)
801 SMS_ALIGN_ADDRESS(buffer); 801 SMS_ALIGN_ADDRESS(buffer);
802 802
803 SMS_INIT_MSG(&msg->xMsgHeader, 803 SMS_INIT_MSG(&msg->x_msg_header,
804 MSG_SMS_START_IR_REQ, 804 MSG_SMS_START_IR_REQ,
805 sizeof(struct SmsMsgData_ST2)); 805 sizeof(struct sms_msg_data2));
806 msg->msgData[0] = coredev->ir.controller; 806 msg->msgData[0] = coredev->ir.controller;
807 msg->msgData[1] = coredev->ir.timeout; 807 msg->msgData[1] = coredev->ir.timeout;
808 808
809 rc = smscore_sendrequest_and_wait(coredev, msg, 809 rc = smscore_sendrequest_and_wait(coredev, msg,
810 msg->xMsgHeader. msgLength, 810 msg->x_msg_header. msg_length,
811 &coredev->ir_init_done); 811 &coredev->ir_init_done);
812 812
813 kfree(buffer); 813 kfree(buffer);
@@ -840,14 +840,14 @@ int smscore_configure_board(struct smscore_device_t *coredev)
840 } 840 }
841 841
842 if (board->mtu) { 842 if (board->mtu) {
843 struct SmsMsgData_ST MtuMsg; 843 struct sms_msg_data MtuMsg;
844 sms_debug("set max transmit unit %d", board->mtu); 844 sms_debug("set max transmit unit %d", board->mtu);
845 845
846 MtuMsg.xMsgHeader.msgSrcId = 0; 846 MtuMsg.x_msg_header.msg_src_id = 0;
847 MtuMsg.xMsgHeader.msgDstId = HIF_TASK; 847 MtuMsg.x_msg_header.msg_dst_id = HIF_TASK;
848 MtuMsg.xMsgHeader.msgFlags = 0; 848 MtuMsg.x_msg_header.msg_flags = 0;
849 MtuMsg.xMsgHeader.msgType = MSG_SMS_SET_MAX_TX_MSG_LEN_REQ; 849 MtuMsg.x_msg_header.msg_type = MSG_SMS_SET_MAX_TX_MSG_LEN_REQ;
850 MtuMsg.xMsgHeader.msgLength = sizeof(MtuMsg); 850 MtuMsg.x_msg_header.msg_length = sizeof(MtuMsg);
851 MtuMsg.msgData[0] = board->mtu; 851 MtuMsg.msgData[0] = board->mtu;
852 852
853 coredev->sendrequest_handler(coredev->context, &MtuMsg, 853 coredev->sendrequest_handler(coredev->context, &MtuMsg,
@@ -855,10 +855,10 @@ int smscore_configure_board(struct smscore_device_t *coredev)
855 } 855 }
856 856
857 if (board->crystal) { 857 if (board->crystal) {
858 struct SmsMsgData_ST CrysMsg; 858 struct sms_msg_data CrysMsg;
859 sms_debug("set crystal value %d", board->crystal); 859 sms_debug("set crystal value %d", board->crystal);
860 860
861 SMS_INIT_MSG(&CrysMsg.xMsgHeader, 861 SMS_INIT_MSG(&CrysMsg.x_msg_header,
862 MSG_SMS_NEW_CRYSTAL_REQ, 862 MSG_SMS_NEW_CRYSTAL_REQ,
863 sizeof(CrysMsg)); 863 sizeof(CrysMsg));
864 CrysMsg.msgData[0] = board->crystal; 864 CrysMsg.msgData[0] = board->crystal;
@@ -916,19 +916,19 @@ EXPORT_SYMBOL_GPL(smscore_start_device);
916static int smscore_load_firmware_family2(struct smscore_device_t *coredev, 916static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
917 void *buffer, size_t size) 917 void *buffer, size_t size)
918{ 918{
919 struct SmsFirmware_ST *firmware = (struct SmsFirmware_ST *) buffer; 919 struct sms_firmware *firmware = (struct sms_firmware *) buffer;
920 struct SmsMsgData_ST4 *msg; 920 struct sms_msg_data4 *msg;
921 u32 mem_address, calc_checksum = 0; 921 u32 mem_address, calc_checksum = 0;
922 u32 i, *ptr; 922 u32 i, *ptr;
923 u8 *payload = firmware->Payload; 923 u8 *payload = firmware->payload;
924 int rc = 0; 924 int rc = 0;
925 firmware->StartAddress = le32_to_cpu(firmware->StartAddress); 925 firmware->start_address = le32_to_cpu(firmware->start_address);
926 firmware->Length = le32_to_cpu(firmware->Length); 926 firmware->length = le32_to_cpu(firmware->length);
927 927
928 mem_address = firmware->StartAddress; 928 mem_address = firmware->start_address;
929 929
930 sms_info("loading FW to addr 0x%x size %d", 930 sms_info("loading FW to addr 0x%x size %d",
931 mem_address, firmware->Length); 931 mem_address, firmware->length);
932 if (coredev->preload_handler) { 932 if (coredev->preload_handler) {
933 rc = coredev->preload_handler(coredev->context); 933 rc = coredev->preload_handler(coredev->context);
934 if (rc < 0) 934 if (rc < 0)
@@ -942,10 +942,10 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
942 942
943 if (coredev->mode != DEVICE_MODE_NONE) { 943 if (coredev->mode != DEVICE_MODE_NONE) {
944 sms_debug("sending reload command."); 944 sms_debug("sending reload command.");
945 SMS_INIT_MSG(&msg->xMsgHeader, MSG_SW_RELOAD_START_REQ, 945 SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_START_REQ,
946 sizeof(struct SmsMsgHdr_ST)); 946 sizeof(struct sms_msg_hdr));
947 rc = smscore_sendrequest_and_wait(coredev, msg, 947 rc = smscore_sendrequest_and_wait(coredev, msg,
948 msg->xMsgHeader.msgLength, 948 msg->x_msg_header.msg_length,
949 &coredev->reload_start_done); 949 &coredev->reload_start_done);
950 if (rc < 0) { 950 if (rc < 0) {
951 sms_err("device reload failed, rc %d", rc); 951 sms_err("device reload failed, rc %d", rc);
@@ -954,24 +954,24 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
954 mem_address = *(u32 *) &payload[20]; 954 mem_address = *(u32 *) &payload[20];
955 } 955 }
956 956
957 for (i = 0, ptr = (u32 *)firmware->Payload; i < firmware->Length/4 ; 957 for (i = 0, ptr = (u32 *)firmware->payload; i < firmware->length/4 ;
958 i++, ptr++) 958 i++, ptr++)
959 calc_checksum += *ptr; 959 calc_checksum += *ptr;
960 960
961 while (size && rc >= 0) { 961 while (size && rc >= 0) {
962 struct SmsDataDownload_ST *DataMsg = 962 struct sms_data_download *DataMsg =
963 (struct SmsDataDownload_ST *) msg; 963 (struct sms_data_download *) msg;
964 int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE); 964 int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE);
965 965
966 SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_DATA_DOWNLOAD_REQ, 966 SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_DOWNLOAD_REQ,
967 (u16)(sizeof(struct SmsMsgHdr_ST) + 967 (u16)(sizeof(struct sms_msg_hdr) +
968 sizeof(u32) + payload_size)); 968 sizeof(u32) + payload_size));
969 969
970 DataMsg->MemAddr = mem_address; 970 DataMsg->mem_addr = mem_address;
971 memcpy(DataMsg->Payload, payload, payload_size); 971 memcpy(DataMsg->payload, payload, payload_size);
972 972
973 rc = smscore_sendrequest_and_wait(coredev, DataMsg, 973 rc = smscore_sendrequest_and_wait(coredev, DataMsg,
974 DataMsg->xMsgHeader.msgLength, 974 DataMsg->x_msg_header.msg_length,
975 &coredev->data_download_done); 975 &coredev->data_download_done);
976 976
977 payload += payload_size; 977 payload += payload_size;
@@ -984,30 +984,30 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
984 984
985 sms_err("sending MSG_SMS_DATA_VALIDITY_REQ expecting 0x%x", 985 sms_err("sending MSG_SMS_DATA_VALIDITY_REQ expecting 0x%x",
986 calc_checksum); 986 calc_checksum);
987 SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_DATA_VALIDITY_REQ, 987 SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_VALIDITY_REQ,
988 sizeof(msg->xMsgHeader) + 988 sizeof(msg->x_msg_header) +
989 sizeof(u32) * 3); 989 sizeof(u32) * 3);
990 msg->msgData[0] = firmware->StartAddress; 990 msg->msgData[0] = firmware->start_address;
991 /* Entry point */ 991 /* Entry point */
992 msg->msgData[1] = firmware->Length; 992 msg->msgData[1] = firmware->length;
993 msg->msgData[2] = 0; /* Regular checksum*/ 993 msg->msgData[2] = 0; /* Regular checksum*/
994 rc = smscore_sendrequest_and_wait(coredev, msg, 994 rc = smscore_sendrequest_and_wait(coredev, msg,
995 msg->xMsgHeader.msgLength, 995 msg->x_msg_header.msg_length,
996 &coredev->data_validity_done); 996 &coredev->data_validity_done);
997 if (rc < 0) 997 if (rc < 0)
998 goto exit_fw_download; 998 goto exit_fw_download;
999 999
1000 if (coredev->mode == DEVICE_MODE_NONE) { 1000 if (coredev->mode == DEVICE_MODE_NONE) {
1001 struct SmsMsgData_ST *TriggerMsg = 1001 struct sms_msg_data *TriggerMsg =
1002 (struct SmsMsgData_ST *) msg; 1002 (struct sms_msg_data *) msg;
1003 1003
1004 sms_debug("sending MSG_SMS_SWDOWNLOAD_TRIGGER_REQ"); 1004 sms_debug("sending MSG_SMS_SWDOWNLOAD_TRIGGER_REQ");
1005 SMS_INIT_MSG(&msg->xMsgHeader, 1005 SMS_INIT_MSG(&msg->x_msg_header,
1006 MSG_SMS_SWDOWNLOAD_TRIGGER_REQ, 1006 MSG_SMS_SWDOWNLOAD_TRIGGER_REQ,
1007 sizeof(struct SmsMsgHdr_ST) + 1007 sizeof(struct sms_msg_hdr) +
1008 sizeof(u32) * 5); 1008 sizeof(u32) * 5);
1009 1009
1010 TriggerMsg->msgData[0] = firmware->StartAddress; 1010 TriggerMsg->msgData[0] = firmware->start_address;
1011 /* Entry point */ 1011 /* Entry point */
1012 TriggerMsg->msgData[1] = 6; /* Priority */ 1012 TriggerMsg->msgData[1] = 6; /* Priority */
1013 TriggerMsg->msgData[2] = 0x200; /* Stack size */ 1013 TriggerMsg->msgData[2] = 0x200; /* Stack size */
@@ -1015,13 +1015,13 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
1015 TriggerMsg->msgData[4] = 4; /* Task ID */ 1015 TriggerMsg->msgData[4] = 4; /* Task ID */
1016 1016
1017 rc = smscore_sendrequest_and_wait(coredev, TriggerMsg, 1017 rc = smscore_sendrequest_and_wait(coredev, TriggerMsg,
1018 TriggerMsg->xMsgHeader.msgLength, 1018 TriggerMsg->x_msg_header.msg_length,
1019 &coredev->trigger_done); 1019 &coredev->trigger_done);
1020 } else { 1020 } else {
1021 SMS_INIT_MSG(&msg->xMsgHeader, MSG_SW_RELOAD_EXEC_REQ, 1021 SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_EXEC_REQ,
1022 sizeof(struct SmsMsgHdr_ST)); 1022 sizeof(struct sms_msg_hdr));
1023 rc = coredev->sendrequest_handler(coredev->context, msg, 1023 rc = coredev->sendrequest_handler(coredev->context, msg,
1024 msg->xMsgHeader.msgLength); 1024 msg->x_msg_header.msg_length);
1025 } 1025 }
1026 1026
1027 if (rc < 0) 1027 if (rc < 0)
@@ -1256,19 +1256,19 @@ EXPORT_SYMBOL_GPL(smscore_unregister_device);
1256 1256
1257static int smscore_detect_mode(struct smscore_device_t *coredev) 1257static int smscore_detect_mode(struct smscore_device_t *coredev)
1258{ 1258{
1259 void *buffer = kmalloc(sizeof(struct SmsMsgHdr_ST) + SMS_DMA_ALIGNMENT, 1259 void *buffer = kmalloc(sizeof(struct sms_msg_hdr) + SMS_DMA_ALIGNMENT,
1260 GFP_KERNEL | GFP_DMA); 1260 GFP_KERNEL | GFP_DMA);
1261 struct SmsMsgHdr_ST *msg = 1261 struct sms_msg_hdr *msg =
1262 (struct SmsMsgHdr_ST *) SMS_ALIGN_ADDRESS(buffer); 1262 (struct sms_msg_hdr *) SMS_ALIGN_ADDRESS(buffer);
1263 int rc; 1263 int rc;
1264 1264
1265 if (!buffer) 1265 if (!buffer)
1266 return -ENOMEM; 1266 return -ENOMEM;
1267 1267
1268 SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ, 1268 SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ,
1269 sizeof(struct SmsMsgHdr_ST)); 1269 sizeof(struct sms_msg_hdr));
1270 1270
1271 rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, 1271 rc = smscore_sendrequest_and_wait(coredev, msg, msg->msg_length,
1272 &coredev->version_ex_done); 1272 &coredev->version_ex_done);
1273 if (rc == -ETIME) { 1273 if (rc == -ETIME) {
1274 sms_err("MSG_SMS_GET_VERSION_EX_REQ failed first try"); 1274 sms_err("MSG_SMS_GET_VERSION_EX_REQ failed first try");
@@ -1276,7 +1276,7 @@ static int smscore_detect_mode(struct smscore_device_t *coredev)
1276 if (wait_for_completion_timeout(&coredev->resume_done, 1276 if (wait_for_completion_timeout(&coredev->resume_done,
1277 msecs_to_jiffies(5000))) { 1277 msecs_to_jiffies(5000))) {
1278 rc = smscore_sendrequest_and_wait( 1278 rc = smscore_sendrequest_and_wait(
1279 coredev, msg, msg->msgLength, 1279 coredev, msg, msg->msg_length,
1280 &coredev->version_ex_done); 1280 &coredev->version_ex_done);
1281 if (rc < 0) 1281 if (rc < 0)
1282 sms_err("MSG_SMS_GET_VERSION_EX_REQ failed " 1282 sms_err("MSG_SMS_GET_VERSION_EX_REQ failed "
@@ -1302,23 +1302,23 @@ static int smscore_detect_mode(struct smscore_device_t *coredev)
1302int smscore_init_device(struct smscore_device_t *coredev, int mode) 1302int smscore_init_device(struct smscore_device_t *coredev, int mode)
1303{ 1303{
1304 void *buffer; 1304 void *buffer;
1305 struct SmsMsgData_ST *msg; 1305 struct sms_msg_data *msg;
1306 int rc = 0; 1306 int rc = 0;
1307 1307
1308 buffer = kmalloc(sizeof(struct SmsMsgData_ST) + 1308 buffer = kmalloc(sizeof(struct sms_msg_data) +
1309 SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA); 1309 SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA);
1310 if (!buffer) { 1310 if (!buffer) {
1311 sms_err("Could not allocate buffer for init device message."); 1311 sms_err("Could not allocate buffer for init device message.");
1312 return -ENOMEM; 1312 return -ENOMEM;
1313 } 1313 }
1314 1314
1315 msg = (struct SmsMsgData_ST *)SMS_ALIGN_ADDRESS(buffer); 1315 msg = (struct sms_msg_data *)SMS_ALIGN_ADDRESS(buffer);
1316 SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_INIT_DEVICE_REQ, 1316 SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_INIT_DEVICE_REQ,
1317 sizeof(struct SmsMsgData_ST)); 1317 sizeof(struct sms_msg_data));
1318 msg->msgData[0] = mode; 1318 msg->msgData[0] = mode;
1319 1319
1320 rc = smscore_sendrequest_and_wait(coredev, msg, 1320 rc = smscore_sendrequest_and_wait(coredev, msg,
1321 msg->xMsgHeader. msgLength, 1321 msg->x_msg_header. msg_length,
1322 &coredev->init_device_done); 1322 &coredev->init_device_done);
1323 1323
1324 kfree(buffer); 1324 kfree(buffer);
@@ -1396,17 +1396,17 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
1396 coredev->mode = mode; 1396 coredev->mode = mode;
1397 coredev->device_flags &= ~SMS_DEVICE_NOT_READY; 1397 coredev->device_flags &= ~SMS_DEVICE_NOT_READY;
1398 1398
1399 buffer = kmalloc(sizeof(struct SmsMsgData_ST) + 1399 buffer = kmalloc(sizeof(struct sms_msg_data) +
1400 SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA); 1400 SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA);
1401 if (buffer) { 1401 if (buffer) {
1402 struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *) SMS_ALIGN_ADDRESS(buffer); 1402 struct sms_msg_data *msg = (struct sms_msg_data *) SMS_ALIGN_ADDRESS(buffer);
1403 1403
1404 SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_INIT_DEVICE_REQ, 1404 SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_INIT_DEVICE_REQ,
1405 sizeof(struct SmsMsgData_ST)); 1405 sizeof(struct sms_msg_data));
1406 msg->msgData[0] = mode; 1406 msg->msgData[0] = mode;
1407 1407
1408 rc = smscore_sendrequest_and_wait( 1408 rc = smscore_sendrequest_and_wait(
1409 coredev, msg, msg->xMsgHeader.msgLength, 1409 coredev, msg, msg->x_msg_header.msg_length,
1410 &coredev->init_device_done); 1410 &coredev->init_device_done);
1411 1411
1412 kfree(buffer); 1412 kfree(buffer);
@@ -1483,7 +1483,7 @@ found:
1483 */ 1483 */
1484void smscore_onresponse(struct smscore_device_t *coredev, 1484void smscore_onresponse(struct smscore_device_t *coredev,
1485 struct smscore_buffer_t *cb) { 1485 struct smscore_buffer_t *cb) {
1486 struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) ((u8 *) cb->p 1486 struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) ((u8 *) cb->p
1487 + cb->offset); 1487 + cb->offset);
1488 struct smscore_client_t *client; 1488 struct smscore_client_t *client;
1489 int rc = -EBUSY; 1489 int rc = -EBUSY;
@@ -1505,14 +1505,14 @@ void smscore_onresponse(struct smscore_device_t *coredev,
1505 1505
1506 data_total += cb->size; 1506 data_total += cb->size;
1507 /* Do we need to re-route? */ 1507 /* Do we need to re-route? */
1508 if ((phdr->msgType == MSG_SMS_HO_PER_SLICES_IND) || 1508 if ((phdr->msg_type == MSG_SMS_HO_PER_SLICES_IND) ||
1509 (phdr->msgType == MSG_SMS_TRANSMISSION_IND)) { 1509 (phdr->msg_type == MSG_SMS_TRANSMISSION_IND)) {
1510 if (coredev->mode == DEVICE_MODE_DVBT_BDA) 1510 if (coredev->mode == DEVICE_MODE_DVBT_BDA)
1511 phdr->msgDstId = DVBT_BDA_CONTROL_MSG_ID; 1511 phdr->msg_dst_id = DVBT_BDA_CONTROL_MSG_ID;
1512 } 1512 }
1513 1513
1514 1514
1515 client = smscore_find_client(coredev, phdr->msgType, phdr->msgDstId); 1515 client = smscore_find_client(coredev, phdr->msg_type, phdr->msg_dst_id);
1516 1516
1517 /* If no client registered for type & id, 1517 /* If no client registered for type & id,
1518 * check for control client where type is not registered */ 1518 * check for control client where type is not registered */
@@ -1520,7 +1520,7 @@ void smscore_onresponse(struct smscore_device_t *coredev,
1520 rc = client->onresponse_handler(client->context, cb); 1520 rc = client->onresponse_handler(client->context, cb);
1521 1521
1522 if (rc < 0) { 1522 if (rc < 0) {
1523 switch (phdr->msgType) { 1523 switch (phdr->msg_type) {
1524 case MSG_SMS_ISDBT_TUNE_RES: 1524 case MSG_SMS_ISDBT_TUNE_RES:
1525 break; 1525 break;
1526 case MSG_SMS_RF_TUNE_RES: 1526 case MSG_SMS_RF_TUNE_RES:
@@ -1537,17 +1537,17 @@ void smscore_onresponse(struct smscore_device_t *coredev,
1537 break; 1537 break;
1538 case MSG_SMS_GET_VERSION_EX_RES: 1538 case MSG_SMS_GET_VERSION_EX_RES:
1539 { 1539 {
1540 struct SmsVersionRes_ST *ver = 1540 struct sms_version_res *ver =
1541 (struct SmsVersionRes_ST *) phdr; 1541 (struct sms_version_res *) phdr;
1542 sms_debug("Firmware id %d prots 0x%x ver %d.%d", 1542 sms_debug("Firmware id %d prots 0x%x ver %d.%d",
1543 ver->FirmwareId, ver->SupportedProtocols, 1543 ver->firmware_id, ver->supported_protocols,
1544 ver->RomVersionMajor, ver->RomVersionMinor); 1544 ver->rom_ver_major, ver->rom_ver_minor);
1545 1545
1546 coredev->mode = ver->FirmwareId == 255 ? 1546 coredev->mode = ver->firmware_id == 255 ?
1547 DEVICE_MODE_NONE : ver->FirmwareId; 1547 DEVICE_MODE_NONE : ver->firmware_id;
1548 coredev->modes_supported = ver->SupportedProtocols; 1548 coredev->modes_supported = ver->supported_protocols;
1549 coredev->fw_version = ver->RomVersionMajor << 8 | 1549 coredev->fw_version = ver->rom_ver_major << 8 |
1550 ver->RomVersionMinor; 1550 ver->rom_ver_minor;
1551 1551
1552 complete(&coredev->version_ex_done); 1552 complete(&coredev->version_ex_done);
1553 break; 1553 break;
@@ -1560,7 +1560,7 @@ void smscore_onresponse(struct smscore_device_t *coredev,
1560 break; 1560 break;
1561 case MSG_SMS_DATA_VALIDITY_RES: 1561 case MSG_SMS_DATA_VALIDITY_RES:
1562 { 1562 {
1563 struct SmsMsgData_ST *validity = (struct SmsMsgData_ST *) phdr; 1563 struct sms_msg_data *validity = (struct sms_msg_data *) phdr;
1564 1564
1565 sms_err("MSG_SMS_DATA_VALIDITY_RES, checksum = 0x%x", 1565 sms_err("MSG_SMS_DATA_VALIDITY_RES, checksum = 0x%x",
1566 validity->msgData[0]); 1566 validity->msgData[0]);
@@ -1600,9 +1600,9 @@ void smscore_onresponse(struct smscore_device_t *coredev,
1600 sms_ir_event(coredev, 1600 sms_ir_event(coredev,
1601 (const char *) 1601 (const char *)
1602 ((char *)phdr 1602 ((char *)phdr
1603 + sizeof(struct SmsMsgHdr_ST)), 1603 + sizeof(struct sms_msg_hdr)),
1604 (int)phdr->msgLength 1604 (int)phdr->msg_length
1605 - sizeof(struct SmsMsgHdr_ST)); 1605 - sizeof(struct sms_msg_hdr));
1606 break; 1606 break;
1607 1607
1608 case MSG_SMS_DVBT_BDA_DATA: 1608 case MSG_SMS_DVBT_BDA_DATA:
@@ -1616,8 +1616,8 @@ void smscore_onresponse(struct smscore_device_t *coredev,
1616 1616
1617 default: 1617 default:
1618 sms_debug("message %s(%d) not handled.", 1618 sms_debug("message %s(%d) not handled.",
1619 smscore_translate_msg(phdr->msgType), 1619 smscore_translate_msg(phdr->msg_type),
1620 phdr->msgType); 1620 phdr->msg_type);
1621 break; 1621 break;
1622 } 1622 }
1623 smscore_putbuffer(coredev, cb); 1623 smscore_putbuffer(coredev, cb);
@@ -1799,7 +1799,7 @@ int smsclient_sendrequest(struct smscore_client_t *client,
1799 void *buffer, size_t size) 1799 void *buffer, size_t size)
1800{ 1800{
1801 struct smscore_device_t *coredev; 1801 struct smscore_device_t *coredev;
1802 struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) buffer; 1802 struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer;
1803 int rc; 1803 int rc;
1804 1804
1805 if (client == NULL) { 1805 if (client == NULL) {
@@ -1816,7 +1816,7 @@ int smsclient_sendrequest(struct smscore_client_t *client,
1816 } 1816 }
1817 1817
1818 rc = smscore_validate_client(client->coredev, client, 0, 1818 rc = smscore_validate_client(client->coredev, client, 0,
1819 phdr->msgSrcId); 1819 phdr->msg_src_id);
1820 if (rc < 0) 1820 if (rc < 0)
1821 return rc; 1821 return rc;
1822 1822
@@ -1830,16 +1830,16 @@ int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
1830 struct smscore_config_gpio *pinconfig) 1830 struct smscore_config_gpio *pinconfig)
1831{ 1831{
1832 struct { 1832 struct {
1833 struct SmsMsgHdr_ST hdr; 1833 struct sms_msg_hdr hdr;
1834 u32 data[6]; 1834 u32 data[6];
1835 } msg; 1835 } msg;
1836 1836
1837 if (coredev->device_flags & SMS_DEVICE_FAMILY2) { 1837 if (coredev->device_flags & SMS_DEVICE_FAMILY2) {
1838 msg.hdr.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 1838 msg.hdr.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
1839 msg.hdr.msgDstId = HIF_TASK; 1839 msg.hdr.msg_dst_id = HIF_TASK;
1840 msg.hdr.msgFlags = 0; 1840 msg.hdr.msg_flags = 0;
1841 msg.hdr.msgType = MSG_SMS_GPIO_CONFIG_EX_REQ; 1841 msg.hdr.msg_type = MSG_SMS_GPIO_CONFIG_EX_REQ;
1842 msg.hdr.msgLength = sizeof(msg); 1842 msg.hdr.msg_length = sizeof(msg);
1843 1843
1844 msg.data[0] = pin; 1844 msg.data[0] = pin;
1845 msg.data[1] = pinconfig->pullupdown; 1845 msg.data[1] = pinconfig->pullupdown;
@@ -1875,18 +1875,18 @@ int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
1875int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level) 1875int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level)
1876{ 1876{
1877 struct { 1877 struct {
1878 struct SmsMsgHdr_ST hdr; 1878 struct sms_msg_hdr hdr;
1879 u32 data[3]; 1879 u32 data[3];
1880 } msg; 1880 } msg;
1881 1881
1882 if (pin > MAX_GPIO_PIN_NUMBER) 1882 if (pin > MAX_GPIO_PIN_NUMBER)
1883 return -EINVAL; 1883 return -EINVAL;
1884 1884
1885 msg.hdr.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 1885 msg.hdr.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
1886 msg.hdr.msgDstId = HIF_TASK; 1886 msg.hdr.msg_dst_id = HIF_TASK;
1887 msg.hdr.msgFlags = 0; 1887 msg.hdr.msg_flags = 0;
1888 msg.hdr.msgType = MSG_SMS_GPIO_SET_LEVEL_REQ; 1888 msg.hdr.msg_type = MSG_SMS_GPIO_SET_LEVEL_REQ;
1889 msg.hdr.msgLength = sizeof(msg); 1889 msg.hdr.msg_length = sizeof(msg);
1890 1890
1891 msg.data[0] = pin; 1891 msg.data[0] = pin;
1892 msg.data[1] = level ? 1 : 0; 1892 msg.data[1] = level ? 1 : 0;
@@ -1897,47 +1897,47 @@ int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level)
1897} 1897}
1898 1898
1899/* new GPIO management implementation */ 1899/* new GPIO management implementation */
1900static int GetGpioPinParams(u32 PinNum, u32 *pTranslatedPinNum, 1900static int GetGpioPinParams(u32 pin_num, u32 *pTranslatedpin_num,
1901 u32 *pGroupNum, u32 *pGroupCfg) { 1901 u32 *pGroupNum, u32 *pGroupCfg) {
1902 1902
1903 *pGroupCfg = 1; 1903 *pGroupCfg = 1;
1904 1904
1905 if (PinNum <= 1) { 1905 if (pin_num <= 1) {
1906 *pTranslatedPinNum = 0; 1906 *pTranslatedpin_num = 0;
1907 *pGroupNum = 9; 1907 *pGroupNum = 9;
1908 *pGroupCfg = 2; 1908 *pGroupCfg = 2;
1909 } else if (PinNum >= 2 && PinNum <= 6) { 1909 } else if (pin_num >= 2 && pin_num <= 6) {
1910 *pTranslatedPinNum = 2; 1910 *pTranslatedpin_num = 2;
1911 *pGroupNum = 0; 1911 *pGroupNum = 0;
1912 *pGroupCfg = 2; 1912 *pGroupCfg = 2;
1913 } else if (PinNum >= 7 && PinNum <= 11) { 1913 } else if (pin_num >= 7 && pin_num <= 11) {
1914 *pTranslatedPinNum = 7; 1914 *pTranslatedpin_num = 7;
1915 *pGroupNum = 1; 1915 *pGroupNum = 1;
1916 } else if (PinNum >= 12 && PinNum <= 15) { 1916 } else if (pin_num >= 12 && pin_num <= 15) {
1917 *pTranslatedPinNum = 12; 1917 *pTranslatedpin_num = 12;
1918 *pGroupNum = 2; 1918 *pGroupNum = 2;
1919 *pGroupCfg = 3; 1919 *pGroupCfg = 3;
1920 } else if (PinNum == 16) { 1920 } else if (pin_num == 16) {
1921 *pTranslatedPinNum = 16; 1921 *pTranslatedpin_num = 16;
1922 *pGroupNum = 23; 1922 *pGroupNum = 23;
1923 } else if (PinNum >= 17 && PinNum <= 24) { 1923 } else if (pin_num >= 17 && pin_num <= 24) {
1924 *pTranslatedPinNum = 17; 1924 *pTranslatedpin_num = 17;
1925 *pGroupNum = 3; 1925 *pGroupNum = 3;
1926 } else if (PinNum == 25) { 1926 } else if (pin_num == 25) {
1927 *pTranslatedPinNum = 25; 1927 *pTranslatedpin_num = 25;
1928 *pGroupNum = 6; 1928 *pGroupNum = 6;
1929 } else if (PinNum >= 26 && PinNum <= 28) { 1929 } else if (pin_num >= 26 && pin_num <= 28) {
1930 *pTranslatedPinNum = 26; 1930 *pTranslatedpin_num = 26;
1931 *pGroupNum = 4; 1931 *pGroupNum = 4;
1932 } else if (PinNum == 29) { 1932 } else if (pin_num == 29) {
1933 *pTranslatedPinNum = 29; 1933 *pTranslatedpin_num = 29;
1934 *pGroupNum = 5; 1934 *pGroupNum = 5;
1935 *pGroupCfg = 2; 1935 *pGroupCfg = 2;
1936 } else if (PinNum == 30) { 1936 } else if (pin_num == 30) {
1937 *pTranslatedPinNum = 30; 1937 *pTranslatedpin_num = 30;
1938 *pGroupNum = 8; 1938 *pGroupNum = 8;
1939 } else if (PinNum == 31) { 1939 } else if (pin_num == 31) {
1940 *pTranslatedPinNum = 31; 1940 *pTranslatedpin_num = 31;
1941 *pGroupNum = 17; 1941 *pGroupNum = 17;
1942 } else 1942 } else
1943 return -1; 1943 return -1;
@@ -1947,11 +1947,11 @@ static int GetGpioPinParams(u32 PinNum, u32 *pTranslatedPinNum,
1947 return 0; 1947 return 0;
1948} 1948}
1949 1949
1950int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum, 1950int smscore_gpio_configure(struct smscore_device_t *coredev, u8 pin_num,
1951 struct smscore_config_gpio *pGpioConfig) { 1951 struct smscore_config_gpio *p_gpio_config) {
1952 1952
1953 u32 totalLen; 1953 u32 totalLen;
1954 u32 TranslatedPinNum = 0; 1954 u32 Translatedpin_num = 0;
1955 u32 GroupNum = 0; 1955 u32 GroupNum = 0;
1956 u32 ElectricChar; 1956 u32 ElectricChar;
1957 u32 groupCfg; 1957 u32 groupCfg;
@@ -1959,18 +1959,18 @@ int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum,
1959 int rc; 1959 int rc;
1960 1960
1961 struct SetGpioMsg { 1961 struct SetGpioMsg {
1962 struct SmsMsgHdr_ST xMsgHeader; 1962 struct sms_msg_hdr x_msg_header;
1963 u32 msgData[6]; 1963 u32 msgData[6];
1964 } *pMsg; 1964 } *pMsg;
1965 1965
1966 1966
1967 if (PinNum > MAX_GPIO_PIN_NUMBER) 1967 if (pin_num > MAX_GPIO_PIN_NUMBER)
1968 return -EINVAL; 1968 return -EINVAL;
1969 1969
1970 if (pGpioConfig == NULL) 1970 if (p_gpio_config == NULL)
1971 return -EINVAL; 1971 return -EINVAL;
1972 1972
1973 totalLen = sizeof(struct SmsMsgHdr_ST) + (sizeof(u32) * 6); 1973 totalLen = sizeof(struct sms_msg_hdr) + (sizeof(u32) * 6);
1974 1974
1975 buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT, 1975 buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT,
1976 GFP_KERNEL | GFP_DMA); 1976 GFP_KERNEL | GFP_DMA);
@@ -1979,35 +1979,35 @@ int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum,
1979 1979
1980 pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer); 1980 pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer);
1981 1981
1982 pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 1982 pMsg->x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
1983 pMsg->xMsgHeader.msgDstId = HIF_TASK; 1983 pMsg->x_msg_header.msg_dst_id = HIF_TASK;
1984 pMsg->xMsgHeader.msgFlags = 0; 1984 pMsg->x_msg_header.msg_flags = 0;
1985 pMsg->xMsgHeader.msgLength = (u16) totalLen; 1985 pMsg->x_msg_header.msg_length = (u16) totalLen;
1986 pMsg->msgData[0] = PinNum; 1986 pMsg->msgData[0] = pin_num;
1987 1987
1988 if (!(coredev->device_flags & SMS_DEVICE_FAMILY2)) { 1988 if (!(coredev->device_flags & SMS_DEVICE_FAMILY2)) {
1989 pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_CONFIG_REQ; 1989 pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_CONFIG_REQ;
1990 if (GetGpioPinParams(PinNum, &TranslatedPinNum, &GroupNum, 1990 if (GetGpioPinParams(pin_num, &Translatedpin_num, &GroupNum,
1991 &groupCfg) != 0) { 1991 &groupCfg) != 0) {
1992 rc = -EINVAL; 1992 rc = -EINVAL;
1993 goto free; 1993 goto free;
1994 } 1994 }
1995 1995
1996 pMsg->msgData[1] = TranslatedPinNum; 1996 pMsg->msgData[1] = Translatedpin_num;
1997 pMsg->msgData[2] = GroupNum; 1997 pMsg->msgData[2] = GroupNum;
1998 ElectricChar = (pGpioConfig->pullupdown) 1998 ElectricChar = (p_gpio_config->pullupdown)
1999 | (pGpioConfig->inputcharacteristics << 2) 1999 | (p_gpio_config->inputcharacteristics << 2)
2000 | (pGpioConfig->outputslewrate << 3) 2000 | (p_gpio_config->outputslewrate << 3)
2001 | (pGpioConfig->outputdriving << 4); 2001 | (p_gpio_config->outputdriving << 4);
2002 pMsg->msgData[3] = ElectricChar; 2002 pMsg->msgData[3] = ElectricChar;
2003 pMsg->msgData[4] = pGpioConfig->direction; 2003 pMsg->msgData[4] = p_gpio_config->direction;
2004 pMsg->msgData[5] = groupCfg; 2004 pMsg->msgData[5] = groupCfg;
2005 } else { 2005 } else {
2006 pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_CONFIG_EX_REQ; 2006 pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_CONFIG_EX_REQ;
2007 pMsg->msgData[1] = pGpioConfig->pullupdown; 2007 pMsg->msgData[1] = p_gpio_config->pullupdown;
2008 pMsg->msgData[2] = pGpioConfig->outputslewrate; 2008 pMsg->msgData[2] = p_gpio_config->outputslewrate;
2009 pMsg->msgData[3] = pGpioConfig->outputdriving; 2009 pMsg->msgData[3] = p_gpio_config->outputdriving;
2010 pMsg->msgData[4] = pGpioConfig->direction; 2010 pMsg->msgData[4] = p_gpio_config->direction;
2011 pMsg->msgData[5] = 0; 2011 pMsg->msgData[5] = 0;
2012 } 2012 }
2013 2013
@@ -2026,22 +2026,22 @@ free:
2026 return rc; 2026 return rc;
2027} 2027}
2028 2028
2029int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum, 2029int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num,
2030 u8 NewLevel) { 2030 u8 new_level) {
2031 2031
2032 u32 totalLen; 2032 u32 totalLen;
2033 int rc; 2033 int rc;
2034 void *buffer; 2034 void *buffer;
2035 2035
2036 struct SetGpioMsg { 2036 struct SetGpioMsg {
2037 struct SmsMsgHdr_ST xMsgHeader; 2037 struct sms_msg_hdr x_msg_header;
2038 u32 msgData[3]; /* keep it 3 ! */ 2038 u32 msgData[3]; /* keep it 3 ! */
2039 } *pMsg; 2039 } *pMsg;
2040 2040
2041 if ((NewLevel > 1) || (PinNum > MAX_GPIO_PIN_NUMBER)) 2041 if ((new_level > 1) || (pin_num > MAX_GPIO_PIN_NUMBER))
2042 return -EINVAL; 2042 return -EINVAL;
2043 2043
2044 totalLen = sizeof(struct SmsMsgHdr_ST) + 2044 totalLen = sizeof(struct sms_msg_hdr) +
2045 (3 * sizeof(u32)); /* keep it 3 ! */ 2045 (3 * sizeof(u32)); /* keep it 3 ! */
2046 2046
2047 buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT, 2047 buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT,
@@ -2051,13 +2051,13 @@ int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum,
2051 2051
2052 pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer); 2052 pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer);
2053 2053
2054 pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 2054 pMsg->x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
2055 pMsg->xMsgHeader.msgDstId = HIF_TASK; 2055 pMsg->x_msg_header.msg_dst_id = HIF_TASK;
2056 pMsg->xMsgHeader.msgFlags = 0; 2056 pMsg->x_msg_header.msg_flags = 0;
2057 pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_SET_LEVEL_REQ; 2057 pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_SET_LEVEL_REQ;
2058 pMsg->xMsgHeader.msgLength = (u16) totalLen; 2058 pMsg->x_msg_header.msg_length = (u16) totalLen;
2059 pMsg->msgData[0] = PinNum; 2059 pMsg->msgData[0] = pin_num;
2060 pMsg->msgData[1] = NewLevel; 2060 pMsg->msgData[1] = new_level;
2061 2061
2062 /* Send message to SMS */ 2062 /* Send message to SMS */
2063 rc = smscore_sendrequest_and_wait(coredev, pMsg, totalLen, 2063 rc = smscore_sendrequest_and_wait(coredev, pMsg, totalLen,
@@ -2074,7 +2074,7 @@ int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum,
2074 return rc; 2074 return rc;
2075} 2075}
2076 2076
2077int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum, 2077int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 pin_num,
2078 u8 *level) { 2078 u8 *level) {
2079 2079
2080 u32 totalLen; 2080 u32 totalLen;
@@ -2082,15 +2082,15 @@ int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum,
2082 void *buffer; 2082 void *buffer;
2083 2083
2084 struct SetGpioMsg { 2084 struct SetGpioMsg {
2085 struct SmsMsgHdr_ST xMsgHeader; 2085 struct sms_msg_hdr x_msg_header;
2086 u32 msgData[2]; 2086 u32 msgData[2];
2087 } *pMsg; 2087 } *pMsg;
2088 2088
2089 2089
2090 if (PinNum > MAX_GPIO_PIN_NUMBER) 2090 if (pin_num > MAX_GPIO_PIN_NUMBER)
2091 return -EINVAL; 2091 return -EINVAL;
2092 2092
2093 totalLen = sizeof(struct SmsMsgHdr_ST) + (2 * sizeof(u32)); 2093 totalLen = sizeof(struct sms_msg_hdr) + (2 * sizeof(u32));
2094 2094
2095 buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT, 2095 buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT,
2096 GFP_KERNEL | GFP_DMA); 2096 GFP_KERNEL | GFP_DMA);
@@ -2099,12 +2099,12 @@ int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum,
2099 2099
2100 pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer); 2100 pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer);
2101 2101
2102 pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 2102 pMsg->x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
2103 pMsg->xMsgHeader.msgDstId = HIF_TASK; 2103 pMsg->x_msg_header.msg_dst_id = HIF_TASK;
2104 pMsg->xMsgHeader.msgFlags = 0; 2104 pMsg->x_msg_header.msg_flags = 0;
2105 pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_GET_LEVEL_REQ; 2105 pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_GET_LEVEL_REQ;
2106 pMsg->xMsgHeader.msgLength = (u16) totalLen; 2106 pMsg->x_msg_header.msg_length = (u16) totalLen;
2107 pMsg->msgData[0] = PinNum; 2107 pMsg->msgData[0] = pin_num;
2108 pMsg->msgData[1] = 0; 2108 pMsg->msgData[1] = 0;
2109 2109
2110 /* Send message to SMS */ 2110 /* Send message to SMS */
diff --git a/drivers/media/common/siano/smscoreapi.h b/drivers/media/common/siano/smscoreapi.h
index bb742469d40a..4b0cd7da22b7 100644
--- a/drivers/media/common/siano/smscoreapi.h
+++ b/drivers/media/common/siano/smscoreapi.h
@@ -577,8 +577,8 @@ enum msg_types {
577}; 577};
578 578
579#define SMS_INIT_MSG_EX(ptr, type, src, dst, len) do { \ 579#define SMS_INIT_MSG_EX(ptr, type, src, dst, len) do { \
580 (ptr)->msgType = type; (ptr)->msgSrcId = src; (ptr)->msgDstId = dst; \ 580 (ptr)->msg_type = type; (ptr)->msg_src_id = src; (ptr)->msg_dst_id = dst; \
581 (ptr)->msgLength = len; (ptr)->msgFlags = 0; \ 581 (ptr)->msg_length = len; (ptr)->msg_flags = 0; \
582} while (0) 582} while (0)
583 583
584#define SMS_INIT_MSG(ptr, type, len) \ 584#define SMS_INIT_MSG(ptr, type, len) \
@@ -611,78 +611,78 @@ enum SMS_DEVICE_MODE {
611 DEVICE_MODE_MAX, 611 DEVICE_MODE_MAX,
612}; 612};
613 613
614struct SmsMsgHdr_ST { 614struct sms_msg_hdr {
615 u16 msgType; 615 u16 msg_type;
616 u8 msgSrcId; 616 u8 msg_src_id;
617 u8 msgDstId; 617 u8 msg_dst_id;
618 u16 msgLength; /* Length of entire message, including header */ 618 u16 msg_length; /* length of entire message, including header */
619 u16 msgFlags; 619 u16 msg_flags;
620}; 620};
621 621
622struct SmsMsgData_ST { 622struct sms_msg_data {
623 struct SmsMsgHdr_ST xMsgHeader; 623 struct sms_msg_hdr x_msg_header;
624 u32 msgData[1]; 624 u32 msgData[1];
625}; 625};
626 626
627struct SmsMsgData_ST2 { 627struct sms_msg_data2 {
628 struct SmsMsgHdr_ST xMsgHeader; 628 struct sms_msg_hdr x_msg_header;
629 u32 msgData[2]; 629 u32 msgData[2];
630}; 630};
631 631
632struct SmsMsgData_ST4 { 632struct sms_msg_data4 {
633 struct SmsMsgHdr_ST xMsgHeader; 633 struct sms_msg_hdr x_msg_header;
634 u32 msgData[4]; 634 u32 msgData[4];
635}; 635};
636 636
637struct SmsDataDownload_ST { 637struct sms_data_download {
638 struct SmsMsgHdr_ST xMsgHeader; 638 struct sms_msg_hdr x_msg_header;
639 u32 MemAddr; 639 u32 mem_addr;
640 u8 Payload[SMS_MAX_PAYLOAD_SIZE]; 640 u8 payload[SMS_MAX_PAYLOAD_SIZE];
641}; 641};
642 642
643struct SmsVersionRes_ST { 643struct sms_version_res {
644 struct SmsMsgHdr_ST xMsgHeader; 644 struct sms_msg_hdr x_msg_header;
645 645
646 u16 ChipModel; /* e.g. 0x1102 for SMS-1102 "Nova" */ 646 u16 chip_model; /* e.g. 0x1102 for SMS-1102 "Nova" */
647 u8 Step; /* 0 - Step A */ 647 u8 step; /* 0 - step A */
648 u8 MetalFix; /* 0 - Metal 0 */ 648 u8 metal_fix; /* 0 - Metal 0 */
649 649
650 /* FirmwareId 0xFF if ROM, otherwise the 650 /* firmware_id 0xFF if ROM, otherwise the
651 * value indicated by SMSHOSTLIB_DEVICE_MODES_E */ 651 * value indicated by SMSHOSTLIB_DEVICE_MODES_E */
652 u8 FirmwareId; 652 u8 firmware_id;
653 /* SupportedProtocols Bitwise OR combination of 653 /* supported_protocols Bitwise OR combination of
654 * supported protocols */ 654 * supported protocols */
655 u8 SupportedProtocols; 655 u8 supported_protocols;
656 656
657 u8 VersionMajor; 657 u8 version_major;
658 u8 VersionMinor; 658 u8 version_minor;
659 u8 VersionPatch; 659 u8 version_patch;
660 u8 VersionFieldPatch; 660 u8 version_field_patch;
661 661
662 u8 RomVersionMajor; 662 u8 rom_ver_major;
663 u8 RomVersionMinor; 663 u8 rom_ver_minor;
664 u8 RomVersionPatch; 664 u8 rom_ver_patch;
665 u8 RomVersionFieldPatch; 665 u8 rom_ver_field_patch;
666 666
667 u8 TextLabel[34]; 667 u8 TextLabel[34];
668}; 668};
669 669
670struct SmsFirmware_ST { 670struct sms_firmware {
671 u32 CheckSum; 671 u32 check_sum;
672 u32 Length; 672 u32 length;
673 u32 StartAddress; 673 u32 start_address;
674 u8 Payload[1]; 674 u8 payload[1];
675}; 675};
676 676
677/* Statistics information returned as response for 677/* statistics information returned as response for
678 * SmsHostApiGetStatistics_Req */ 678 * SmsHostApiGetstatistics_Req */
679struct SMSHOSTLIB_STATISTICS_ST { 679struct SMSHOSTLIB_STATISTICS_ST {
680 u32 Reserved; /* Reserved */ 680 u32 reserved; /* reserved */
681 681
682 /* Common parameters */ 682 /* Common parameters */
683 u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 683 u32 is_rf_locked; /* 0 - not locked, 1 - locked */
684 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 684 u32 is_demod_locked; /* 0 - not locked, 1 - locked */
685 u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 685 u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
686 686
687 /* Reception quality */ 687 /* Reception quality */
688 s32 SNR; /* dB */ 688 s32 SNR; /* dB */
@@ -693,137 +693,137 @@ struct SMSHOSTLIB_STATISTICS_ST {
693 u32 MFER; /* DVB-H frame error rate in percentage, 693 u32 MFER; /* DVB-H frame error rate in percentage,
694 0xFFFFFFFF indicate N/A, valid only for DVB-H */ 694 0xFFFFFFFF indicate N/A, valid only for DVB-H */
695 s32 RSSI; /* dBm */ 695 s32 RSSI; /* dBm */
696 s32 InBandPwr; /* In band power in dBM */ 696 s32 in_band_pwr; /* In band power in dBM */
697 s32 CarrierOffset; /* Carrier Offset in bin/1024 */ 697 s32 carrier_offset; /* Carrier Offset in bin/1024 */
698 698
699 /* Transmission parameters */ 699 /* Transmission parameters */
700 u32 Frequency; /* Frequency in Hz */ 700 u32 frequency; /* frequency in Hz */
701 u32 Bandwidth; /* Bandwidth in MHz, valid only for DVB-T/H */ 701 u32 bandwidth; /* bandwidth in MHz, valid only for DVB-T/H */
702 u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4, 702 u32 transmission_mode; /* Transmission Mode, for DAB modes 1-4,
703 for DVB-T/H FFT mode carriers in Kilos */ 703 for DVB-T/H FFT mode carriers in Kilos */
704 u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET, 704 u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET,
705 valid only for DVB-T/H */ 705 valid only for DVB-T/H */
706 u32 GuardInterval; /* Guard Interval from 706 u32 guard_interval; /* Guard Interval from
707 SMSHOSTLIB_GUARD_INTERVALS_ET, valid only for DVB-T/H */ 707 SMSHOSTLIB_GUARD_INTERVALS_ET, valid only for DVB-T/H */
708 u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 708 u32 code_rate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET,
709 valid only for DVB-T/H */ 709 valid only for DVB-T/H */
710 u32 LPCodeRate; /* Low Priority Code Rate from 710 u32 lp_code_rate; /* Low Priority Code Rate from
711 SMSHOSTLIB_CODE_RATE_ET, valid only for DVB-T/H */ 711 SMSHOSTLIB_CODE_RATE_ET, valid only for DVB-T/H */
712 u32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET, 712 u32 hierarchy; /* hierarchy from SMSHOSTLIB_HIERARCHY_ET,
713 valid only for DVB-T/H */ 713 valid only for DVB-T/H */
714 u32 Constellation; /* Constellation from 714 u32 constellation; /* constellation from
715 SMSHOSTLIB_CONSTELLATION_ET, valid only for DVB-T/H */ 715 SMSHOSTLIB_CONSTELLATION_ET, valid only for DVB-T/H */
716 716
717 /* Burst parameters, valid only for DVB-H */ 717 /* Burst parameters, valid only for DVB-H */
718 u32 BurstSize; /* Current burst size in bytes, 718 u32 burst_size; /* Current burst size in bytes,
719 valid only for DVB-H */ 719 valid only for DVB-H */
720 u32 BurstDuration; /* Current burst duration in mSec, 720 u32 burst_duration; /* Current burst duration in mSec,
721 valid only for DVB-H */ 721 valid only for DVB-H */
722 u32 BurstCycleTime; /* Current burst cycle time in mSec, 722 u32 burst_cycle_time; /* Current burst cycle time in mSec,
723 valid only for DVB-H */ 723 valid only for DVB-H */
724 u32 CalculatedBurstCycleTime;/* Current burst cycle time in mSec, 724 u32 calc_burst_cycle_time;/* Current burst cycle time in mSec,
725 as calculated by demodulator, valid only for DVB-H */ 725 as calculated by demodulator, valid only for DVB-H */
726 u32 NumOfRows; /* Number of rows in MPE table, 726 u32 num_of_rows; /* Number of rows in MPE table,
727 valid only for DVB-H */ 727 valid only for DVB-H */
728 u32 NumOfPaddCols; /* Number of padding columns in MPE table, 728 u32 num_of_padd_cols; /* Number of padding columns in MPE table,
729 valid only for DVB-H */ 729 valid only for DVB-H */
730 u32 NumOfPunctCols; /* Number of puncturing columns in MPE table, 730 u32 num_of_punct_cols; /* Number of puncturing columns in MPE table,
731 valid only for DVB-H */ 731 valid only for DVB-H */
732 u32 ErrorTSPackets; /* Number of erroneous 732 u32 error_ts_packets; /* Number of erroneous
733 transport-stream packets */ 733 transport-stream packets */
734 u32 TotalTSPackets; /* Total number of transport-stream packets */ 734 u32 total_ts_packets; /* Total number of transport-stream packets */
735 u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include 735 u32 num_of_valid_mpe_tlbs; /* Number of MPE tables which do not include
736 errors after MPE RS decoding */ 736 errors after MPE RS decoding */
737 u32 NumOfInvalidMpeTlbs;/* Number of MPE tables which include errors 737 u32 num_of_invalid_mpe_tlbs;/* Number of MPE tables which include errors
738 after MPE RS decoding */ 738 after MPE RS decoding */
739 u32 NumOfCorrectedMpeTlbs;/* Number of MPE tables which were 739 u32 num_of_corrected_mpe_tlbs;/* Number of MPE tables which were
740 corrected by MPE RS decoding */ 740 corrected by MPE RS decoding */
741 /* Common params */ 741 /* Common params */
742 u32 BERErrorCount; /* Number of errornous SYNC bits. */ 742 u32 ber_error_count; /* Number of errornous SYNC bits. */
743 u32 BERBitCount; /* Total number of SYNC bits. */ 743 u32 ber_bit_count; /* Total number of SYNC bits. */
744 744
745 /* Interface information */ 745 /* Interface information */
746 u32 SmsToHostTxErrors; /* Total number of transmission errors. */ 746 u32 sms_to_host_tx_errors; /* Total number of transmission errors. */
747 747
748 /* DAB/T-DMB */ 748 /* DAB/T-DMB */
749 u32 PreBER; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */ 749 u32 pre_ber; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */
750 750
751 /* DVB-H TPS parameters */ 751 /* DVB-H TPS parameters */
752 u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; 752 u32 cell_id; /* TPS Cell ID in bits 15..0, bits 31..16 zero;
753 if set to 0xFFFFFFFF cell_id not yet recovered */ 753 if set to 0xFFFFFFFF cell_id not yet recovered */
754 u32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 - 754 u32 dvbh_srv_ind_hp; /* DVB-H service indication info, bit 1 -
755 Time Slicing indicator, bit 0 - MPE-FEC indicator */ 755 Time Slicing indicator, bit 0 - MPE-FEC indicator */
756 u32 DvbhSrvIndLP; /* DVB-H service indication info, bit 1 - 756 u32 dvbh_srv_ind_lp; /* DVB-H service indication info, bit 1 -
757 Time Slicing indicator, bit 0 - MPE-FEC indicator */ 757 Time Slicing indicator, bit 0 - MPE-FEC indicator */
758 758
759 u32 NumMPEReceived; /* DVB-H, Num MPE section received */ 759 u32 num_mpe_received; /* DVB-H, Num MPE section received */
760 760
761 u32 ReservedFields[10]; /* Reserved */ 761 u32 reservedFields[10]; /* reserved */
762}; 762};
763 763
764struct SmsMsgStatisticsInfo_ST { 764struct sms_msg_statistics_info {
765 u32 RequestResult; 765 u32 request_result;
766 766
767 struct SMSHOSTLIB_STATISTICS_ST Stat; 767 struct SMSHOSTLIB_STATISTICS_ST stat;
768 768
769 /* Split the calc of the SNR in DAB */ 769 /* Split the calc of the SNR in DAB */
770 u32 Signal; /* dB */ 770 u32 signal; /* dB */
771 u32 Noise; /* dB */ 771 u32 noise; /* dB */
772 772
773}; 773};
774 774
775struct SMSHOSTLIB_ISDBT_LAYER_STAT_ST { 775struct SMSHOSTLIB_ISDBT_LAYER_STAT_ST {
776 /* Per-layer information */ 776 /* Per-layer information */
777 u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 777 u32 code_rate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET,
778 * 255 means layer does not exist */ 778 * 255 means layer does not exist */
779 u32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET, 779 u32 constellation; /* constellation from SMSHOSTLIB_CONSTELLATION_ET,
780 * 255 means layer does not exist */ 780 * 255 means layer does not exist */
781 u32 BER; /* Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */ 781 u32 BER; /* Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */
782 u32 BERErrorCount; /* Post Viterbi Error Bits Count */ 782 u32 ber_error_count; /* Post Viterbi Error Bits Count */
783 u32 BERBitCount; /* Post Viterbi Total Bits Count */ 783 u32 ber_bit_count; /* Post Viterbi Total Bits Count */
784 u32 PreBER; /* Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */ 784 u32 pre_ber; /* Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */
785 u32 TS_PER; /* Transport stream PER [%], 0xFFFFFFFF indicate N/A */ 785 u32 TS_PER; /* Transport stream PER [%], 0xFFFFFFFF indicate N/A */
786 u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */ 786 u32 error_ts_packets; /* Number of erroneous transport-stream packets */
787 u32 TotalTSPackets; /* Total number of transport-stream packets */ 787 u32 total_ts_packets; /* Total number of transport-stream packets */
788 u32 TILdepthI; /* Time interleaver depth I parameter, 788 u32 ti_ldepth_i; /* Time interleaver depth I parameter,
789 * 255 means layer does not exist */ 789 * 255 means layer does not exist */
790 u32 NumberOfSegments; /* Number of segments in layer A, 790 u32 number_of_segments; /* Number of segments in layer A,
791 * 255 means layer does not exist */ 791 * 255 means layer does not exist */
792 u32 TMCCErrors; /* TMCC errors */ 792 u32 tmcc_errors; /* TMCC errors */
793}; 793};
794 794
795struct SMSHOSTLIB_STATISTICS_ISDBT_ST { 795struct SMSHOSTLIB_STATISTICS_ISDBT_ST {
796 u32 StatisticsType; /* Enumerator identifying the type of the 796 u32 statistics_type; /* Enumerator identifying the type of the
797 * structure. Values are the same as 797 * structure. Values are the same as
798 * SMSHOSTLIB_DEVICE_MODES_E 798 * SMSHOSTLIB_DEVICE_MODES_E
799 * 799 *
800 * This field MUST always be first in any 800 * This field MUST always be first in any
801 * statistics structure */ 801 * statistics structure */
802 802
803 u32 FullSize; /* Total size of the structure returned by the modem. 803 u32 full_size; /* Total size of the structure returned by the modem.
804 * If the size requested by the host is smaller than 804 * If the size requested by the host is smaller than
805 * FullSize, the struct will be truncated */ 805 * full_size, the struct will be truncated */
806 806
807 /* Common parameters */ 807 /* Common parameters */
808 u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 808 u32 is_rf_locked; /* 0 - not locked, 1 - locked */
809 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 809 u32 is_demod_locked; /* 0 - not locked, 1 - locked */
810 u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 810 u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
811 811
812 /* Reception quality */ 812 /* Reception quality */
813 s32 SNR; /* dB */ 813 s32 SNR; /* dB */
814 s32 RSSI; /* dBm */ 814 s32 RSSI; /* dBm */
815 s32 InBandPwr; /* In band power in dBM */ 815 s32 in_band_pwr; /* In band power in dBM */
816 s32 CarrierOffset; /* Carrier Offset in Hz */ 816 s32 carrier_offset; /* Carrier Offset in Hz */
817 817
818 /* Transmission parameters */ 818 /* Transmission parameters */
819 u32 Frequency; /* Frequency in Hz */ 819 u32 frequency; /* frequency in Hz */
820 u32 Bandwidth; /* Bandwidth in MHz */ 820 u32 bandwidth; /* bandwidth in MHz */
821 u32 TransmissionMode; /* ISDB-T transmission mode */ 821 u32 transmission_mode; /* ISDB-T transmission mode */
822 u32 ModemState; /* 0 - Acquisition, 1 - Locked */ 822 u32 modem_state; /* 0 - Acquisition, 1 - Locked */
823 u32 GuardInterval; /* Guard Interval, 1 divided by value */ 823 u32 guard_interval; /* Guard Interval, 1 divided by value */
824 u32 SystemType; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */ 824 u32 system_type; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */
825 u32 PartialReception; /* TRUE - partial reception, FALSE otherwise */ 825 u32 partial_reception; /* TRUE - partial reception, FALSE otherwise */
826 u32 NumOfLayers; /* Number of ISDB-T layers in the network */ 826 u32 num_of_layers; /* Number of ISDB-T layers in the network */
827 827
828 /* Per-layer information */ 828 /* Per-layer information */
829 /* Layers A, B and C */ 829 /* Layers A, B and C */
@@ -831,44 +831,44 @@ struct SMSHOSTLIB_STATISTICS_ISDBT_ST {
831 /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */ 831 /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */
832 832
833 /* Interface information */ 833 /* Interface information */
834 u32 SmsToHostTxErrors; /* Total number of transmission errors. */ 834 u32 sms_to_host_tx_errors; /* Total number of transmission errors. */
835}; 835};
836 836
837struct SMSHOSTLIB_STATISTICS_ISDBT_EX_ST { 837struct SMSHOSTLIB_STATISTICS_ISDBT_EX_ST {
838 u32 StatisticsType; /* Enumerator identifying the type of the 838 u32 statistics_type; /* Enumerator identifying the type of the
839 * structure. Values are the same as 839 * structure. Values are the same as
840 * SMSHOSTLIB_DEVICE_MODES_E 840 * SMSHOSTLIB_DEVICE_MODES_E
841 * 841 *
842 * This field MUST always be first in any 842 * This field MUST always be first in any
843 * statistics structure */ 843 * statistics structure */
844 844
845 u32 FullSize; /* Total size of the structure returned by the modem. 845 u32 full_size; /* Total size of the structure returned by the modem.
846 * If the size requested by the host is smaller than 846 * If the size requested by the host is smaller than
847 * FullSize, the struct will be truncated */ 847 * full_size, the struct will be truncated */
848 848
849 /* Common parameters */ 849 /* Common parameters */
850 u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 850 u32 is_rf_locked; /* 0 - not locked, 1 - locked */
851 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 851 u32 is_demod_locked; /* 0 - not locked, 1 - locked */
852 u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 852 u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
853 853
854 /* Reception quality */ 854 /* Reception quality */
855 s32 SNR; /* dB */ 855 s32 SNR; /* dB */
856 s32 RSSI; /* dBm */ 856 s32 RSSI; /* dBm */
857 s32 InBandPwr; /* In band power in dBM */ 857 s32 in_band_pwr; /* In band power in dBM */
858 s32 CarrierOffset; /* Carrier Offset in Hz */ 858 s32 carrier_offset; /* Carrier Offset in Hz */
859 859
860 /* Transmission parameters */ 860 /* Transmission parameters */
861 u32 Frequency; /* Frequency in Hz */ 861 u32 frequency; /* frequency in Hz */
862 u32 Bandwidth; /* Bandwidth in MHz */ 862 u32 bandwidth; /* bandwidth in MHz */
863 u32 TransmissionMode; /* ISDB-T transmission mode */ 863 u32 transmission_mode; /* ISDB-T transmission mode */
864 u32 ModemState; /* 0 - Acquisition, 1 - Locked */ 864 u32 modem_state; /* 0 - Acquisition, 1 - Locked */
865 u32 GuardInterval; /* Guard Interval, 1 divided by value */ 865 u32 guard_interval; /* Guard Interval, 1 divided by value */
866 u32 SystemType; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */ 866 u32 system_type; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */
867 u32 PartialReception; /* TRUE - partial reception, FALSE otherwise */ 867 u32 partial_reception; /* TRUE - partial reception, FALSE otherwise */
868 u32 NumOfLayers; /* Number of ISDB-T layers in the network */ 868 u32 num_of_layers; /* Number of ISDB-T layers in the network */
869 869
870 u32 SegmentNumber; /* Segment number for ISDB-Tsb */ 870 u32 segment_number; /* Segment number for ISDB-Tsb */
871 u32 TuneBW; /* Tuned bandwidth - BW_ISDBT_1SEG / BW_ISDBT_3SEG */ 871 u32 tune_bw; /* Tuned bandwidth - BW_ISDBT_1SEG / BW_ISDBT_3SEG */
872 872
873 /* Per-layer information */ 873 /* Per-layer information */
874 /* Layers A, B and C */ 874 /* Layers A, B and C */
@@ -876,21 +876,21 @@ struct SMSHOSTLIB_STATISTICS_ISDBT_EX_ST {
876 /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */ 876 /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */
877 877
878 /* Interface information */ 878 /* Interface information */
879 u32 Reserved1; /* Was SmsToHostTxErrors - obsolete . */ 879 u32 reserved1; /* Was sms_to_host_tx_errors - obsolete . */
880 /* Proprietary information */ 880 /* Proprietary information */
881 u32 ExtAntenna; /* Obsolete field. */ 881 u32 ext_antenna; /* Obsolete field. */
882 u32 ReceptionQuality; 882 u32 reception_quality;
883 u32 EwsAlertActive; /* Signals if EWS alert is currently on */ 883 u32 ews_alert_active; /* signals if EWS alert is currently on */
884 u32 LNAOnOff; /* Internal LNA state: 0: OFF, 1: ON */ 884 u32 lna_on_off; /* Internal LNA state: 0: OFF, 1: ON */
885 885
886 u32 RfAgcLevel; /* RF AGC Level [linear units], full gain = 65535 (20dB) */ 886 u32 rf_agc_level; /* RF AGC Level [linear units], full gain = 65535 (20dB) */
887 u32 BbAgcLevel; /* Baseband AGC level [linear units], full gain = 65535 (71.5dB) */ 887 u32 bb_agc_level; /* Baseband AGC level [linear units], full gain = 65535 (71.5dB) */
888 u32 FwErrorsCounter; /* Application errors - should be always zero */ 888 u32 fw_errors_counter; /* Application errors - should be always zero */
889 u8 FwErrorsHistoryArr[8]; /* Last FW errors IDs - first is most recent, last is oldest */ 889 u8 FwErrorsHistoryArr[8]; /* Last FW errors IDs - first is most recent, last is oldest */
890 890
891 s32 MRC_SNR; /* dB */ 891 s32 MRC_SNR; /* dB */
892 u32 SNRFullRes; /* dB x 65536 */ 892 u32 snr_full_res; /* dB x 65536 */
893 u32 Reserved4[4]; 893 u32 reserved4[4];
894}; 894};
895 895
896 896
@@ -916,148 +916,148 @@ struct PID_DATA_S {
916}; 916};
917 917
918#define CORRECT_STAT_RSSI(_stat) ((_stat).RSSI *= -1) 918#define CORRECT_STAT_RSSI(_stat) ((_stat).RSSI *= -1)
919#define CORRECT_STAT_BANDWIDTH(_stat) (_stat.Bandwidth = 8 - _stat.Bandwidth) 919#define CORRECT_STAT_BANDWIDTH(_stat) (_stat.bandwidth = 8 - _stat.bandwidth)
920#define CORRECT_STAT_TRANSMISSON_MODE(_stat) \ 920#define CORRECT_STAT_TRANSMISSON_MODE(_stat) \
921 if (_stat.TransmissionMode == 0) \ 921 if (_stat.transmission_mode == 0) \
922 _stat.TransmissionMode = 2; \ 922 _stat.transmission_mode = 2; \
923 else if (_stat.TransmissionMode == 1) \ 923 else if (_stat.transmission_mode == 1) \
924 _stat.TransmissionMode = 8; \ 924 _stat.transmission_mode = 8; \
925 else \ 925 else \
926 _stat.TransmissionMode = 4; 926 _stat.transmission_mode = 4;
927 927
928struct TRANSMISSION_STATISTICS_S { 928struct TRANSMISSION_STATISTICS_S {
929 u32 Frequency; /* Frequency in Hz */ 929 u32 frequency; /* frequency in Hz */
930 u32 Bandwidth; /* Bandwidth in MHz */ 930 u32 bandwidth; /* bandwidth in MHz */
931 u32 TransmissionMode; /* FFT mode carriers in Kilos */ 931 u32 transmission_mode; /* FFT mode carriers in Kilos */
932 u32 GuardInterval; /* Guard Interval from 932 u32 guard_interval; /* Guard Interval from
933 SMSHOSTLIB_GUARD_INTERVALS_ET */ 933 SMSHOSTLIB_GUARD_INTERVALS_ET */
934 u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */ 934 u32 code_rate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */
935 u32 LPCodeRate; /* Low Priority Code Rate from 935 u32 lp_code_rate; /* Low Priority Code Rate from
936 SMSHOSTLIB_CODE_RATE_ET */ 936 SMSHOSTLIB_CODE_RATE_ET */
937 u32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET */ 937 u32 hierarchy; /* hierarchy from SMSHOSTLIB_HIERARCHY_ET */
938 u32 Constellation; /* Constellation from 938 u32 constellation; /* constellation from
939 SMSHOSTLIB_CONSTELLATION_ET */ 939 SMSHOSTLIB_CONSTELLATION_ET */
940 940
941 /* DVB-H TPS parameters */ 941 /* DVB-H TPS parameters */
942 u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; 942 u32 cell_id; /* TPS Cell ID in bits 15..0, bits 31..16 zero;
943 if set to 0xFFFFFFFF cell_id not yet recovered */ 943 if set to 0xFFFFFFFF cell_id not yet recovered */
944 u32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 - 944 u32 dvbh_srv_ind_hp; /* DVB-H service indication info, bit 1 -
945 Time Slicing indicator, bit 0 - MPE-FEC indicator */ 945 Time Slicing indicator, bit 0 - MPE-FEC indicator */
946 u32 DvbhSrvIndLP; /* DVB-H service indication info, bit 1 - 946 u32 dvbh_srv_ind_lp; /* DVB-H service indication info, bit 1 -
947 Time Slicing indicator, bit 0 - MPE-FEC indicator */ 947 Time Slicing indicator, bit 0 - MPE-FEC indicator */
948 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 948 u32 is_demod_locked; /* 0 - not locked, 1 - locked */
949}; 949};
950 950
951struct RECEPTION_STATISTICS_S { 951struct RECEPTION_STATISTICS_S {
952 u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 952 u32 is_rf_locked; /* 0 - not locked, 1 - locked */
953 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 953 u32 is_demod_locked; /* 0 - not locked, 1 - locked */
954 u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 954 u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
955 955
956 u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 956 u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
957 s32 SNR; /* dB */ 957 s32 SNR; /* dB */
958 u32 BER; /* Post Viterbi BER [1E-5] */ 958 u32 BER; /* Post Viterbi BER [1E-5] */
959 u32 BERErrorCount; /* Number of erronous SYNC bits. */ 959 u32 ber_error_count; /* Number of erronous SYNC bits. */
960 u32 BERBitCount; /* Total number of SYNC bits. */ 960 u32 ber_bit_count; /* Total number of SYNC bits. */
961 u32 TS_PER; /* Transport stream PER, 961 u32 TS_PER; /* Transport stream PER,
962 0xFFFFFFFF indicate N/A */ 962 0xFFFFFFFF indicate N/A */
963 u32 MFER; /* DVB-H frame error rate in percentage, 963 u32 MFER; /* DVB-H frame error rate in percentage,
964 0xFFFFFFFF indicate N/A, valid only for DVB-H */ 964 0xFFFFFFFF indicate N/A, valid only for DVB-H */
965 s32 RSSI; /* dBm */ 965 s32 RSSI; /* dBm */
966 s32 InBandPwr; /* In band power in dBM */ 966 s32 in_band_pwr; /* In band power in dBM */
967 s32 CarrierOffset; /* Carrier Offset in bin/1024 */ 967 s32 carrier_offset; /* Carrier Offset in bin/1024 */
968 u32 ErrorTSPackets; /* Number of erroneous 968 u32 error_ts_packets; /* Number of erroneous
969 transport-stream packets */ 969 transport-stream packets */
970 u32 TotalTSPackets; /* Total number of transport-stream packets */ 970 u32 total_ts_packets; /* Total number of transport-stream packets */
971 971
972 s32 MRC_SNR; /* dB */ 972 s32 MRC_SNR; /* dB */
973 s32 MRC_RSSI; /* dBm */ 973 s32 MRC_RSSI; /* dBm */
974 s32 MRC_InBandPwr; /* In band power in dBM */ 974 s32 mrc_in_band_pwr; /* In band power in dBM */
975}; 975};
976 976
977struct RECEPTION_STATISTICS_EX_S { 977struct RECEPTION_STATISTICS_EX_S {
978 u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 978 u32 is_rf_locked; /* 0 - not locked, 1 - locked */
979 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 979 u32 is_demod_locked; /* 0 - not locked, 1 - locked */
980 u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 980 u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
981 981
982 u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 982 u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
983 s32 SNR; /* dB */ 983 s32 SNR; /* dB */
984 u32 BER; /* Post Viterbi BER [1E-5] */ 984 u32 BER; /* Post Viterbi BER [1E-5] */
985 u32 BERErrorCount; /* Number of erronous SYNC bits. */ 985 u32 ber_error_count; /* Number of erronous SYNC bits. */
986 u32 BERBitCount; /* Total number of SYNC bits. */ 986 u32 ber_bit_count; /* Total number of SYNC bits. */
987 u32 TS_PER; /* Transport stream PER, 987 u32 TS_PER; /* Transport stream PER,
988 0xFFFFFFFF indicate N/A */ 988 0xFFFFFFFF indicate N/A */
989 u32 MFER; /* DVB-H frame error rate in percentage, 989 u32 MFER; /* DVB-H frame error rate in percentage,
990 0xFFFFFFFF indicate N/A, valid only for DVB-H */ 990 0xFFFFFFFF indicate N/A, valid only for DVB-H */
991 s32 RSSI; /* dBm */ 991 s32 RSSI; /* dBm */
992 s32 InBandPwr; /* In band power in dBM */ 992 s32 in_band_pwr; /* In band power in dBM */
993 s32 CarrierOffset; /* Carrier Offset in bin/1024 */ 993 s32 carrier_offset; /* Carrier Offset in bin/1024 */
994 u32 ErrorTSPackets; /* Number of erroneous 994 u32 error_ts_packets; /* Number of erroneous
995 transport-stream packets */ 995 transport-stream packets */
996 u32 TotalTSPackets; /* Total number of transport-stream packets */ 996 u32 total_ts_packets; /* Total number of transport-stream packets */
997 997
998 s32 RefDevPPM; 998 s32 ref_dev_ppm;
999 s32 FreqDevHz; 999 s32 freq_dev_hz;
1000 1000
1001 s32 MRC_SNR; /* dB */ 1001 s32 MRC_SNR; /* dB */
1002 s32 MRC_RSSI; /* dBm */ 1002 s32 MRC_RSSI; /* dBm */
1003 s32 MRC_InBandPwr; /* In band power in dBM */ 1003 s32 mrc_in_band_pwr; /* In band power in dBM */
1004}; 1004};
1005 1005
1006 1006
1007/* Statistics information returned as response for 1007/* statistics information returned as response for
1008 * SmsHostApiGetStatisticsEx_Req for DVB applications, SMS1100 and up */ 1008 * SmsHostApiGetstatisticsEx_Req for DVB applications, SMS1100 and up */
1009struct SMSHOSTLIB_STATISTICS_DVB_S { 1009struct SMSHOSTLIB_STATISTICS_DVB_S {
1010 /* Reception */ 1010 /* Reception */
1011 struct RECEPTION_STATISTICS_S ReceptionData; 1011 struct RECEPTION_STATISTICS_S reception_data;
1012 1012
1013 /* Transmission parameters */ 1013 /* Transmission parameters */
1014 struct TRANSMISSION_STATISTICS_S TransmissionData; 1014 struct TRANSMISSION_STATISTICS_S transmission_data;
1015 1015
1016 /* Burst parameters, valid only for DVB-H */ 1016 /* Burst parameters, valid only for DVB-H */
1017#define SRVM_MAX_PID_FILTERS 8 1017#define SRVM_MAX_PID_FILTERS 8
1018 struct PID_DATA_S PidData[SRVM_MAX_PID_FILTERS]; 1018 struct PID_DATA_S pid_data[SRVM_MAX_PID_FILTERS];
1019}; 1019};
1020 1020
1021/* Statistics information returned as response for 1021/* statistics information returned as response for
1022 * SmsHostApiGetStatisticsEx_Req for DVB applications, SMS1100 and up */ 1022 * SmsHostApiGetstatisticsEx_Req for DVB applications, SMS1100 and up */
1023struct SMSHOSTLIB_STATISTICS_DVB_EX_S { 1023struct SMSHOSTLIB_STATISTICS_DVB_EX_S {
1024 /* Reception */ 1024 /* Reception */
1025 struct RECEPTION_STATISTICS_EX_S ReceptionData; 1025 struct RECEPTION_STATISTICS_EX_S reception_data;
1026 1026
1027 /* Transmission parameters */ 1027 /* Transmission parameters */
1028 struct TRANSMISSION_STATISTICS_S TransmissionData; 1028 struct TRANSMISSION_STATISTICS_S transmission_data;
1029 1029
1030 /* Burst parameters, valid only for DVB-H */ 1030 /* Burst parameters, valid only for DVB-H */
1031#define SRVM_MAX_PID_FILTERS 8 1031#define SRVM_MAX_PID_FILTERS 8
1032 struct PID_DATA_S PidData[SRVM_MAX_PID_FILTERS]; 1032 struct PID_DATA_S pid_data[SRVM_MAX_PID_FILTERS];
1033}; 1033};
1034 1034
1035struct SRVM_SIGNAL_STATUS_S { 1035struct SRVM_SIGNAL_STATUS_S {
1036 u32 result; 1036 u32 result;
1037 u32 snr; 1037 u32 snr;
1038 u32 tsPackets; 1038 u32 ts_packets;
1039 u32 etsPackets; 1039 u32 ets_packets;
1040 u32 constellation; 1040 u32 constellation;
1041 u32 hpCode; 1041 u32 hp_code;
1042 u32 tpsSrvIndLP; 1042 u32 tps_srv_ind_lp;
1043 u32 tpsSrvIndHP; 1043 u32 tps_srv_ind_hp;
1044 u32 cellId; 1044 u32 cell_id;
1045 u32 reason; 1045 u32 reason;
1046 1046
1047 s32 inBandPower; 1047 s32 in_band_power;
1048 u32 requestId; 1048 u32 request_id;
1049}; 1049};
1050 1050
1051struct SMSHOSTLIB_I2C_REQ_ST { 1051struct SMSHOSTLIB_I2C_REQ_ST {
1052 u32 DeviceAddress; /* I2c device address */ 1052 u32 device_address; /* I2c device address */
1053 u32 WriteCount; /* number of bytes to write */ 1053 u32 write_count; /* number of bytes to write */
1054 u32 ReadCount; /* number of bytes to read */ 1054 u32 read_count; /* number of bytes to read */
1055 u8 Data[1]; 1055 u8 Data[1];
1056}; 1056};
1057 1057
1058struct SMSHOSTLIB_I2C_RES_ST { 1058struct SMSHOSTLIB_I2C_RES_ST {
1059 u32 Status; /* non-zero value in case of failure */ 1059 u32 status; /* non-zero value in case of failure */
1060 u32 ReadCount; /* number of bytes read */ 1060 u32 read_count; /* number of bytes read */
1061 u8 Data[1]; 1061 u8 Data[1];
1062}; 1062};
1063 1063
@@ -1154,11 +1154,11 @@ int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
1154int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level); 1154int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level);
1155 1155
1156/* new GPIO management */ 1156/* new GPIO management */
1157extern int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum, 1157extern int smscore_gpio_configure(struct smscore_device_t *coredev, u8 pin_num,
1158 struct smscore_config_gpio *pGpioConfig); 1158 struct smscore_config_gpio *p_gpio_config);
1159extern int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum, 1159extern int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num,
1160 u8 NewLevel); 1160 u8 new_level);
1161extern int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum, 1161extern int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 pin_num,
1162 u8 *level); 1162 u8 *level);
1163 1163
1164void smscore_set_board_id(struct smscore_device_t *core, int id); 1164void smscore_set_board_id(struct smscore_device_t *core, int id);
diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c
index 0219be36c289..5a28506d7bba 100644
--- a/drivers/media/common/siano/smsdvb-debugfs.c
+++ b/drivers/media/common/siano/smsdvb-debugfs.c
@@ -63,11 +63,11 @@ void smsdvb_print_dvb_stats(struct smsdvb_debugfs *debug_data,
63 buf = debug_data->stats_data; 63 buf = debug_data->stats_data;
64 64
65 n += snprintf(&buf[n], PAGE_SIZE - n, 65 n += snprintf(&buf[n], PAGE_SIZE - n,
66 "IsRfLocked = %d\n", p->IsRfLocked); 66 "is_rf_locked = %d\n", p->is_rf_locked);
67 n += snprintf(&buf[n], PAGE_SIZE - n, 67 n += snprintf(&buf[n], PAGE_SIZE - n,
68 "IsDemodLocked = %d\n", p->IsDemodLocked); 68 "is_demod_locked = %d\n", p->is_demod_locked);
69 n += snprintf(&buf[n], PAGE_SIZE - n, 69 n += snprintf(&buf[n], PAGE_SIZE - n,
70 "IsExternalLNAOn = %d\n", p->IsExternalLNAOn); 70 "is_external_lna_on = %d\n", p->is_external_lna_on);
71 n += snprintf(&buf[n], PAGE_SIZE - n, 71 n += snprintf(&buf[n], PAGE_SIZE - n,
72 "SNR = %d\n", p->SNR); 72 "SNR = %d\n", p->SNR);
73 n += snprintf(&buf[n], PAGE_SIZE - n, 73 n += snprintf(&buf[n], PAGE_SIZE - n,
@@ -81,70 +81,70 @@ void smsdvb_print_dvb_stats(struct smsdvb_debugfs *debug_data,
81 n += snprintf(&buf[n], PAGE_SIZE - n, 81 n += snprintf(&buf[n], PAGE_SIZE - n,
82 "RSSI = %d\n", p->RSSI); 82 "RSSI = %d\n", p->RSSI);
83 n += snprintf(&buf[n], PAGE_SIZE - n, 83 n += snprintf(&buf[n], PAGE_SIZE - n,
84 "InBandPwr = %d\n", p->InBandPwr); 84 "in_band_pwr = %d\n", p->in_band_pwr);
85 n += snprintf(&buf[n], PAGE_SIZE - n, 85 n += snprintf(&buf[n], PAGE_SIZE - n,
86 "CarrierOffset = %d\n", p->CarrierOffset); 86 "carrier_offset = %d\n", p->carrier_offset);
87 n += snprintf(&buf[n], PAGE_SIZE - n, 87 n += snprintf(&buf[n], PAGE_SIZE - n,
88 "ModemState = %d\n", p->ModemState); 88 "modem_state = %d\n", p->modem_state);
89 n += snprintf(&buf[n], PAGE_SIZE - n, 89 n += snprintf(&buf[n], PAGE_SIZE - n,
90 "Frequency = %d\n", p->Frequency); 90 "frequency = %d\n", p->frequency);
91 n += snprintf(&buf[n], PAGE_SIZE - n, 91 n += snprintf(&buf[n], PAGE_SIZE - n,
92 "Bandwidth = %d\n", p->Bandwidth); 92 "bandwidth = %d\n", p->bandwidth);
93 n += snprintf(&buf[n], PAGE_SIZE - n, 93 n += snprintf(&buf[n], PAGE_SIZE - n,
94 "TransmissionMode = %d\n", p->TransmissionMode); 94 "transmission_mode = %d\n", p->transmission_mode);
95 n += snprintf(&buf[n], PAGE_SIZE - n, 95 n += snprintf(&buf[n], PAGE_SIZE - n,
96 "ModemState = %d\n", p->ModemState); 96 "modem_state = %d\n", p->modem_state);
97 n += snprintf(&buf[n], PAGE_SIZE - n, 97 n += snprintf(&buf[n], PAGE_SIZE - n,
98 "GuardInterval = %d\n", p->GuardInterval); 98 "guard_interval = %d\n", p->guard_interval);
99 n += snprintf(&buf[n], PAGE_SIZE - n, 99 n += snprintf(&buf[n], PAGE_SIZE - n,
100 "CodeRate = %d\n", p->CodeRate); 100 "code_rate = %d\n", p->code_rate);
101 n += snprintf(&buf[n], PAGE_SIZE - n, 101 n += snprintf(&buf[n], PAGE_SIZE - n,
102 "LPCodeRate = %d\n", p->LPCodeRate); 102 "lp_code_rate = %d\n", p->lp_code_rate);
103 n += snprintf(&buf[n], PAGE_SIZE - n, 103 n += snprintf(&buf[n], PAGE_SIZE - n,
104 "Hierarchy = %d\n", p->Hierarchy); 104 "hierarchy = %d\n", p->hierarchy);
105 n += snprintf(&buf[n], PAGE_SIZE - n, 105 n += snprintf(&buf[n], PAGE_SIZE - n,
106 "Constellation = %d\n", p->Constellation); 106 "constellation = %d\n", p->constellation);
107 n += snprintf(&buf[n], PAGE_SIZE - n, 107 n += snprintf(&buf[n], PAGE_SIZE - n,
108 "BurstSize = %d\n", p->BurstSize); 108 "burst_size = %d\n", p->burst_size);
109 n += snprintf(&buf[n], PAGE_SIZE - n, 109 n += snprintf(&buf[n], PAGE_SIZE - n,
110 "BurstDuration = %d\n", p->BurstDuration); 110 "burst_duration = %d\n", p->burst_duration);
111 n += snprintf(&buf[n], PAGE_SIZE - n, 111 n += snprintf(&buf[n], PAGE_SIZE - n,
112 "BurstCycleTime = %d\n", p->BurstCycleTime); 112 "burst_cycle_time = %d\n", p->burst_cycle_time);
113 n += snprintf(&buf[n], PAGE_SIZE - n, 113 n += snprintf(&buf[n], PAGE_SIZE - n,
114 "CalculatedBurstCycleTime = %d\n", 114 "calc_burst_cycle_time = %d\n",
115 p->CalculatedBurstCycleTime); 115 p->calc_burst_cycle_time);
116 n += snprintf(&buf[n], PAGE_SIZE - n, 116 n += snprintf(&buf[n], PAGE_SIZE - n,
117 "NumOfRows = %d\n", p->NumOfRows); 117 "num_of_rows = %d\n", p->num_of_rows);
118 n += snprintf(&buf[n], PAGE_SIZE - n, 118 n += snprintf(&buf[n], PAGE_SIZE - n,
119 "NumOfPaddCols = %d\n", p->NumOfPaddCols); 119 "num_of_padd_cols = %d\n", p->num_of_padd_cols);
120 n += snprintf(&buf[n], PAGE_SIZE - n, 120 n += snprintf(&buf[n], PAGE_SIZE - n,
121 "NumOfPunctCols = %d\n", p->NumOfPunctCols); 121 "num_of_punct_cols = %d\n", p->num_of_punct_cols);
122 n += snprintf(&buf[n], PAGE_SIZE - n, 122 n += snprintf(&buf[n], PAGE_SIZE - n,
123 "ErrorTSPackets = %d\n", p->ErrorTSPackets); 123 "error_ts_packets = %d\n", p->error_ts_packets);
124 n += snprintf(&buf[n], PAGE_SIZE - n, 124 n += snprintf(&buf[n], PAGE_SIZE - n,
125 "TotalTSPackets = %d\n", p->TotalTSPackets); 125 "total_ts_packets = %d\n", p->total_ts_packets);
126 n += snprintf(&buf[n], PAGE_SIZE - n, 126 n += snprintf(&buf[n], PAGE_SIZE - n,
127 "NumOfValidMpeTlbs = %d\n", p->NumOfValidMpeTlbs); 127 "num_of_valid_mpe_tlbs = %d\n", p->num_of_valid_mpe_tlbs);
128 n += snprintf(&buf[n], PAGE_SIZE - n, 128 n += snprintf(&buf[n], PAGE_SIZE - n,
129 "NumOfInvalidMpeTlbs = %d\n", p->NumOfInvalidMpeTlbs); 129 "num_of_invalid_mpe_tlbs = %d\n", p->num_of_invalid_mpe_tlbs);
130 n += snprintf(&buf[n], PAGE_SIZE - n, 130 n += snprintf(&buf[n], PAGE_SIZE - n,
131 "NumOfCorrectedMpeTlbs = %d\n", p->NumOfCorrectedMpeTlbs); 131 "num_of_corrected_mpe_tlbs = %d\n", p->num_of_corrected_mpe_tlbs);
132 n += snprintf(&buf[n], PAGE_SIZE - n, 132 n += snprintf(&buf[n], PAGE_SIZE - n,
133 "BERErrorCount = %d\n", p->BERErrorCount); 133 "ber_error_count = %d\n", p->ber_error_count);
134 n += snprintf(&buf[n], PAGE_SIZE - n, 134 n += snprintf(&buf[n], PAGE_SIZE - n,
135 "BERBitCount = %d\n", p->BERBitCount); 135 "ber_bit_count = %d\n", p->ber_bit_count);
136 n += snprintf(&buf[n], PAGE_SIZE - n, 136 n += snprintf(&buf[n], PAGE_SIZE - n,
137 "SmsToHostTxErrors = %d\n", p->SmsToHostTxErrors); 137 "sms_to_host_tx_errors = %d\n", p->sms_to_host_tx_errors);
138 n += snprintf(&buf[n], PAGE_SIZE - n, 138 n += snprintf(&buf[n], PAGE_SIZE - n,
139 "PreBER = %d\n", p->PreBER); 139 "pre_ber = %d\n", p->pre_ber);
140 n += snprintf(&buf[n], PAGE_SIZE - n, 140 n += snprintf(&buf[n], PAGE_SIZE - n,
141 "CellId = %d\n", p->CellId); 141 "cell_id = %d\n", p->cell_id);
142 n += snprintf(&buf[n], PAGE_SIZE - n, 142 n += snprintf(&buf[n], PAGE_SIZE - n,
143 "DvbhSrvIndHP = %d\n", p->DvbhSrvIndHP); 143 "dvbh_srv_ind_hp = %d\n", p->dvbh_srv_ind_hp);
144 n += snprintf(&buf[n], PAGE_SIZE - n, 144 n += snprintf(&buf[n], PAGE_SIZE - n,
145 "DvbhSrvIndLP = %d\n", p->DvbhSrvIndLP); 145 "dvbh_srv_ind_lp = %d\n", p->dvbh_srv_ind_lp);
146 n += snprintf(&buf[n], PAGE_SIZE - n, 146 n += snprintf(&buf[n], PAGE_SIZE - n,
147 "NumMPEReceived = %d\n", p->NumMPEReceived); 147 "num_mpe_received = %d\n", p->num_mpe_received);
148 148
149 debug_data->stats_count = n; 149 debug_data->stats_count = n;
150 spin_unlock(&debug_data->lock); 150 spin_unlock(&debug_data->lock);
@@ -166,74 +166,74 @@ void smsdvb_print_isdb_stats(struct smsdvb_debugfs *debug_data,
166 buf = debug_data->stats_data; 166 buf = debug_data->stats_data;
167 167
168 n += snprintf(&buf[n], PAGE_SIZE - n, 168 n += snprintf(&buf[n], PAGE_SIZE - n,
169 "StatisticsType = %d\t", p->StatisticsType); 169 "statistics_type = %d\t", p->statistics_type);
170 n += snprintf(&buf[n], PAGE_SIZE - n, 170 n += snprintf(&buf[n], PAGE_SIZE - n,
171 "FullSize = %d\n", p->FullSize); 171 "full_size = %d\n", p->full_size);
172 172
173 n += snprintf(&buf[n], PAGE_SIZE - n, 173 n += snprintf(&buf[n], PAGE_SIZE - n,
174 "IsRfLocked = %d\t\t", p->IsRfLocked); 174 "is_rf_locked = %d\t\t", p->is_rf_locked);
175 n += snprintf(&buf[n], PAGE_SIZE - n, 175 n += snprintf(&buf[n], PAGE_SIZE - n,
176 "IsDemodLocked = %d\t", p->IsDemodLocked); 176 "is_demod_locked = %d\t", p->is_demod_locked);
177 n += snprintf(&buf[n], PAGE_SIZE - n, 177 n += snprintf(&buf[n], PAGE_SIZE - n,
178 "IsExternalLNAOn = %d\n", p->IsExternalLNAOn); 178 "is_external_lna_on = %d\n", p->is_external_lna_on);
179 n += snprintf(&buf[n], PAGE_SIZE - n, 179 n += snprintf(&buf[n], PAGE_SIZE - n,
180 "SNR = %d dB\t\t", p->SNR); 180 "SNR = %d dB\t\t", p->SNR);
181 n += snprintf(&buf[n], PAGE_SIZE - n, 181 n += snprintf(&buf[n], PAGE_SIZE - n,
182 "RSSI = %d dBm\t\t", p->RSSI); 182 "RSSI = %d dBm\t\t", p->RSSI);
183 n += snprintf(&buf[n], PAGE_SIZE - n, 183 n += snprintf(&buf[n], PAGE_SIZE - n,
184 "InBandPwr = %d dBm\n", p->InBandPwr); 184 "in_band_pwr = %d dBm\n", p->in_band_pwr);
185 n += snprintf(&buf[n], PAGE_SIZE - n, 185 n += snprintf(&buf[n], PAGE_SIZE - n,
186 "CarrierOffset = %d\t", p->CarrierOffset); 186 "carrier_offset = %d\t", p->carrier_offset);
187 n += snprintf(&buf[n], PAGE_SIZE - n, 187 n += snprintf(&buf[n], PAGE_SIZE - n,
188 "Bandwidth = %d\t\t", p->Bandwidth); 188 "bandwidth = %d\t\t", p->bandwidth);
189 n += snprintf(&buf[n], PAGE_SIZE - n, 189 n += snprintf(&buf[n], PAGE_SIZE - n,
190 "Frequency = %d Hz\n", p->Frequency); 190 "frequency = %d Hz\n", p->frequency);
191 n += snprintf(&buf[n], PAGE_SIZE - n, 191 n += snprintf(&buf[n], PAGE_SIZE - n,
192 "TransmissionMode = %d\t", p->TransmissionMode); 192 "transmission_mode = %d\t", p->transmission_mode);
193 n += snprintf(&buf[n], PAGE_SIZE - n, 193 n += snprintf(&buf[n], PAGE_SIZE - n,
194 "ModemState = %d\t\t", p->ModemState); 194 "modem_state = %d\t\t", p->modem_state);
195 n += snprintf(&buf[n], PAGE_SIZE - n, 195 n += snprintf(&buf[n], PAGE_SIZE - n,
196 "GuardInterval = %d\n", p->GuardInterval); 196 "guard_interval = %d\n", p->guard_interval);
197 n += snprintf(&buf[n], PAGE_SIZE - n, 197 n += snprintf(&buf[n], PAGE_SIZE - n,
198 "SystemType = %d\t\t", p->SystemType); 198 "system_type = %d\t\t", p->system_type);
199 n += snprintf(&buf[n], PAGE_SIZE - n, 199 n += snprintf(&buf[n], PAGE_SIZE - n,
200 "PartialReception = %d\t", p->PartialReception); 200 "partial_reception = %d\t", p->partial_reception);
201 n += snprintf(&buf[n], PAGE_SIZE - n, 201 n += snprintf(&buf[n], PAGE_SIZE - n,
202 "NumOfLayers = %d\n", p->NumOfLayers); 202 "num_of_layers = %d\n", p->num_of_layers);
203 n += snprintf(&buf[n], PAGE_SIZE - n, 203 n += snprintf(&buf[n], PAGE_SIZE - n,
204 "SmsToHostTxErrors = %d\n", p->SmsToHostTxErrors); 204 "sms_to_host_tx_errors = %d\n", p->sms_to_host_tx_errors);
205 205
206 for (i = 0; i < 3; i++) { 206 for (i = 0; i < 3; i++) {
207 if (p->LayerInfo[i].NumberOfSegments < 1 || 207 if (p->LayerInfo[i].number_of_segments < 1 ||
208 p->LayerInfo[i].NumberOfSegments > 13) 208 p->LayerInfo[i].number_of_segments > 13)
209 continue; 209 continue;
210 210
211 n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i); 211 n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i);
212 n += snprintf(&buf[n], PAGE_SIZE - n, "\tCodeRate = %d\t", 212 n += snprintf(&buf[n], PAGE_SIZE - n, "\tcode_rate = %d\t",
213 p->LayerInfo[i].CodeRate); 213 p->LayerInfo[i].code_rate);
214 n += snprintf(&buf[n], PAGE_SIZE - n, "Constellation = %d\n", 214 n += snprintf(&buf[n], PAGE_SIZE - n, "constellation = %d\n",
215 p->LayerInfo[i].Constellation); 215 p->LayerInfo[i].constellation);
216 n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t", 216 n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t",
217 p->LayerInfo[i].BER); 217 p->LayerInfo[i].BER);
218 n += snprintf(&buf[n], PAGE_SIZE - n, "\tBERErrorCount = %-5d\t", 218 n += snprintf(&buf[n], PAGE_SIZE - n, "\tber_error_count = %-5d\t",
219 p->LayerInfo[i].BERErrorCount); 219 p->LayerInfo[i].ber_error_count);
220 n += snprintf(&buf[n], PAGE_SIZE - n, "BERBitCount = %-5d\n", 220 n += snprintf(&buf[n], PAGE_SIZE - n, "ber_bit_count = %-5d\n",
221 p->LayerInfo[i].BERBitCount); 221 p->LayerInfo[i].ber_bit_count);
222 n += snprintf(&buf[n], PAGE_SIZE - n, "\tPreBER = %-5d\t", 222 n += snprintf(&buf[n], PAGE_SIZE - n, "\tpre_ber = %-5d\t",
223 p->LayerInfo[i].PreBER); 223 p->LayerInfo[i].pre_ber);
224 n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n", 224 n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n",
225 p->LayerInfo[i].TS_PER); 225 p->LayerInfo[i].TS_PER);
226 n += snprintf(&buf[n], PAGE_SIZE - n, "\tErrorTSPackets = %-5d\t", 226 n += snprintf(&buf[n], PAGE_SIZE - n, "\terror_ts_packets = %-5d\t",
227 p->LayerInfo[i].ErrorTSPackets); 227 p->LayerInfo[i].error_ts_packets);
228 n += snprintf(&buf[n], PAGE_SIZE - n, "TotalTSPackets = %-5d\t", 228 n += snprintf(&buf[n], PAGE_SIZE - n, "total_ts_packets = %-5d\t",
229 p->LayerInfo[i].TotalTSPackets); 229 p->LayerInfo[i].total_ts_packets);
230 n += snprintf(&buf[n], PAGE_SIZE - n, "TILdepthI = %d\n", 230 n += snprintf(&buf[n], PAGE_SIZE - n, "ti_ldepth_i = %d\n",
231 p->LayerInfo[i].TILdepthI); 231 p->LayerInfo[i].ti_ldepth_i);
232 n += snprintf(&buf[n], PAGE_SIZE - n, 232 n += snprintf(&buf[n], PAGE_SIZE - n,
233 "\tNumberOfSegments = %d\t", 233 "\tnumber_of_segments = %d\t",
234 p->LayerInfo[i].NumberOfSegments); 234 p->LayerInfo[i].number_of_segments);
235 n += snprintf(&buf[n], PAGE_SIZE - n, "TMCCErrors = %d\n", 235 n += snprintf(&buf[n], PAGE_SIZE - n, "tmcc_errors = %d\n",
236 p->LayerInfo[i].TMCCErrors); 236 p->LayerInfo[i].tmcc_errors);
237 } 237 }
238 238
239 debug_data->stats_count = n; 239 debug_data->stats_count = n;
@@ -256,76 +256,76 @@ void smsdvb_print_isdb_stats_ex(struct smsdvb_debugfs *debug_data,
256 buf = debug_data->stats_data; 256 buf = debug_data->stats_data;
257 257
258 n += snprintf(&buf[n], PAGE_SIZE - n, 258 n += snprintf(&buf[n], PAGE_SIZE - n,
259 "StatisticsType = %d\t", p->StatisticsType); 259 "statistics_type = %d\t", p->statistics_type);
260 n += snprintf(&buf[n], PAGE_SIZE - n, 260 n += snprintf(&buf[n], PAGE_SIZE - n,
261 "FullSize = %d\n", p->FullSize); 261 "full_size = %d\n", p->full_size);
262 262
263 n += snprintf(&buf[n], PAGE_SIZE - n, 263 n += snprintf(&buf[n], PAGE_SIZE - n,
264 "IsRfLocked = %d\t\t", p->IsRfLocked); 264 "is_rf_locked = %d\t\t", p->is_rf_locked);
265 n += snprintf(&buf[n], PAGE_SIZE - n, 265 n += snprintf(&buf[n], PAGE_SIZE - n,
266 "IsDemodLocked = %d\t", p->IsDemodLocked); 266 "is_demod_locked = %d\t", p->is_demod_locked);
267 n += snprintf(&buf[n], PAGE_SIZE - n, 267 n += snprintf(&buf[n], PAGE_SIZE - n,
268 "IsExternalLNAOn = %d\n", p->IsExternalLNAOn); 268 "is_external_lna_on = %d\n", p->is_external_lna_on);
269 n += snprintf(&buf[n], PAGE_SIZE - n, 269 n += snprintf(&buf[n], PAGE_SIZE - n,
270 "SNR = %d dB\t\t", p->SNR); 270 "SNR = %d dB\t\t", p->SNR);
271 n += snprintf(&buf[n], PAGE_SIZE - n, 271 n += snprintf(&buf[n], PAGE_SIZE - n,
272 "RSSI = %d dBm\t\t", p->RSSI); 272 "RSSI = %d dBm\t\t", p->RSSI);
273 n += snprintf(&buf[n], PAGE_SIZE - n, 273 n += snprintf(&buf[n], PAGE_SIZE - n,
274 "InBandPwr = %d dBm\n", p->InBandPwr); 274 "in_band_pwr = %d dBm\n", p->in_band_pwr);
275 n += snprintf(&buf[n], PAGE_SIZE - n, 275 n += snprintf(&buf[n], PAGE_SIZE - n,
276 "CarrierOffset = %d\t", p->CarrierOffset); 276 "carrier_offset = %d\t", p->carrier_offset);
277 n += snprintf(&buf[n], PAGE_SIZE - n, 277 n += snprintf(&buf[n], PAGE_SIZE - n,
278 "Bandwidth = %d\t\t", p->Bandwidth); 278 "bandwidth = %d\t\t", p->bandwidth);
279 n += snprintf(&buf[n], PAGE_SIZE - n, 279 n += snprintf(&buf[n], PAGE_SIZE - n,
280 "Frequency = %d Hz\n", p->Frequency); 280 "frequency = %d Hz\n", p->frequency);
281 n += snprintf(&buf[n], PAGE_SIZE - n, 281 n += snprintf(&buf[n], PAGE_SIZE - n,
282 "TransmissionMode = %d\t", p->TransmissionMode); 282 "transmission_mode = %d\t", p->transmission_mode);
283 n += snprintf(&buf[n], PAGE_SIZE - n, 283 n += snprintf(&buf[n], PAGE_SIZE - n,
284 "ModemState = %d\t\t", p->ModemState); 284 "modem_state = %d\t\t", p->modem_state);
285 n += snprintf(&buf[n], PAGE_SIZE - n, 285 n += snprintf(&buf[n], PAGE_SIZE - n,
286 "GuardInterval = %d\n", p->GuardInterval); 286 "guard_interval = %d\n", p->guard_interval);
287 n += snprintf(&buf[n], PAGE_SIZE - n, 287 n += snprintf(&buf[n], PAGE_SIZE - n,
288 "SystemType = %d\t\t", p->SystemType); 288 "system_type = %d\t\t", p->system_type);
289 n += snprintf(&buf[n], PAGE_SIZE - n, 289 n += snprintf(&buf[n], PAGE_SIZE - n,
290 "PartialReception = %d\t", p->PartialReception); 290 "partial_reception = %d\t", p->partial_reception);
291 n += snprintf(&buf[n], PAGE_SIZE - n, 291 n += snprintf(&buf[n], PAGE_SIZE - n,
292 "NumOfLayers = %d\n", p->NumOfLayers); 292 "num_of_layers = %d\n", p->num_of_layers);
293 n += snprintf(&buf[n], PAGE_SIZE - n, "SegmentNumber = %d\t", 293 n += snprintf(&buf[n], PAGE_SIZE - n, "segment_number = %d\t",
294 p->SegmentNumber); 294 p->segment_number);
295 n += snprintf(&buf[n], PAGE_SIZE - n, "TuneBW = %d\n", 295 n += snprintf(&buf[n], PAGE_SIZE - n, "tune_bw = %d\n",
296 p->TuneBW); 296 p->tune_bw);
297 297
298 for (i = 0; i < 3; i++) { 298 for (i = 0; i < 3; i++) {
299 if (p->LayerInfo[i].NumberOfSegments < 1 || 299 if (p->LayerInfo[i].number_of_segments < 1 ||
300 p->LayerInfo[i].NumberOfSegments > 13) 300 p->LayerInfo[i].number_of_segments > 13)
301 continue; 301 continue;
302 302
303 n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i); 303 n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i);
304 n += snprintf(&buf[n], PAGE_SIZE - n, "\tCodeRate = %d\t", 304 n += snprintf(&buf[n], PAGE_SIZE - n, "\tcode_rate = %d\t",
305 p->LayerInfo[i].CodeRate); 305 p->LayerInfo[i].code_rate);
306 n += snprintf(&buf[n], PAGE_SIZE - n, "Constellation = %d\n", 306 n += snprintf(&buf[n], PAGE_SIZE - n, "constellation = %d\n",
307 p->LayerInfo[i].Constellation); 307 p->LayerInfo[i].constellation);
308 n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t", 308 n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t",
309 p->LayerInfo[i].BER); 309 p->LayerInfo[i].BER);
310 n += snprintf(&buf[n], PAGE_SIZE - n, "\tBERErrorCount = %-5d\t", 310 n += snprintf(&buf[n], PAGE_SIZE - n, "\tber_error_count = %-5d\t",
311 p->LayerInfo[i].BERErrorCount); 311 p->LayerInfo[i].ber_error_count);
312 n += snprintf(&buf[n], PAGE_SIZE - n, "BERBitCount = %-5d\n", 312 n += snprintf(&buf[n], PAGE_SIZE - n, "ber_bit_count = %-5d\n",
313 p->LayerInfo[i].BERBitCount); 313 p->LayerInfo[i].ber_bit_count);
314 n += snprintf(&buf[n], PAGE_SIZE - n, "\tPreBER = %-5d\t", 314 n += snprintf(&buf[n], PAGE_SIZE - n, "\tpre_ber = %-5d\t",
315 p->LayerInfo[i].PreBER); 315 p->LayerInfo[i].pre_ber);
316 n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n", 316 n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n",
317 p->LayerInfo[i].TS_PER); 317 p->LayerInfo[i].TS_PER);
318 n += snprintf(&buf[n], PAGE_SIZE - n, "\tErrorTSPackets = %-5d\t", 318 n += snprintf(&buf[n], PAGE_SIZE - n, "\terror_ts_packets = %-5d\t",
319 p->LayerInfo[i].ErrorTSPackets); 319 p->LayerInfo[i].error_ts_packets);
320 n += snprintf(&buf[n], PAGE_SIZE - n, "TotalTSPackets = %-5d\t", 320 n += snprintf(&buf[n], PAGE_SIZE - n, "total_ts_packets = %-5d\t",
321 p->LayerInfo[i].TotalTSPackets); 321 p->LayerInfo[i].total_ts_packets);
322 n += snprintf(&buf[n], PAGE_SIZE - n, "TILdepthI = %d\n", 322 n += snprintf(&buf[n], PAGE_SIZE - n, "ti_ldepth_i = %d\n",
323 p->LayerInfo[i].TILdepthI); 323 p->LayerInfo[i].ti_ldepth_i);
324 n += snprintf(&buf[n], PAGE_SIZE - n, 324 n += snprintf(&buf[n], PAGE_SIZE - n,
325 "\tNumberOfSegments = %d\t", 325 "\tnumber_of_segments = %d\t",
326 p->LayerInfo[i].NumberOfSegments); 326 p->LayerInfo[i].number_of_segments);
327 n += snprintf(&buf[n], PAGE_SIZE - n, "TMCCErrors = %d\n", 327 n += snprintf(&buf[n], PAGE_SIZE - n, "tmcc_errors = %d\n",
328 p->LayerInfo[i].TMCCErrors); 328 p->LayerInfo[i].tmcc_errors);
329 } 329 }
330 330
331 331
diff --git a/drivers/media/common/siano/smsdvb-main.c b/drivers/media/common/siano/smsdvb-main.c
index a2882f5cfdd0..cec85fef2a1b 100644
--- a/drivers/media/common/siano/smsdvb-main.c
+++ b/drivers/media/common/siano/smsdvb-main.c
@@ -228,15 +228,15 @@ static void smsdvb_update_tx_params(struct smsdvb_client_t *client,
228 struct dvb_frontend *fe = &client->frontend; 228 struct dvb_frontend *fe = &client->frontend;
229 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 229 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
230 230
231 c->frequency = p->Frequency; 231 c->frequency = p->frequency;
232 client->fe_status = sms_to_status(p->IsDemodLocked, 0); 232 client->fe_status = sms_to_status(p->is_demod_locked, 0);
233 c->bandwidth_hz = sms_to_bw(p->Bandwidth); 233 c->bandwidth_hz = sms_to_bw(p->bandwidth);
234 c->transmission_mode = sms_to_mode(p->TransmissionMode); 234 c->transmission_mode = sms_to_mode(p->transmission_mode);
235 c->guard_interval = sms_to_guard_interval(p->GuardInterval); 235 c->guard_interval = sms_to_guard_interval(p->guard_interval);
236 c->code_rate_HP = sms_to_code_rate(p->CodeRate); 236 c->code_rate_HP = sms_to_code_rate(p->code_rate);
237 c->code_rate_LP = sms_to_code_rate(p->LPCodeRate); 237 c->code_rate_LP = sms_to_code_rate(p->lp_code_rate);
238 c->hierarchy = sms_to_hierarchy(p->Hierarchy); 238 c->hierarchy = sms_to_hierarchy(p->hierarchy);
239 c->modulation = sms_to_modulation(p->Constellation); 239 c->modulation = sms_to_modulation(p->constellation);
240} 240}
241 241
242static void smsdvb_update_per_slices(struct smsdvb_client_t *client, 242static void smsdvb_update_per_slices(struct smsdvb_client_t *client,
@@ -245,35 +245,35 @@ static void smsdvb_update_per_slices(struct smsdvb_client_t *client,
245 struct dvb_frontend *fe = &client->frontend; 245 struct dvb_frontend *fe = &client->frontend;
246 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 246 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
247 247
248 client->fe_status = sms_to_status(p->IsDemodLocked, p->IsRfLocked); 248 client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked);
249 c->modulation = sms_to_modulation(p->constellation); 249 c->modulation = sms_to_modulation(p->constellation);
250 250
251 /* Signal Strength, in DBm */ 251 /* signal Strength, in DBm */
252 c->strength.stat[0].uvalue = p->inBandPower * 1000; 252 c->strength.stat[0].uvalue = p->in_band_power * 1000;
253 253
254 /* Carrier to Noise ratio, in DB */ 254 /* Carrier to noise ratio, in DB */
255 c->cnr.stat[0].svalue = p->snr * 1000; 255 c->cnr.stat[0].svalue = p->snr * 1000;
256 256
257 /* PER/BER requires demod lock */ 257 /* PER/BER requires demod lock */
258 if (!p->IsDemodLocked) 258 if (!p->is_demod_locked)
259 return; 259 return;
260 260
261 /* TS PER */ 261 /* TS PER */
262 client->last_per = c->block_error.stat[0].uvalue; 262 client->last_per = c->block_error.stat[0].uvalue;
263 c->block_error.stat[0].scale = FE_SCALE_COUNTER; 263 c->block_error.stat[0].scale = FE_SCALE_COUNTER;
264 c->block_count.stat[0].scale = FE_SCALE_COUNTER; 264 c->block_count.stat[0].scale = FE_SCALE_COUNTER;
265 c->block_error.stat[0].uvalue += p->etsPackets; 265 c->block_error.stat[0].uvalue += p->ets_packets;
266 c->block_count.stat[0].uvalue += p->etsPackets + p->tsPackets; 266 c->block_count.stat[0].uvalue += p->ets_packets + p->ts_packets;
267 267
268 /* BER */ 268 /* BER */
269 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER; 269 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
270 c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER; 270 c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER;
271 c->post_bit_error.stat[0].uvalue += p->BERErrorCount; 271 c->post_bit_error.stat[0].uvalue += p->ber_error_count;
272 c->post_bit_count.stat[0].uvalue += p->BERBitCount; 272 c->post_bit_count.stat[0].uvalue += p->ber_bit_count;
273 273
274 /* Legacy PER/BER */ 274 /* Legacy PER/BER */
275 client->legacy_per = (p->etsPackets * 65535) / 275 client->legacy_per = (p->ets_packets * 65535) /
276 (p->tsPackets + p->etsPackets); 276 (p->ts_packets + p->ets_packets);
277} 277}
278 278
279static void smsdvb_update_dvb_stats(struct smsdvb_client_t *client, 279static void smsdvb_update_dvb_stats(struct smsdvb_client_t *client,
@@ -285,44 +285,44 @@ static void smsdvb_update_dvb_stats(struct smsdvb_client_t *client,
285 if (client->prt_dvb_stats) 285 if (client->prt_dvb_stats)
286 client->prt_dvb_stats(client->debug_data, p); 286 client->prt_dvb_stats(client->debug_data, p);
287 287
288 client->fe_status = sms_to_status(p->IsDemodLocked, p->IsRfLocked); 288 client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked);
289 289
290 /* Update DVB modulation parameters */ 290 /* Update DVB modulation parameters */
291 c->frequency = p->Frequency; 291 c->frequency = p->frequency;
292 client->fe_status = sms_to_status(p->IsDemodLocked, 0); 292 client->fe_status = sms_to_status(p->is_demod_locked, 0);
293 c->bandwidth_hz = sms_to_bw(p->Bandwidth); 293 c->bandwidth_hz = sms_to_bw(p->bandwidth);
294 c->transmission_mode = sms_to_mode(p->TransmissionMode); 294 c->transmission_mode = sms_to_mode(p->transmission_mode);
295 c->guard_interval = sms_to_guard_interval(p->GuardInterval); 295 c->guard_interval = sms_to_guard_interval(p->guard_interval);
296 c->code_rate_HP = sms_to_code_rate(p->CodeRate); 296 c->code_rate_HP = sms_to_code_rate(p->code_rate);
297 c->code_rate_LP = sms_to_code_rate(p->LPCodeRate); 297 c->code_rate_LP = sms_to_code_rate(p->lp_code_rate);
298 c->hierarchy = sms_to_hierarchy(p->Hierarchy); 298 c->hierarchy = sms_to_hierarchy(p->hierarchy);
299 c->modulation = sms_to_modulation(p->Constellation); 299 c->modulation = sms_to_modulation(p->constellation);
300 300
301 /* update reception data */ 301 /* update reception data */
302 c->lna = p->IsExternalLNAOn ? 1 : 0; 302 c->lna = p->is_external_lna_on ? 1 : 0;
303 303
304 /* Carrier to Noise ratio, in DB */ 304 /* Carrier to noise ratio, in DB */
305 c->cnr.stat[0].svalue = p->SNR * 1000; 305 c->cnr.stat[0].svalue = p->SNR * 1000;
306 306
307 /* Signal Strength, in DBm */ 307 /* signal Strength, in DBm */
308 c->strength.stat[0].uvalue = p->InBandPwr * 1000; 308 c->strength.stat[0].uvalue = p->in_band_pwr * 1000;
309 309
310 /* PER/BER requires demod lock */ 310 /* PER/BER requires demod lock */
311 if (!p->IsDemodLocked) 311 if (!p->is_demod_locked)
312 return; 312 return;
313 313
314 /* TS PER */ 314 /* TS PER */
315 client->last_per = c->block_error.stat[0].uvalue; 315 client->last_per = c->block_error.stat[0].uvalue;
316 c->block_error.stat[0].scale = FE_SCALE_COUNTER; 316 c->block_error.stat[0].scale = FE_SCALE_COUNTER;
317 c->block_count.stat[0].scale = FE_SCALE_COUNTER; 317 c->block_count.stat[0].scale = FE_SCALE_COUNTER;
318 c->block_error.stat[0].uvalue += p->ErrorTSPackets; 318 c->block_error.stat[0].uvalue += p->error_ts_packets;
319 c->block_count.stat[0].uvalue += p->TotalTSPackets; 319 c->block_count.stat[0].uvalue += p->total_ts_packets;
320 320
321 /* BER */ 321 /* BER */
322 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER; 322 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
323 c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER; 323 c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER;
324 c->post_bit_error.stat[0].uvalue += p->BERErrorCount; 324 c->post_bit_error.stat[0].uvalue += p->ber_error_count;
325 c->post_bit_count.stat[0].uvalue += p->BERBitCount; 325 c->post_bit_count.stat[0].uvalue += p->ber_bit_count;
326 326
327 /* Legacy PER/BER */ 327 /* Legacy PER/BER */
328 client->legacy_ber = p->BER; 328 client->legacy_ber = p->BER;
@@ -339,26 +339,26 @@ static void smsdvb_update_isdbt_stats(struct smsdvb_client_t *client,
339 if (client->prt_isdb_stats) 339 if (client->prt_isdb_stats)
340 client->prt_isdb_stats(client->debug_data, p); 340 client->prt_isdb_stats(client->debug_data, p);
341 341
342 client->fe_status = sms_to_status(p->IsDemodLocked, p->IsRfLocked); 342 client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked);
343 343
344 /* 344 /*
345 * Firmware 2.1 seems to report only lock status and 345 * Firmware 2.1 seems to report only lock status and
346 * Signal strength. The signal strength indicator is at the 346 * signal strength. The signal strength indicator is at the
347 * wrong field. 347 * wrong field.
348 */ 348 */
349 if (p->StatisticsType == 0) { 349 if (p->statistics_type == 0) {
350 c->strength.stat[0].uvalue = ((s32)p->TransmissionMode) * 1000; 350 c->strength.stat[0].uvalue = ((s32)p->transmission_mode) * 1000;
351 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE; 351 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
352 return; 352 return;
353 } 353 }
354 354
355 /* Update ISDB-T transmission parameters */ 355 /* Update ISDB-T transmission parameters */
356 c->frequency = p->Frequency; 356 c->frequency = p->frequency;
357 c->bandwidth_hz = sms_to_bw(p->Bandwidth); 357 c->bandwidth_hz = sms_to_bw(p->bandwidth);
358 c->transmission_mode = sms_to_mode(p->TransmissionMode); 358 c->transmission_mode = sms_to_mode(p->transmission_mode);
359 c->guard_interval = sms_to_guard_interval(p->GuardInterval); 359 c->guard_interval = sms_to_guard_interval(p->guard_interval);
360 c->isdbt_partial_reception = p->PartialReception ? 1 : 0; 360 c->isdbt_partial_reception = p->partial_reception ? 1 : 0;
361 n_layers = p->NumOfLayers; 361 n_layers = p->num_of_layers;
362 if (n_layers < 1) 362 if (n_layers < 1)
363 n_layers = 1; 363 n_layers = 1;
364 if (n_layers > 3) 364 if (n_layers > 3)
@@ -366,16 +366,16 @@ static void smsdvb_update_isdbt_stats(struct smsdvb_client_t *client,
366 c->isdbt_layer_enabled = 0; 366 c->isdbt_layer_enabled = 0;
367 367
368 /* update reception data */ 368 /* update reception data */
369 c->lna = p->IsExternalLNAOn ? 1 : 0; 369 c->lna = p->is_external_lna_on ? 1 : 0;
370 370
371 /* Carrier to Noise ratio, in DB */ 371 /* Carrier to noise ratio, in DB */
372 c->cnr.stat[0].svalue = p->SNR * 1000; 372 c->cnr.stat[0].svalue = p->SNR * 1000;
373 373
374 /* Signal Strength, in DBm */ 374 /* signal Strength, in DBm */
375 c->strength.stat[0].uvalue = p->InBandPwr * 1000; 375 c->strength.stat[0].uvalue = p->in_band_pwr * 1000;
376 376
377 /* PER/BER and per-layer stats require demod lock */ 377 /* PER/BER and per-layer stats require demod lock */
378 if (!p->IsDemodLocked) 378 if (!p->is_demod_locked)
379 return; 379 return;
380 380
381 client->last_per = c->block_error.stat[0].uvalue; 381 client->last_per = c->block_error.stat[0].uvalue;
@@ -394,33 +394,33 @@ static void smsdvb_update_isdbt_stats(struct smsdvb_client_t *client,
394 lr = &p->LayerInfo[i]; 394 lr = &p->LayerInfo[i];
395 395
396 /* Update per-layer transmission parameters */ 396 /* Update per-layer transmission parameters */
397 if (lr->NumberOfSegments > 0 && lr->NumberOfSegments < 13) { 397 if (lr->number_of_segments > 0 && lr->number_of_segments < 13) {
398 c->isdbt_layer_enabled |= 1 << i; 398 c->isdbt_layer_enabled |= 1 << i;
399 c->layer[i].segment_count = lr->NumberOfSegments; 399 c->layer[i].segment_count = lr->number_of_segments;
400 } else { 400 } else {
401 continue; 401 continue;
402 } 402 }
403 c->layer[i].modulation = sms_to_modulation(lr->Constellation); 403 c->layer[i].modulation = sms_to_modulation(lr->constellation);
404 404
405 /* TS PER */ 405 /* TS PER */
406 c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER; 406 c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER;
407 c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER; 407 c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER;
408 c->block_error.stat[i + 1].uvalue += lr->ErrorTSPackets; 408 c->block_error.stat[i + 1].uvalue += lr->error_ts_packets;
409 c->block_count.stat[i + 1].uvalue += lr->TotalTSPackets; 409 c->block_count.stat[i + 1].uvalue += lr->total_ts_packets;
410 410
411 /* Update global PER counter */ 411 /* Update global PER counter */
412 c->block_error.stat[0].uvalue += lr->ErrorTSPackets; 412 c->block_error.stat[0].uvalue += lr->error_ts_packets;
413 c->block_count.stat[0].uvalue += lr->TotalTSPackets; 413 c->block_count.stat[0].uvalue += lr->total_ts_packets;
414 414
415 /* BER */ 415 /* BER */
416 c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER; 416 c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER;
417 c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER; 417 c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER;
418 c->post_bit_error.stat[i + 1].uvalue += lr->BERErrorCount; 418 c->post_bit_error.stat[i + 1].uvalue += lr->ber_error_count;
419 c->post_bit_count.stat[i + 1].uvalue += lr->BERBitCount; 419 c->post_bit_count.stat[i + 1].uvalue += lr->ber_bit_count;
420 420
421 /* Update global BER counter */ 421 /* Update global BER counter */
422 c->post_bit_error.stat[0].uvalue += lr->BERErrorCount; 422 c->post_bit_error.stat[0].uvalue += lr->ber_error_count;
423 c->post_bit_count.stat[0].uvalue += lr->BERBitCount; 423 c->post_bit_count.stat[0].uvalue += lr->ber_bit_count;
424 } 424 }
425} 425}
426 426
@@ -436,13 +436,13 @@ static void smsdvb_update_isdbt_stats_ex(struct smsdvb_client_t *client,
436 client->prt_isdb_stats_ex(client->debug_data, p); 436 client->prt_isdb_stats_ex(client->debug_data, p);
437 437
438 /* Update ISDB-T transmission parameters */ 438 /* Update ISDB-T transmission parameters */
439 c->frequency = p->Frequency; 439 c->frequency = p->frequency;
440 client->fe_status = sms_to_status(p->IsDemodLocked, 0); 440 client->fe_status = sms_to_status(p->is_demod_locked, 0);
441 c->bandwidth_hz = sms_to_bw(p->Bandwidth); 441 c->bandwidth_hz = sms_to_bw(p->bandwidth);
442 c->transmission_mode = sms_to_mode(p->TransmissionMode); 442 c->transmission_mode = sms_to_mode(p->transmission_mode);
443 c->guard_interval = sms_to_guard_interval(p->GuardInterval); 443 c->guard_interval = sms_to_guard_interval(p->guard_interval);
444 c->isdbt_partial_reception = p->PartialReception ? 1 : 0; 444 c->isdbt_partial_reception = p->partial_reception ? 1 : 0;
445 n_layers = p->NumOfLayers; 445 n_layers = p->num_of_layers;
446 if (n_layers < 1) 446 if (n_layers < 1)
447 n_layers = 1; 447 n_layers = 1;
448 if (n_layers > 3) 448 if (n_layers > 3)
@@ -450,16 +450,16 @@ static void smsdvb_update_isdbt_stats_ex(struct smsdvb_client_t *client,
450 c->isdbt_layer_enabled = 0; 450 c->isdbt_layer_enabled = 0;
451 451
452 /* update reception data */ 452 /* update reception data */
453 c->lna = p->IsExternalLNAOn ? 1 : 0; 453 c->lna = p->is_external_lna_on ? 1 : 0;
454 454
455 /* Carrier to Noise ratio, in DB */ 455 /* Carrier to noise ratio, in DB */
456 c->cnr.stat[0].svalue = p->SNR * 1000; 456 c->cnr.stat[0].svalue = p->SNR * 1000;
457 457
458 /* Signal Strength, in DBm */ 458 /* signal Strength, in DBm */
459 c->strength.stat[0].uvalue = p->InBandPwr * 1000; 459 c->strength.stat[0].uvalue = p->in_band_pwr * 1000;
460 460
461 /* PER/BER and per-layer stats require demod lock */ 461 /* PER/BER and per-layer stats require demod lock */
462 if (!p->IsDemodLocked) 462 if (!p->is_demod_locked)
463 return; 463 return;
464 464
465 client->last_per = c->block_error.stat[0].uvalue; 465 client->last_per = c->block_error.stat[0].uvalue;
@@ -482,47 +482,47 @@ static void smsdvb_update_isdbt_stats_ex(struct smsdvb_client_t *client,
482 lr = &p->LayerInfo[i]; 482 lr = &p->LayerInfo[i];
483 483
484 /* Update per-layer transmission parameters */ 484 /* Update per-layer transmission parameters */
485 if (lr->NumberOfSegments > 0 && lr->NumberOfSegments < 13) { 485 if (lr->number_of_segments > 0 && lr->number_of_segments < 13) {
486 c->isdbt_layer_enabled |= 1 << i; 486 c->isdbt_layer_enabled |= 1 << i;
487 c->layer[i].segment_count = lr->NumberOfSegments; 487 c->layer[i].segment_count = lr->number_of_segments;
488 } else { 488 } else {
489 continue; 489 continue;
490 } 490 }
491 c->layer[i].modulation = sms_to_modulation(lr->Constellation); 491 c->layer[i].modulation = sms_to_modulation(lr->constellation);
492 492
493 /* TS PER */ 493 /* TS PER */
494 c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER; 494 c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER;
495 c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER; 495 c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER;
496 c->block_error.stat[i + 1].uvalue += lr->ErrorTSPackets; 496 c->block_error.stat[i + 1].uvalue += lr->error_ts_packets;
497 c->block_count.stat[i + 1].uvalue += lr->TotalTSPackets; 497 c->block_count.stat[i + 1].uvalue += lr->total_ts_packets;
498 498
499 /* Update global PER counter */ 499 /* Update global PER counter */
500 c->block_error.stat[0].uvalue += lr->ErrorTSPackets; 500 c->block_error.stat[0].uvalue += lr->error_ts_packets;
501 c->block_count.stat[0].uvalue += lr->TotalTSPackets; 501 c->block_count.stat[0].uvalue += lr->total_ts_packets;
502 502
503 /* BER */ 503 /* BER */
504 c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER; 504 c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER;
505 c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER; 505 c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER;
506 c->post_bit_error.stat[i + 1].uvalue += lr->BERErrorCount; 506 c->post_bit_error.stat[i + 1].uvalue += lr->ber_error_count;
507 c->post_bit_count.stat[i + 1].uvalue += lr->BERBitCount; 507 c->post_bit_count.stat[i + 1].uvalue += lr->ber_bit_count;
508 508
509 /* Update global BER counter */ 509 /* Update global BER counter */
510 c->post_bit_error.stat[0].uvalue += lr->BERErrorCount; 510 c->post_bit_error.stat[0].uvalue += lr->ber_error_count;
511 c->post_bit_count.stat[0].uvalue += lr->BERBitCount; 511 c->post_bit_count.stat[0].uvalue += lr->ber_bit_count;
512 } 512 }
513} 513}
514 514
515static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) 515static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
516{ 516{
517 struct smsdvb_client_t *client = (struct smsdvb_client_t *) context; 517 struct smsdvb_client_t *client = (struct smsdvb_client_t *) context;
518 struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) (((u8 *) cb->p) 518 struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) (((u8 *) cb->p)
519 + cb->offset); 519 + cb->offset);
520 void *p = phdr + 1; 520 void *p = phdr + 1;
521 struct dvb_frontend *fe = &client->frontend; 521 struct dvb_frontend *fe = &client->frontend;
522 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 522 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
523 bool is_status_update = false; 523 bool is_status_update = false;
524 524
525 switch (phdr->msgType) { 525 switch (phdr->msg_type) {
526 case MSG_SMS_DVBT_BDA_DATA: 526 case MSG_SMS_DVBT_BDA_DATA:
527 /* 527 /*
528 * Only feed data to dvb demux if are there any feed listening 528 * Only feed data to dvb demux if are there any feed listening
@@ -530,7 +530,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
530 */ 530 */
531 if (client->feed_users && client->has_tuned) 531 if (client->feed_users && client->has_tuned)
532 dvb_dmx_swfilter(&client->demux, p, 532 dvb_dmx_swfilter(&client->demux, p,
533 cb->size - sizeof(struct SmsMsgHdr_ST)); 533 cb->size - sizeof(struct sms_msg_hdr));
534 break; 534 break;
535 535
536 case MSG_SMS_RF_TUNE_RES: 536 case MSG_SMS_RF_TUNE_RES:
@@ -571,7 +571,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
571 smsdvb_update_isdbt_stats(client, p); 571 smsdvb_update_isdbt_stats(client, p);
572 break; 572 break;
573 default: 573 default:
574 /* Skip SmsMsgStatisticsInfo_ST:RequestResult field */ 574 /* Skip sms_msg_statistics_info:request_result field */
575 smsdvb_update_dvb_stats(client, p + sizeof(u32)); 575 smsdvb_update_dvb_stats(client, p + sizeof(u32));
576 } 576 }
577 577
@@ -580,7 +580,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
580 580
581 /* Only for ISDB-T */ 581 /* Only for ISDB-T */
582 case MSG_SMS_GET_STATISTICS_EX_RES: 582 case MSG_SMS_GET_STATISTICS_EX_RES:
583 /* Skip SmsMsgStatisticsInfo_ST:RequestResult field? */ 583 /* Skip sms_msg_statistics_info:request_result field? */
584 smsdvb_update_isdbt_stats_ex(client, p + sizeof(u32)); 584 smsdvb_update_isdbt_stats_ex(client, p + sizeof(u32));
585 is_status_update = true; 585 is_status_update = true;
586 break; 586 break;
@@ -636,18 +636,18 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed)
636{ 636{
637 struct smsdvb_client_t *client = 637 struct smsdvb_client_t *client =
638 container_of(feed->demux, struct smsdvb_client_t, demux); 638 container_of(feed->demux, struct smsdvb_client_t, demux);
639 struct SmsMsgData_ST PidMsg; 639 struct sms_msg_data PidMsg;
640 640
641 sms_debug("add pid %d(%x)", 641 sms_debug("add pid %d(%x)",
642 feed->pid, feed->pid); 642 feed->pid, feed->pid);
643 643
644 client->feed_users++; 644 client->feed_users++;
645 645
646 PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 646 PidMsg.x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
647 PidMsg.xMsgHeader.msgDstId = HIF_TASK; 647 PidMsg.x_msg_header.msg_dst_id = HIF_TASK;
648 PidMsg.xMsgHeader.msgFlags = 0; 648 PidMsg.x_msg_header.msg_flags = 0;
649 PidMsg.xMsgHeader.msgType = MSG_SMS_ADD_PID_FILTER_REQ; 649 PidMsg.x_msg_header.msg_type = MSG_SMS_ADD_PID_FILTER_REQ;
650 PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); 650 PidMsg.x_msg_header.msg_length = sizeof(PidMsg);
651 PidMsg.msgData[0] = feed->pid; 651 PidMsg.msgData[0] = feed->pid;
652 652
653 return smsclient_sendrequest(client->smsclient, 653 return smsclient_sendrequest(client->smsclient,
@@ -658,18 +658,18 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed)
658{ 658{
659 struct smsdvb_client_t *client = 659 struct smsdvb_client_t *client =
660 container_of(feed->demux, struct smsdvb_client_t, demux); 660 container_of(feed->demux, struct smsdvb_client_t, demux);
661 struct SmsMsgData_ST PidMsg; 661 struct sms_msg_data PidMsg;
662 662
663 sms_debug("remove pid %d(%x)", 663 sms_debug("remove pid %d(%x)",
664 feed->pid, feed->pid); 664 feed->pid, feed->pid);
665 665
666 client->feed_users--; 666 client->feed_users--;
667 667
668 PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 668 PidMsg.x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
669 PidMsg.xMsgHeader.msgDstId = HIF_TASK; 669 PidMsg.x_msg_header.msg_dst_id = HIF_TASK;
670 PidMsg.xMsgHeader.msgFlags = 0; 670 PidMsg.x_msg_header.msg_flags = 0;
671 PidMsg.xMsgHeader.msgType = MSG_SMS_REMOVE_PID_FILTER_REQ; 671 PidMsg.x_msg_header.msg_type = MSG_SMS_REMOVE_PID_FILTER_REQ;
672 PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); 672 PidMsg.x_msg_header.msg_length = sizeof(PidMsg);
673 PidMsg.msgData[0] = feed->pid; 673 PidMsg.msgData[0] = feed->pid;
674 674
675 return smsclient_sendrequest(client->smsclient, 675 return smsclient_sendrequest(client->smsclient,
@@ -694,7 +694,7 @@ static int smsdvb_sendrequest_and_wait(struct smsdvb_client_t *client,
694static int smsdvb_send_statistics_request(struct smsdvb_client_t *client) 694static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
695{ 695{
696 int rc; 696 int rc;
697 struct SmsMsgHdr_ST Msg; 697 struct sms_msg_hdr Msg;
698 698
699 /* Don't request stats too fast */ 699 /* Don't request stats too fast */
700 if (client->get_stats_jiffies && 700 if (client->get_stats_jiffies &&
@@ -702,10 +702,10 @@ static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
702 return 0; 702 return 0;
703 client->get_stats_jiffies = jiffies + msecs_to_jiffies(100); 703 client->get_stats_jiffies = jiffies + msecs_to_jiffies(100);
704 704
705 Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 705 Msg.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
706 Msg.msgDstId = HIF_TASK; 706 Msg.msg_dst_id = HIF_TASK;
707 Msg.msgFlags = 0; 707 Msg.msg_flags = 0;
708 Msg.msgLength = sizeof(Msg); 708 Msg.msg_length = sizeof(Msg);
709 709
710 switch (smscore_get_device_mode(client->coredev)) { 710 switch (smscore_get_device_mode(client->coredev)) {
711 case DEVICE_MODE_ISDBT: 711 case DEVICE_MODE_ISDBT:
@@ -714,12 +714,12 @@ static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
714 * Check for firmware version, to avoid breaking for old cards 714 * Check for firmware version, to avoid breaking for old cards
715 */ 715 */
716 if (client->coredev->fw_version >= 0x800) 716 if (client->coredev->fw_version >= 0x800)
717 Msg.msgType = MSG_SMS_GET_STATISTICS_EX_REQ; 717 Msg.msg_type = MSG_SMS_GET_STATISTICS_EX_REQ;
718 else 718 else
719 Msg.msgType = MSG_SMS_GET_STATISTICS_REQ; 719 Msg.msg_type = MSG_SMS_GET_STATISTICS_REQ;
720 break; 720 break;
721 default: 721 default:
722 Msg.msgType = MSG_SMS_GET_STATISTICS_REQ; 722 Msg.msg_type = MSG_SMS_GET_STATISTICS_REQ;
723 } 723 }
724 724
725 rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), 725 rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
@@ -845,7 +845,7 @@ static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe)
845 container_of(fe, struct smsdvb_client_t, frontend); 845 container_of(fe, struct smsdvb_client_t, frontend);
846 846
847 struct { 847 struct {
848 struct SmsMsgHdr_ST Msg; 848 struct sms_msg_hdr Msg;
849 u32 Data[3]; 849 u32 Data[3];
850 } Msg; 850 } Msg;
851 851
@@ -856,11 +856,11 @@ static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe)
856 client->event_unc_state = -1; 856 client->event_unc_state = -1;
857 fe->dtv_property_cache.delivery_system = SYS_DVBT; 857 fe->dtv_property_cache.delivery_system = SYS_DVBT;
858 858
859 Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 859 Msg.Msg.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
860 Msg.Msg.msgDstId = HIF_TASK; 860 Msg.Msg.msg_dst_id = HIF_TASK;
861 Msg.Msg.msgFlags = 0; 861 Msg.Msg.msg_flags = 0;
862 Msg.Msg.msgType = MSG_SMS_RF_TUNE_REQ; 862 Msg.Msg.msg_type = MSG_SMS_RF_TUNE_REQ;
863 Msg.Msg.msgLength = sizeof(Msg); 863 Msg.Msg.msg_length = sizeof(Msg);
864 Msg.Data[0] = c->frequency; 864 Msg.Data[0] = c->frequency;
865 Msg.Data[2] = 12000000; 865 Msg.Data[2] = 12000000;
866 866
@@ -915,17 +915,17 @@ static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe)
915 int ret; 915 int ret;
916 916
917 struct { 917 struct {
918 struct SmsMsgHdr_ST Msg; 918 struct sms_msg_hdr Msg;
919 u32 Data[4]; 919 u32 Data[4];
920 } Msg; 920 } Msg;
921 921
922 fe->dtv_property_cache.delivery_system = SYS_ISDBT; 922 fe->dtv_property_cache.delivery_system = SYS_ISDBT;
923 923
924 Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 924 Msg.Msg.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
925 Msg.Msg.msgDstId = HIF_TASK; 925 Msg.Msg.msg_dst_id = HIF_TASK;
926 Msg.Msg.msgFlags = 0; 926 Msg.Msg.msg_flags = 0;
927 Msg.Msg.msgType = MSG_SMS_ISDBT_TUNE_REQ; 927 Msg.Msg.msg_type = MSG_SMS_ISDBT_TUNE_REQ;
928 Msg.Msg.msgLength = sizeof(Msg); 928 Msg.Msg.msg_length = sizeof(Msg);
929 929
930 if (c->isdbt_sb_segment_idx == -1) 930 if (c->isdbt_sb_segment_idx == -1)
931 c->isdbt_sb_segment_idx = 0; 931 c->isdbt_sb_segment_idx = 0;
diff --git a/drivers/media/common/siano/smsdvb.h b/drivers/media/common/siano/smsdvb.h
index 63cdd755521e..e1ff07c2e6c8 100644
--- a/drivers/media/common/siano/smsdvb.h
+++ b/drivers/media/common/siano/smsdvb.h
@@ -57,7 +57,7 @@ struct smsdvb_client_t {
57 int feed_users; 57 int feed_users;
58 bool has_tuned; 58 bool has_tuned;
59 59
60 /* Stats debugfs data */ 60 /* stats debugfs data */
61 struct dentry *debugfs; 61 struct dentry *debugfs;
62 62
63 struct smsdvb_debugfs *debug_data; 63 struct smsdvb_debugfs *debug_data;
@@ -74,30 +74,30 @@ struct smsdvb_client_t {
74struct RECEPTION_STATISTICS_PER_SLICES_S { 74struct RECEPTION_STATISTICS_PER_SLICES_S {
75 u32 result; 75 u32 result;
76 u32 snr; 76 u32 snr;
77 s32 inBandPower; 77 s32 in_band_power;
78 u32 tsPackets; 78 u32 ts_packets;
79 u32 etsPackets; 79 u32 ets_packets;
80 u32 constellation; 80 u32 constellation;
81 u32 hpCode; 81 u32 hp_code;
82 u32 tpsSrvIndLP; 82 u32 tps_srv_ind_lp;
83 u32 tpsSrvIndHP; 83 u32 tps_srv_ind_hp;
84 u32 cellId; 84 u32 cell_id;
85 u32 reason; 85 u32 reason;
86 u32 requestId; 86 u32 request_id;
87 u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 87 u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
88 88
89 u32 BER; /* Post Viterbi BER [1E-5] */ 89 u32 BER; /* Post Viterbi BER [1E-5] */
90 s32 RSSI; /* dBm */ 90 s32 RSSI; /* dBm */
91 s32 CarrierOffset; /* Carrier Offset in bin/1024 */ 91 s32 carrier_offset; /* Carrier Offset in bin/1024 */
92 92
93 u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 93 u32 is_rf_locked; /* 0 - not locked, 1 - locked */
94 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 94 u32 is_demod_locked; /* 0 - not locked, 1 - locked */
95 95
96 u32 BERBitCount; /* Total number of SYNC bits. */ 96 u32 ber_bit_count; /* Total number of SYNC bits. */
97 u32 BERErrorCount; /* Number of erronous SYNC bits. */ 97 u32 ber_error_count; /* Number of erronous SYNC bits. */
98 98
99 s32 MRC_SNR; /* dB */ 99 s32 MRC_SNR; /* dB */
100 s32 MRC_InBandPwr; /* In band power in dBM */ 100 s32 mrc_in_band_pwr; /* In band power in dBM */
101 s32 MRC_RSSI; /* dBm */ 101 s32 MRC_RSSI; /* dBm */
102}; 102};
103 103
diff --git a/drivers/media/common/siano/smsendian.c b/drivers/media/common/siano/smsendian.c
index e2657c2f0109..32a7b28bd324 100644
--- a/drivers/media/common/siano/smsendian.c
+++ b/drivers/media/common/siano/smsendian.c
@@ -28,11 +28,11 @@
28void smsendian_handle_tx_message(void *buffer) 28void smsendian_handle_tx_message(void *buffer)
29{ 29{
30#ifdef __BIG_ENDIAN 30#ifdef __BIG_ENDIAN
31 struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer; 31 struct sms_msg_data *msg = (struct sms_msg_data *)buffer;
32 int i; 32 int i;
33 int msgWords; 33 int msgWords;
34 34
35 switch (msg->xMsgHeader.msgType) { 35 switch (msg->x_msg_header.msg_type) {
36 case MSG_SMS_DATA_DOWNLOAD_REQ: 36 case MSG_SMS_DATA_DOWNLOAD_REQ:
37 { 37 {
38 msg->msgData[0] = le32_to_cpu(msg->msgData[0]); 38 msg->msgData[0] = le32_to_cpu(msg->msgData[0]);
@@ -40,8 +40,8 @@ void smsendian_handle_tx_message(void *buffer)
40 } 40 }
41 41
42 default: 42 default:
43 msgWords = (msg->xMsgHeader.msgLength - 43 msgWords = (msg->x_msg_header.msg_length -
44 sizeof(struct SmsMsgHdr_ST))/4; 44 sizeof(struct sms_msg_hdr))/4;
45 45
46 for (i = 0; i < msgWords; i++) 46 for (i = 0; i < msgWords; i++)
47 msg->msgData[i] = le32_to_cpu(msg->msgData[i]); 47 msg->msgData[i] = le32_to_cpu(msg->msgData[i]);
@@ -55,16 +55,16 @@ EXPORT_SYMBOL_GPL(smsendian_handle_tx_message);
55void smsendian_handle_rx_message(void *buffer) 55void smsendian_handle_rx_message(void *buffer)
56{ 56{
57#ifdef __BIG_ENDIAN 57#ifdef __BIG_ENDIAN
58 struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer; 58 struct sms_msg_data *msg = (struct sms_msg_data *)buffer;
59 int i; 59 int i;
60 int msgWords; 60 int msgWords;
61 61
62 switch (msg->xMsgHeader.msgType) { 62 switch (msg->x_msg_header.msg_type) {
63 case MSG_SMS_GET_VERSION_EX_RES: 63 case MSG_SMS_GET_VERSION_EX_RES:
64 { 64 {
65 struct SmsVersionRes_ST *ver = 65 struct sms_version_res *ver =
66 (struct SmsVersionRes_ST *) msg; 66 (struct sms_version_res *) msg;
67 ver->ChipModel = le16_to_cpu(ver->ChipModel); 67 ver->chip_model = le16_to_cpu(ver->chip_model);
68 break; 68 break;
69 } 69 }
70 70
@@ -77,8 +77,8 @@ void smsendian_handle_rx_message(void *buffer)
77 77
78 default: 78 default:
79 { 79 {
80 msgWords = (msg->xMsgHeader.msgLength - 80 msgWords = (msg->x_msg_header.msg_length -
81 sizeof(struct SmsMsgHdr_ST))/4; 81 sizeof(struct sms_msg_hdr))/4;
82 82
83 for (i = 0; i < msgWords; i++) 83 for (i = 0; i < msgWords; i++)
84 msg->msgData[i] = le32_to_cpu(msg->msgData[i]); 84 msg->msgData[i] = le32_to_cpu(msg->msgData[i]);
@@ -93,11 +93,11 @@ EXPORT_SYMBOL_GPL(smsendian_handle_rx_message);
93void smsendian_handle_message_header(void *msg) 93void smsendian_handle_message_header(void *msg)
94{ 94{
95#ifdef __BIG_ENDIAN 95#ifdef __BIG_ENDIAN
96 struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)msg; 96 struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)msg;
97 97
98 phdr->msgType = le16_to_cpu(phdr->msgType); 98 phdr->msg_type = le16_to_cpu(phdr->msg_type);
99 phdr->msgLength = le16_to_cpu(phdr->msgLength); 99 phdr->msg_length = le16_to_cpu(phdr->msg_length);
100 phdr->msgFlags = le16_to_cpu(phdr->msgFlags); 100 phdr->msg_flags = le16_to_cpu(phdr->msg_flags);
101#endif /* __BIG_ENDIAN */ 101#endif /* __BIG_ENDIAN */
102} 102}
103EXPORT_SYMBOL_GPL(smsendian_handle_message_header); 103EXPORT_SYMBOL_GPL(smsendian_handle_message_header);