Commit dfef84fc authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[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: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c8b8fdb3
......@@ -167,13 +167,13 @@ struct sms_board *sms_get_board(unsigned id)
}
EXPORT_SYMBOL_GPL(sms_get_board);
static inline void sms_gpio_assign_11xx_default_led_config(
struct smscore_config_gpio *pGpioConfig) {
pGpioConfig->direction = SMS_GPIO_DIRECTION_OUTPUT;
pGpioConfig->inputcharacteristics =
struct smscore_config_gpio *p_gpio_config) {
p_gpio_config->direction = SMS_GPIO_DIRECTION_OUTPUT;
p_gpio_config->inputcharacteristics =
SMS_GPIO_INPUTCHARACTERISTICS_NORMAL;
pGpioConfig->outputdriving = SMS_GPIO_OUTPUTDRIVING_4mA;
pGpioConfig->outputslewrate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS;
pGpioConfig->pullupdown = SMS_GPIO_PULLUPDOWN_NONE;
p_gpio_config->outputdriving = SMS_GPIO_OUTPUTDRIVING_4mA;
p_gpio_config->outputslewrate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS;
p_gpio_config->pullupdown = SMS_GPIO_PULLUPDOWN_NONE;
}
int sms_board_event(struct smscore_device_t *coredev,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -57,7 +57,7 @@ struct smsdvb_client_t {
int feed_users;
bool has_tuned;
/* Stats debugfs data */
/* stats debugfs data */
struct dentry *debugfs;
struct smsdvb_debugfs *debug_data;
......@@ -74,30 +74,30 @@ struct smsdvb_client_t {
struct RECEPTION_STATISTICS_PER_SLICES_S {
u32 result;
u32 snr;
s32 inBandPower;
u32 tsPackets;
u32 etsPackets;
s32 in_band_power;
u32 ts_packets;
u32 ets_packets;
u32 constellation;
u32 hpCode;
u32 tpsSrvIndLP;
u32 tpsSrvIndHP;
u32 cellId;
u32 hp_code;
u32 tps_srv_ind_lp;
u32 tps_srv_ind_hp;
u32 cell_id;
u32 reason;
u32 requestId;
u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
u32 request_id;
u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
u32 BER; /* Post Viterbi BER [1E-5] */
s32 RSSI; /* dBm */
s32 CarrierOffset; /* Carrier Offset in bin/1024 */
s32 carrier_offset; /* Carrier Offset in bin/1024 */
u32 IsRfLocked; /* 0 - not locked, 1 - locked */
u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
u32 is_rf_locked; /* 0 - not locked, 1 - locked */
u32 is_demod_locked; /* 0 - not locked, 1 - locked */
u32 BERBitCount; /* Total number of SYNC bits. */
u32 BERErrorCount; /* Number of erronous SYNC bits. */
u32 ber_bit_count; /* Total number of SYNC bits. */
u32 ber_error_count; /* Number of erronous SYNC bits. */
s32 MRC_SNR; /* dB */
s32 MRC_InBandPwr; /* In band power in dBM */
s32 mrc_in_band_pwr; /* In band power in dBM */
s32 MRC_RSSI; /* dBm */
};
......
......@@ -28,11 +28,11 @@
void smsendian_handle_tx_message(void *buffer)
{
#ifdef __BIG_ENDIAN
struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer;
struct sms_msg_data *msg = (struct sms_msg_data *)buffer;
int i;
int msgWords;
switch (msg->xMsgHeader.msgType) {
switch (msg->x_msg_header.msg_type) {
case MSG_SMS_DATA_DOWNLOAD_REQ:
{
msg->msgData[0] = le32_to_cpu(msg->msgData[0]);
......@@ -40,8 +40,8 @@ void smsendian_handle_tx_message(void *buffer)
}
default:
msgWords = (msg->xMsgHeader.msgLength -
sizeof(struct SmsMsgHdr_ST))/4;
msgWords = (msg->x_msg_header.msg_length -
sizeof(struct sms_msg_hdr))/4;
for (i = 0; i < msgWords; i++)
msg->msgData[i] = le32_to_cpu(msg->msgData[i]);
......@@ -55,16 +55,16 @@ EXPORT_SYMBOL_GPL(smsendian_handle_tx_message);
void smsendian_handle_rx_message(void *buffer)
{
#ifdef __BIG_ENDIAN
struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer;
struct sms_msg_data *msg = (struct sms_msg_data *)buffer;
int i;
int msgWords;
switch (msg->xMsgHeader.msgType) {
switch (msg->x_msg_header.msg_type) {
case MSG_SMS_GET_VERSION_EX_RES:
{
struct SmsVersionRes_ST *ver =
(struct SmsVersionRes_ST *) msg;
ver->ChipModel = le16_to_cpu(ver->ChipModel);
struct sms_version_res *ver =
(struct sms_version_res *) msg;
ver->chip_model = le16_to_cpu(ver->chip_model);
break;
}
......@@ -77,8 +77,8 @@ void smsendian_handle_rx_message(void *buffer)
default:
{
msgWords = (msg->xMsgHeader.msgLength -
sizeof(struct SmsMsgHdr_ST))/4;
msgWords = (msg->x_msg_header.msg_length -
sizeof(struct sms_msg_hdr))/4;
for (i = 0; i < msgWords; i++)
msg->msgData[i] = le32_to_cpu(msg->msgData[i]);
......@@ -93,11 +93,11 @@ EXPORT_SYMBOL_GPL(smsendian_handle_rx_message);
void smsendian_handle_message_header(void *msg)
{
#ifdef __BIG_ENDIAN
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)msg;
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)msg;
phdr->msgType = le16_to_cpu(phdr->msgType);
phdr->msgLength = le16_to_cpu(phdr->msgLength);
phdr->msgFlags = le16_to_cpu(phdr->msgFlags);
phdr->msg_type = le16_to_cpu(phdr->msg_type);
phdr->msg_length = le16_to_cpu(phdr->msg_length);
phdr->msg_flags = le16_to_cpu(phdr->msg_flags);
#endif /* __BIG_ENDIAN */
}
EXPORT_SYMBOL_GPL(smsendian_handle_message_header);
......@@ -98,7 +98,7 @@ static int smssdio_sendrequest(void *context, void *buffer, size_t size)
sdio_claim_host(smsdev->func);
smsendian_handle_tx_message((struct SmsMsgData_ST *) buffer);
smsendian_handle_tx_message((struct sms_msg_data *) buffer);
while (size >= smsdev->func->cur_blksize) {
ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA,
buffer, smsdev->func->cur_blksize);
......@@ -130,7 +130,7 @@ static void smssdio_interrupt(struct sdio_func *func)
struct smssdio_device *smsdev;
struct smscore_buffer_t *cb;
struct SmsMsgHdr_ST *hdr;
struct sms_msg_hdr *hdr;
size_t size;
smsdev = sdio_get_drvdata(func);
......@@ -163,20 +163,20 @@ static void smssdio_interrupt(struct sdio_func *func)
hdr = cb->p;
if (hdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG) {
if (hdr->msg_flags & MSG_HDR_FLAG_SPLIT_MSG) {
smsdev->split_cb = cb;
return;
}
if (hdr->msgLength > smsdev->func->cur_blksize)
size = hdr->msgLength - smsdev->func->cur_blksize;
if (hdr->msg_length > smsdev->func->cur_blksize)
size = hdr->msg_length - smsdev->func->cur_blksize;
else
size = 0;
} else {
cb = smsdev->split_cb;
hdr = cb->p;
size = hdr->msgLength - sizeof(struct SmsMsgHdr_ST);
size = hdr->msg_length - sizeof(struct sms_msg_hdr);
smsdev->split_cb = NULL;
}
......@@ -184,7 +184,7 @@ static void smssdio_interrupt(struct sdio_func *func)
if (size) {
void *buffer;
buffer = cb->p + (hdr->msgLength - size);
buffer = cb->p + (hdr->msg_length - size);
size = ALIGN(size, SMSSDIO_BLOCK_SIZE);
BUG_ON(smsdev->func->cur_blksize != SMSSDIO_BLOCK_SIZE);
......@@ -230,10 +230,10 @@ static void smssdio_interrupt(struct sdio_func *func)
}
}
cb->size = hdr->msgLength;
cb->size = hdr->msg_length;
cb->offset = 0;
smsendian_handle_rx_message((struct SmsMsgData_ST *) cb->p);
smsendian_handle_rx_message((struct sms_msg_data *) cb->p);
smscore_onresponse(smsdev->coredev, cb);
}
......
......@@ -93,26 +93,26 @@ static void smsusb_onresponse(struct urb *urb)
}
if ((urb->actual_length > 0) && (urb->status == 0)) {
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)surb->cb->p;
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)surb->cb->p;
smsendian_handle_message_header(phdr);
if (urb->actual_length >= phdr->msgLength) {
surb->cb->size = phdr->msgLength;
if (urb->actual_length >= phdr->msg_length) {
surb->cb->size = phdr->msg_length;
if (dev->response_alignment &&
(phdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG)) {
(phdr->msg_flags & MSG_HDR_FLAG_SPLIT_MSG)) {
surb->cb->offset =
dev->response_alignment +
((phdr->msgFlags >> 8) & 3);
((phdr->msg_flags >> 8) & 3);
/* sanity check */
if (((int) phdr->msgLength +
if (((int) phdr->msg_length +
surb->cb->offset) > urb->actual_length) {
sms_err("invalid response "
"msglen %d offset %d "
"size %d",
phdr->msgLength,
phdr->msg_length,
surb->cb->offset,
urb->actual_length);
goto exit_and_resubmit;
......@@ -121,22 +121,22 @@ static void smsusb_onresponse(struct urb *urb)
/* move buffer pointer and
* copy header to its new location */
memcpy((char *) phdr + surb->cb->offset,
phdr, sizeof(struct SmsMsgHdr_ST));
phdr, sizeof(struct sms_msg_hdr));
} else
surb->cb->offset = 0;
sms_debug("received %s(%d) size: %d",
smscore_translate_msg(phdr->msgType),
phdr->msgType, phdr->msgLength);
smscore_translate_msg(phdr->msg_type),
phdr->msg_type, phdr->msg_length);
smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr);
smsendian_handle_rx_message((struct sms_msg_data *) phdr);
smscore_onresponse(dev->coredev, surb->cb);
surb->cb = NULL;
} else {
sms_err("invalid response "
"msglen %d actual %d",
phdr->msgLength, urb->actual_length);
phdr->msg_length, urb->actual_length);
}
} else
sms_err("error, urb status %d, %d bytes",
......@@ -206,18 +206,18 @@ static int smsusb_start_streaming(struct smsusb_device_t *dev)
static int smsusb_sendrequest(void *context, void *buffer, size_t size)
{
struct smsusb_device_t *dev = (struct smsusb_device_t *) context;
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) buffer;
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer;
int dummy;
if (dev->state != SMSUSB_ACTIVE)
return -ENOENT;
sms_debug("sending %s(%d) size: %d",
smscore_translate_msg(phdr->msgType), phdr->msgType,
phdr->msgLength);
smscore_translate_msg(phdr->msg_type), phdr->msg_type,
phdr->msg_length);
smsendian_handle_tx_message((struct SmsMsgData_ST *) phdr);
smsendian_handle_message_header((struct SmsMsgHdr_ST *)buffer);
smsendian_handle_tx_message((struct sms_msg_data *) phdr);
smsendian_handle_message_header((struct sms_msg_hdr *)buffer);
return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2),
buffer, size, &dummy, 1000);
}
......@@ -310,8 +310,8 @@ static void smsusb1_detectmode(void *context, int *mode)
static int smsusb1_setmode(void *context, int mode)
{
struct SmsMsgHdr_ST Msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK,
sizeof(struct SmsMsgHdr_ST), 0 };
struct sms_msg_hdr Msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK,
sizeof(struct sms_msg_hdr), 0 };
if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) {
sms_err("invalid firmware id specified %d", mode);
......@@ -375,7 +375,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
dev->buffer_size = USB2_BUFFER_SIZE;
dev->response_alignment =
le16_to_cpu(dev->udev->ep_in[1]->desc.wMaxPacketSize) -
sizeof(struct SmsMsgHdr_ST);
sizeof(struct sms_msg_hdr);
params.flags |= SMS_DEVICE_FAMILY2;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment