]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
V4L/DVB (8283): sms1xxx: 80-column cleanups
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 15 Jun 2008 19:50:11 +0000 (16:50 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 20 Jul 2008 10:21:40 +0000 (07:21 -0300)
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/siano/smscoreapi.c
drivers/media/dvb/siano/smscoreapi.h
drivers/media/dvb/siano/smsdvb.c
drivers/media/dvb/siano/smsusb.c

index e8267178c52c04258a94f749f23a3413a47ce1f3..084ddc39c98987b3a15b7a3bf7e5b865d81720d5 100644 (file)
@@ -309,7 +309,8 @@ int smscore_notify_callbacks(smscore_device_t *coredev, struct device *device,
        first = &g_smscore_notifyees;
 
        for (next = first->next; next != first; next = next->next) {
-               rc = ((smscore_device_notifyee_t *) next)->hotplug(coredev, device, arrival);
+               rc = ((smscore_device_notifyee_t *) next)->
+                               hotplug(coredev, device, arrival);
                if (rc < 0)
                        break;
        }
@@ -337,7 +338,8 @@ smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
  * creates coredev object for a device, prepares buffers,
  * creates buffer mappings, notifies registered hotplugs about new device.
  *
- * @param params device pointer to struct with device specific parameters and handlers
+ * @param params device pointer to struct with device specific parameters
+ *               and handlers
  * @param coredev pointer to a value that receives created coredev object
  *
  * @return 0 on success, <0 on error.
@@ -387,7 +389,9 @@ int smscore_register_device(smsdevice_params_t *params,
        for (buffer = dev->common_buffer;
             dev->num_buffers < params->num_buffers;
             dev->num_buffers++, buffer += params->buffer_size) {
-               smscore_buffer_t *cb = smscore_createbuffer(buffer, dev->common_buffer, dev->common_buffer_phys);
+               smscore_buffer_t *cb =
+                       smscore_createbuffer(buffer, dev->common_buffer,
+                                            dev->common_buffer_phys);
                if (!cb) {
                        smscore_unregister_device(dev);
                        return -ENOMEM;
@@ -428,15 +432,18 @@ int smscore_register_device(smsdevice_params_t *params,
 /**
  * sets initial device mode and notifies client hotplugs that device is ready
  *
- * @param coredev pointer to a coredev object returned by smscore_register_device
+ * @param coredev pointer to a coredev object returned by
+ *               smscore_register_device
  *
  * @return 0 on success, <0 on error.
  */
 int smscore_start_device(smscore_device_t *coredev)
 {
-       int rc = smscore_set_device_mode(coredev, smscore_registry_getmode(coredev->devpath));
+       int rc = smscore_set_device_mode(
+                       coredev, smscore_registry_getmode(coredev->devpath));
        if (rc < 0) {
-               printk(KERN_INFO "%s set device mode faile , rc %d\n", __func__, rc);
+               printk(KERN_INFO "%s set device mode faile , rc %d\n",
+                      __func__, rc);
                return rc;
        }
 
@@ -512,9 +519,14 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer,
 
                if ((coredev->device_flags & SMS_ROM_NO_RESPONSE) &&
                    (coredev->mode == DEVICE_MODE_NONE))
-                       rc = coredev->sendrequest_handler(coredev->context, DataMsg, DataMsg->xMsgHeader.msgLength);
+                       rc = coredev->sendrequest_handler(
+                               coredev->context, DataMsg,
+                               DataMsg->xMsgHeader.msgLength);
                else
-                       rc = smscore_sendrequest_and_wait(coredev, DataMsg, DataMsg->xMsgHeader.msgLength, &coredev->data_download_done);
+                       rc = smscore_sendrequest_and_wait(
+                               coredev, DataMsg,
+                               DataMsg->xMsgHeader.msgLength,
+                               &coredev->data_download_done);
 
                payload += payload_size;
                size -= payload_size;
@@ -529,17 +541,23 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer,
                                     sizeof(SmsMsgHdr_ST) +
                                     sizeof(u32) * 5);
 
-                       TriggerMsg->msgData[0] = firmware->StartAddress; /* Entry point */
+                       TriggerMsg->msgData[0] = firmware->StartAddress;
+                                               /* Entry point */
                        TriggerMsg->msgData[1] = 5; /* Priority */
                        TriggerMsg->msgData[2] = 0x200; /* Stack size */
                        TriggerMsg->msgData[3] = 0; /* Parameter */
                        TriggerMsg->msgData[4] = 4; /* Task ID */
 
                        if (coredev->device_flags & SMS_ROM_NO_RESPONSE) {
-                               rc = coredev->sendrequest_handler(coredev->context, TriggerMsg, TriggerMsg->xMsgHeader.msgLength);
+                               rc = coredev->sendrequest_handler(
+                                       coredev->context, TriggerMsg,
+                                       TriggerMsg->xMsgHeader.msgLength);
                                msleep(100);
                        } else
-                               rc = smscore_sendrequest_and_wait(coredev, TriggerMsg, TriggerMsg->xMsgHeader.msgLength, &coredev->trigger_done);
+                               rc = smscore_sendrequest_and_wait(
+                                       coredev, TriggerMsg,
+                                       TriggerMsg->xMsgHeader.msgLength,
+                                       &coredev->trigger_done);
                } else {
                        SMS_INIT_MSG(msg, MSG_SW_RELOAD_EXEC_REQ,
                                     sizeof(SmsMsgHdr_ST));
@@ -563,7 +581,8 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer,
 /**
  * loads specified firmware into a buffer and calls device loadfirmware_handler
  *
- * @param coredev pointer to a coredev object returned by smscore_register_device
+ * @param coredev pointer to a coredev object returned by
+ *                smscore_register_device
  * @param filename null-terminated string specifies firmware file name
  * @param loadfirmware_handler device handler that loads firmware
  *
@@ -595,8 +614,11 @@ int smscore_load_firmware_from_file(smscore_device_t *coredev, char *filename,
                memcpy(fw_buffer, fw->data, fw->size);
 
                rc = (coredev->device_flags & SMS_DEVICE_FAMILY2) ?
-                     smscore_load_firmware_family2(coredev, fw_buffer, fw->size) :
-                       loadfirmware_handler(coredev->context, fw_buffer, fw->size);
+                     smscore_load_firmware_family2(coredev,
+                                                   fw_buffer,
+                                                   fw->size) :
+                     loadfirmware_handler(coredev->context,
+                                          fw_buffer, fw->size);
 
                kfree(fw_buffer);
        } else {
@@ -618,9 +640,11 @@ int smscore_load_firmware_from_buffer(smscore_device_t *coredev, u8 *buffer,
 }
 
 /**
- * notifies all clients registered with the device, notifies hotplugs, frees all buffers and coredev object
+ * notifies all clients registered with the device, notifies hotplugs,
+ * frees all buffers and coredev object
  *
- * @param coredev pointer to a coredev object returned by smscore_register_device
+ * @param coredev pointer to a coredev object returned by
+ *                smscore_register_device
  *
  * @return 0 on success, <0 on error.
  */
@@ -686,13 +710,17 @@ int smscore_detect_mode(smscore_device_t *coredev)
        rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength,
                                          &coredev->version_ex_done);
        if (rc == -ETIME) {
-               printk("%s: MSG_SMS_GET_VERSION_EX_REQ failed first try\n", __func__);
+               printk("%s: MSG_SMS_GET_VERSION_EX_REQ failed first try\n",
+                      __func__);
 
                if (wait_for_completion_timeout(&coredev->resume_done,
                                                msecs_to_jiffies(5000))) {
-                       rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, &coredev->version_ex_done);
+                       rc = smscore_sendrequest_and_wait(
+                               coredev, msg, msg->msgLength,
+                               &coredev->version_ex_done);
                        if (rc < 0)
-                               printk("%s: MSG_SMS_GET_VERSION_EX_REQ failed second try, rc %d\n", __func__, rc);
+                               printk("%s: MSG_SMS_GET_VERSION_EX_REQ failed "
+                                      "second try, rc %d\n", __func__, rc);
                } else
                        rc = -ETIME;
        }
@@ -719,7 +747,8 @@ char *smscore_fw_lkup[][SMS_NUM_OF_DEVICE_TYPES] = {
  * calls device handler to change mode of operation
  * NOTE: stellar/usb may disconnect when changing mode
  *
- * @param coredev pointer to a coredev object returned by smscore_register_device
+ * @param coredev pointer to a coredev object returned by
+ *                smscore_register_device
  * @param mode requested mode of operation
  *
  * @return 0 on success, <0 on error.
@@ -757,27 +786,35 @@ int smscore_set_device_mode(smscore_device_t *coredev, int mode)
 
                if (!(coredev->modes_supported & (1 << mode))) {
                        type = smscore_registry_gettype(coredev->devpath);
-                       rc = smscore_load_firmware_from_file(coredev, smscore_fw_lkup[mode][type], NULL);
+                       rc = smscore_load_firmware_from_file(
+                               coredev, smscore_fw_lkup[mode][type], NULL);
                        if (rc < 0) {
-                               printk(KERN_INFO "%s load firmware failed %d\n", __func__, rc);
+                               printk(KERN_INFO "%s load firmware "
+                                      "failed %d\n", __func__, rc);
                                return rc;
                        }
                } else
-                       printk(KERN_INFO "%s mode %d supported by running firmware\n", __func__, mode);
+                       printk(KERN_INFO "%s mode %d supported by running "
+                              "firmware\n", __func__, mode);
 
                buffer = kmalloc(sizeof(SmsMsgData_ST) + SMS_DMA_ALIGNMENT,
                                 GFP_KERNEL | GFP_DMA);
                if (buffer) {
-                       SmsMsgData_ST *msg = (SmsMsgData_ST *) SMS_ALIGN_ADDRESS(buffer);
+                       SmsMsgData_ST *msg =
+                               (SmsMsgData_ST *) SMS_ALIGN_ADDRESS(buffer);
 
-                       SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_INIT_DEVICE_REQ, sizeof(SmsMsgData_ST));
+                       SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_INIT_DEVICE_REQ,
+                                    sizeof(SmsMsgData_ST));
                        msg->msgData[0] = mode;
 
-                       rc = smscore_sendrequest_and_wait(coredev, msg, msg->xMsgHeader.msgLength, &coredev->init_device_done);
+                       rc = smscore_sendrequest_and_wait(
+                               coredev, msg, msg->xMsgHeader.msgLength,
+                               &coredev->init_device_done);
 
                        kfree(buffer);
                } else {
-                       printk(KERN_INFO "%s Could not allocate buffer for init device message.\n", __func__);
+                       printk(KERN_INFO "%s Could not allocate buffer for "
+                              "init device message.\n", __func__);
                        rc = -ENOMEM;
                }
        } else {
@@ -810,7 +847,8 @@ int smscore_set_device_mode(smscore_device_t *coredev, int mode)
 /**
  * calls device handler to get current mode of operation
  *
- * @param coredev pointer to a coredev object returned by smscore_register_device
+ * @param coredev pointer to a coredev object returned by
+ *                smscore_register_device
  *
  * @return current mode
  */
@@ -823,12 +861,14 @@ int smscore_get_device_mode(smscore_device_t *coredev)
  * find client by response id & type within the clients list.
  * return client handle or NULL.
  *
- * @param coredev pointer to a coredev object returned by smscore_register_device
+ * @param coredev pointer to a coredev object returned by
+ *                smscore_register_device
  * @param data_type client data type (SMS_DONT_CARE for all types)
  * @param id client id (SMS_DONT_CARE for all id)
  *
  */
-smscore_client_t *smscore_find_client(smscore_device_t *coredev, int data_type, int id)
+smscore_client_t *smscore_find_client(smscore_device_t *coredev,
+                                     int data_type, int id)
 {
        smscore_client_t *client = NULL;
        struct list_head *next, *first;
@@ -861,15 +901,16 @@ smscore_client_t *smscore_find_client(smscore_device_t *coredev, int data_type,
  * find client by response id/type, call clients onresponse handler
  * return buffer to pool on error
  *
- * @param coredev pointer to a coredev object returned by smscore_register_device
+ * @param coredev pointer to a coredev object returned by
+ *                smscore_register_device
  * @param cb pointer to response buffer descriptor
  *
  */
 void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb)
 {
        SmsMsgHdr_ST *phdr = (SmsMsgHdr_ST *)((u8 *) cb->p + cb->offset);
-       smscore_client_t *client = smscore_find_client(coredev, phdr->msgType,
-                                                      phdr->msgDstId);
+       smscore_client_t *client =
+               smscore_find_client(coredev, phdr->msgType, phdr->msgDstId);
        int rc = -EBUSY;
 
        static unsigned long last_sample_time = 0;
@@ -943,7 +984,8 @@ void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb)
 /**
  * return pointer to next free buffer descriptor from core pool
  *
- * @param coredev pointer to a coredev object returned by smscore_register_device
+ * @param coredev pointer to a coredev object returned by
+ *                smscore_register_device
  *
  * @return pointer to descriptor on success, NULL on error.
  */
@@ -967,7 +1009,8 @@ smscore_buffer_t *smscore_getbuffer(smscore_device_t *coredev)
 /**
  * return buffer descriptor to a pool
  *
- * @param coredev pointer to a coredev object returned by smscore_register_device
+ * @param coredev pointer to a coredev object returned by
+ *                smscore_register_device
  * @param cb pointer buffer descriptor
  *
  */
@@ -1019,7 +1062,9 @@ int smscore_validate_client(smscore_device_t *coredev,
  *
  * @return 0 on success, <0 on error.
  */
-int smscore_register_client(smscore_device_t *coredev, smsclient_params_t *params, smscore_client_t **client)
+int smscore_register_client(smscore_device_t *coredev,
+                           smsclient_params_t *params,
+                           smscore_client_t **client)
 {
        smscore_client_t *newclient;
        /* check that no other channel with same parameters exists */
@@ -1054,7 +1099,8 @@ int smscore_register_client(smscore_device_t *coredev, smsclient_params_t *param
 /**
  * frees smsclient object and all subclients associated with it
  *
- * @param client pointer to smsclient object returned by smscore_register_client
+ * @param client pointer to smsclient object returned by
+ *               smscore_register_client
  *
  */
 void smscore_unregister_client(smscore_client_t *client)
@@ -1084,7 +1130,8 @@ void smscore_unregister_client(smscore_client_t *client)
  * verifies that source id is not taken by another client,
  * calls device handler to send requests to the device
  *
- * @param client pointer to smsclient object returned by smscore_register_client
+ * @param client pointer to smsclient object returned by
+ *               smscore_register_client
  * @param buffer pointer to a request buffer
  * @param size size (in bytes) of request buffer
  *
index 4860e318a5b8c10ad2b879ec147e167e2054364d..2a823b37ccf71b213ab9805699ac184a26745a0d 100644 (file)
@@ -50,7 +50,8 @@ typedef struct mutex kmutex_t;
 
 #define SMS_ALLOC_ALIGNMENT                                    128
 #define SMS_DMA_ALIGNMENT                                      16
-#define SMS_ALIGN_ADDRESS(addr) ((((u32)(addr)) + (SMS_DMA_ALIGNMENT-1)) & ~(SMS_DMA_ALIGNMENT-1))
+#define SMS_ALIGN_ADDRESS(addr) \
+       ((((u32)(addr)) + (SMS_DMA_ALIGNMENT-1)) & ~(SMS_DMA_ALIGNMENT-1))
 
 #define SMS_DEVICE_FAMILY2                                     1
 #define SMS_ROM_NO_RESPONSE                                    2
@@ -68,7 +69,8 @@ typedef struct _smscore_device smscore_device_t;
 typedef struct _smscore_client smscore_client_t;
 typedef struct _smscore_buffer smscore_buffer_t;
 
-typedef int (*hotplug_t)(smscore_device_t *coredev, struct device *device, int arrival);
+typedef int (*hotplug_t)(smscore_device_t *coredev,
+                        struct device *device, int arrival);
 
 typedef int (*setmode_t)(void *context, int mode);
 typedef void (*detectmode_t)(void *context, int *mode);
@@ -196,7 +198,8 @@ typedef struct _smsclient_params
        (ptr)->msgType = type; (ptr)->msgSrcId = src; (ptr)->msgDstId = dst; \
        (ptr)->msgLength = len; (ptr)->msgFlags = 0; \
 } while (0)
-#define SMS_INIT_MSG(ptr, type, len) SMS_INIT_MSG_EX(ptr, type, 0, HIF_TASK, len)
+#define SMS_INIT_MSG(ptr, type, len) \
+       SMS_INIT_MSG_EX(ptr, type, 0, HIF_TASK, len)
 
 typedef enum
 {
@@ -243,8 +246,11 @@ typedef struct SmsVersionRes_S
        u8              Step; /* 0 - Step A */
        u8              MetalFix; /* 0 - Metal 0 */
 
-       u8              FirmwareId; /* 0xFF � ROM, otherwise the value indicated by SMSHOSTLIB_DEVICE_MODES_E */
-       u8              SupportedProtocols; /* Bitwise OR combination of supported protocols */
+       u8              FirmwareId; /* 0xFF � ROM, otherwise the
+                                    * value indicated by
+                                    * SMSHOSTLIB_DEVICE_MODES_E */
+       u8              SupportedProtocols; /* Bitwise OR combination of
+                                            * supported protocols */
 
        u8              VersionMajor;
        u8              VersionMinor;
@@ -280,36 +286,44 @@ typedef struct SMSHOSTLIB_STATISTICS_S
        s32  SNR; /* dB */
        u32 BER; /* Post Viterbi BER [1E-5] */
        u32 FIB_CRC;    /* CRC errors percentage, valid only for DAB */
-       u32 TS_PER; /* Transport stream PER, 0xFFFFFFFF indicate N/A, valid only for DVB-T/H */
-       u32 MFER; /* DVB-H frame error rate in percentage, 0xFFFFFFFF indicate N/A, valid only for DVB-H */
+       u32 TS_PER; /* Transport stream PER, 0xFFFFFFFF indicate N/A,
+                    * valid only for DVB-T/H */
+       u32 MFER; /* DVB-H frame error rate in percentage,
+                  * 0xFFFFFFFF indicate N/A, valid only for DVB-H */
        s32  RSSI; /* dBm */
        s32  InBandPwr; /* In band power in dBM */
        s32  CarrierOffset; /* Carrier Offset in bin/1024 */
 
-       /* Transmission parameters */
+       /* Transmission parameters, valid only for DVB-T/H */
        u32 Frequency; /* Frequency in Hz */
-       u32 Bandwidth; /* Bandwidth in MHz, valid only for DVB-T/H */
-       u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4, for DVB-T/H FFT mode carriers in Kilos */
-       u32 ModemState; /* from SMS_DvbModemState_ET , valid only for DVB-T/H */
-       u32 GuardInterval; /* Guard Interval, 1 divided by value , valid only for DVB-T/H */
-       u32 CodeRate; /* Code Rate from SMS_DvbModemState_ET, valid only for DVB-T/H */
-       u32 LPCodeRate; /* Low Priority Code Rate from SMS_DvbModemState_ET, valid only for DVB-T/H */
-       u32 Hierarchy; /* Hierarchy from SMS_Hierarchy_ET, valid only for DVB-T/H */
-       u32 Constellation; /* Constellation from SMS_Constellation_ET, valid only for DVB-T/H */
+       u32 Bandwidth; /* Bandwidth in MHz */
+       u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4,
+                              * for DVB-T/H FFT mode carriers in Kilos */
+       u32 ModemState; /* from SMS_DvbModemState_ET */
+       u32 GuardInterval; /* Guard Interval, 1 divided by value */
+       u32 CodeRate; /* Code Rate from SMS_DvbModemState_ET */
+       u32 LPCodeRate; /* Low Priority Code Rate from SMS_DvbModemState_ET */
+       u32 Hierarchy; /* Hierarchy from SMS_Hierarchy_ET */
+       u32 Constellation; /* Constellation from SMS_Constellation_ET */
 
        /* Burst parameters, valid only for DVB-H */
-       u32 BurstSize; /* Current burst size in bytes, valid only for DVB-H */
-       u32 BurstDuration; /* Current burst duration in mSec, valid only for DVB-H */
-       u32 BurstCycleTime; /* Current burst cycle time in mSec, valid only for DVB-H */
-       u32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec, as calculated by demodulator, valid only for DVB-H */
-       u32 NumOfRows; /* Number of rows in MPE table, valid only for DVB-H */
-       u32 NumOfPaddCols; /* Number of padding columns in MPE table, valid only for DVB-H */
-       u32 NumOfPunctCols; /* Number of puncturing columns in MPE table, valid only for DVB-H */
+       u32 BurstSize; /* Current burst size in bytes */
+       u32 BurstDuration; /* Current burst duration in mSec */
+       u32 BurstCycleTime; /* Current burst cycle time in mSec */
+       u32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec,
+                                      * as calculated by demodulator */
+       u32 NumOfRows; /* Number of rows in MPE table */
+       u32 NumOfPaddCols; /* Number of padding columns in MPE table */
+       u32 NumOfPunctCols; /* Number of puncturing columns in MPE table */
+       /* Burst parameters */
        u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */
        u32 TotalTSPackets; /* Total number of transport-stream packets */
-       u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include errors after MPE RS decoding */
-       u32 NumOfInvalidMpeTlbs; /* Number of MPE tables which include errors after MPE RS decoding */
-       u32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were corrected by MPE RS decoding */
+       u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include
+                               * errors after MPE RS decoding */
+       u32 NumOfInvalidMpeTlbs; /* Number of MPE tables which include errors
+                                 * after MPE RS decoding */
+       u32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were corrected
+                                   * by MPE RS decoding */
 
        /* Common params */
        u32 BERErrorCount; /* Number of errornous SYNC bits. */
@@ -322,7 +336,8 @@ typedef struct SMSHOSTLIB_STATISTICS_S
        u32 PreBER; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */
 
        /* DVB-H TPS parameters */
-       u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; if set to 0xFFFFFFFF cell_id not yet recovered */
+       u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero;
+                    * if set to 0xFFFFFFFF cell_id not yet recovered */
 
 } SMSHOSTLIB_STATISTICS_ST;
 
@@ -341,8 +356,10 @@ typedef struct
 typedef struct SMSHOSTLIB_ISDBT_LAYER_STAT_S
 {
        /* Per-layer information */
-       u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 255 means layer does not exist */
-       u32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET, 255 means layer does not exist */
+       u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET,
+                      * 255 means layer does not exist */
+       u32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET,
+                           * 255 means layer does not exist */
        u32 BER; /* Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */
        u32 BERErrorCount; /* Post Viterbi Error Bits Count */
        u32 BERBitCount; /* Post Viterbi Total Bits Count */
@@ -350,8 +367,10 @@ typedef struct SMSHOSTLIB_ISDBT_LAYER_STAT_S
        u32 TS_PER; /* Transport stream PER [%], 0xFFFFFFFF indicate N/A */
        u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */
        u32 TotalTSPackets; /* Total number of transport-stream packets */
-       u32 TILdepthI; /* Time interleaver depth I parameter, 255 means layer does not exist */
-       u32 NumberOfSegments; /* Number of segments in layer A, 255 means layer does not exist */
+       u32 TILdepthI; /* Time interleaver depth I parameter,
+                       * 255 means layer does not exist */
+       u32 NumberOfSegments; /* Number of segments in layer A,
+                              * 255 means layer does not exist */
        u32 TMCCErrors; /* TMCC errors */
 } SMSHOSTLIB_ISDBT_LAYER_STAT_ST;
 
@@ -364,8 +383,9 @@ typedef struct SMSHOSTLIB_STATISTICS_ISDBT_S
                                * This field MUST always be first in any
                                * statistics structure */
 
-       u32 FullSize; /* Total size of the structure returned by the modem.  If the size requested by
-                         * the host is smaller than FullSize, the struct will be truncated */
+       u32 FullSize; /* Total size of the structure returned by the modem.
+                      * If the size requested by the host is smaller than
+                      * FullSize, the struct will be truncated */
 
        /* Common parameters */
        u32 IsRfLocked; /* 0 - not locked, 1 - locked */
@@ -390,7 +410,8 @@ typedef struct SMSHOSTLIB_STATISTICS_ISDBT_S
 
        /* Per-layer information */
        /* Layers A, B and C */
-       SMSHOSTLIB_ISDBT_LAYER_STAT_ST  LayerInfo[3]; /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */
+       SMSHOSTLIB_ISDBT_LAYER_STAT_ST  LayerInfo[3]; /* Per-layer statistics,
+                                       see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */
 
        /* Interface information */
        u32 SmsToHostTxErrors; /* Total number of transmission errors. */
@@ -399,11 +420,15 @@ typedef struct SMSHOSTLIB_STATISTICS_ISDBT_S
 
 typedef struct SMSHOSTLIB_STATISTICS_DVB_S
 {
-       u32 StatisticsType; /* Enumerator identifying the type of the structure.  Values are the same as SMSHOSTLIB_DEVICE_MODES_E
-                               * This fiels MUST always first in any statistics structure */
-
-       u32 FullSize; /* Total size of the structure returned by the modem.  If the size requested by
-                         * the host is smaller than FullSize, the struct will be truncated */
+       u32 StatisticsType; /* Enumerator identifying the type of the
+                            * structure.  Values are the same as
+                            * SMSHOSTLIB_DEVICE_MODES_E
+                            * This field MUST always first in any
+                            * statistics structure */
+
+       u32 FullSize; /* Total size of the structure returned by the modem.
+                      * If the size requested by the host is smaller than
+                      * FullSize, the struct will be truncated */
        /* Common parameters */
        u32 IsRfLocked; /* 0 - not locked, 1 - locked */
        u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
@@ -415,7 +440,8 @@ typedef struct SMSHOSTLIB_STATISTICS_DVB_S
        u32 BERErrorCount; /* Number of errornous SYNC bits. */
        u32 BERBitCount; /* Total number of SYNC bits. */
        u32 TS_PER; /* Transport stream PER, 0xFFFFFFFF indicate N/A */
-       u32 MFER; /* DVB-H frame error rate in percentage, 0xFFFFFFFF indicate N/A, valid only for DVB-H */
+       u32 MFER; /* DVB-H frame error rate in percentage,
+                  * 0xFFFFFFFF indicate N/A, valid only for DVB-H */
        s32  RSSI; /* dBm */
        s32  InBandPwr; /* In band power in dBM */
        s32  CarrierOffset; /* Carrier Offset in bin/1024 */
@@ -427,29 +453,41 @@ typedef struct SMSHOSTLIB_STATISTICS_DVB_S
        u32 TransmissionMode; /* FFT mode carriers in Kilos */
        u32 GuardInterval; /* Guard Interval, 1 divided by value */
        u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */
-       u32 LPCodeRate; /* Low Priority Code Rate from SMSHOSTLIB_CODE_RATE_ET */
+       u32 LPCodeRate; /* Low Priority Code Rate from
+                        * SMSHOSTLIB_CODE_RATE_ET */
        u32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET */
        u32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET */
 
        /* Burst parameters, valid only for DVB-H */
-       u32 BurstSize; /* Current burst size in bytes, valid only for DVB-H */
-       u32 BurstDuration; /* Current burst duration in mSec, valid only for DVB-H */
-       u32 BurstCycleTime; /* Current burst cycle time in mSec, valid only for DVB-H */
-       u32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec, as calculated by demodulator, valid only for DVB-H */
-       u32 NumOfRows; /* Number of rows in MPE table, valid only for DVB-H */
-       u32 NumOfPaddCols; /* Number of padding columns in MPE table, valid only for DVB-H */
-       u32 NumOfPunctCols; /* Number of puncturing columns in MPE table, valid only for DVB-H */
+       u32 BurstSize; /* Current burst size in bytes */
+       u32 BurstDuration; /* Current burst duration in mSec */
+       u32 BurstCycleTime; /* Current burst cycle time in mSec */
+       u32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec,
+                                      * as calculated by demodulator */
+       u32 NumOfRows; /* Number of rows in MPE table */
+       u32 NumOfPaddCols; /* Number of padding columns in MPE table */
+       u32 NumOfPunctCols; /* Number of puncturing columns in MPE table */
+
        u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */
        u32 TotalTSPackets; /* Total number of transport-stream packets */
-       u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include errors after MPE RS decoding, valid only for DVB-H */
-       u32 NumOfInvalidMpeTlbs; /* Number of MPE tables which include errors after MPE RS decoding, valid only for DVB-H */
-       u32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were corrected by MPE RS decoding, valid only for DVB-H */
+
+       u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include
+                               * errors after MPE RS decoding */
+       u32 NumOfInvalidMpeTlbs; /* Number of MPE tables which include
+                                 * errors after MPE RS decoding */
+       u32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were
+                                   * corrected by MPE RS decoding */
+
        u32 NumMPEReceived; /* DVB-H, Num MPE section received */
 
        /* DVB-H TPS parameters */
        u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; if set to 0xFFFFFFFF cell_id not yet recovered */
-       u32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 - Time Slicing indicator, bit 0 - MPE-FEC indicator */
-       u32 DvbhSrvIndLP; /* DVB-H service indication info, bit 1 - Time Slicing indicator, bit 0 - MPE-FEC indicator */
+       u32 DvbhSrvIndHP; /* DVB-H service indication info,
+                          * bit 1 - Time Slicing indicator,
+                          * bit 0 - MPE-FEC indicator */
+       u32 DvbhSrvIndLP; /* DVB-H service indication info,
+                          * bit 1 - Time Slicing indicator,
+                          * bit 0 - MPE-FEC indicator */
 
        /* Interface information */
        u32 SmsToHostTxErrors; /* Total number of transmission errors. */
@@ -459,10 +497,14 @@ typedef struct SMSHOSTLIB_STATISTICS_DVB_S
 typedef struct SMSHOSTLIB_GPIO_CONFIG_S
 {
        u8      Direction; /* GPIO direction: Input - 0, Output - 1 */
-       u8      PullUpDown; /* PullUp/PullDown: None - 0, PullDown - 1, PullUp - 2, Keeper - 3 */
-       u8      InputCharacteristics; /* Input Characteristics: Normal - 0, Schmitt trigger - 1 */
-       u8      OutputSlewRate; /* Output Slew Rate:    Fast slew rate - 0, Slow slew rate - 1 */
-       u8      OutputDriving; /* Output driving capability: 4mA - 0, 8mA - 1, 12mA - 2, 16mA - 3 */
+       u8      PullUpDown; /* PullUp/PullDown: None - 0,
+                            * PullDown - 1, PullUp - 2, Keeper - 3 */
+       u8      InputCharacteristics; /* Input Characteristics: Normal - 0,
+                                      * Schmitt trigger - 1 */
+       u8      OutputSlewRate; /* Output Slew Rate:
+                                * Fast slew rate - 0, Slow slew rate - 1 */
+       u8      OutputDriving; /* Output driving capability:
+                               * 4mA - 0, 8mA - 1, 12mA - 2, 16mA - 3 */
 } SMSHOSTLIB_GPIO_CONFIG_ST;
 
 typedef struct SMSHOSTLIB_I2C_REQ_S
index e3f09646bb81e054d45490f6abc6774f013638fc..f46e7facdb6b9e230ed99ca874dd38914076c83e 100644 (file)
@@ -313,7 +313,8 @@ int smsdvb_hotplug(smscore_device_t *coredev,
                return 0;
 
        if (smscore_get_device_mode(coredev) != 4) {
-               printk(KERN_ERR "%sSMS Device mode is not set for DVB operation.\n", __func__);
+               printk(KERN_ERR "%sSMS Device mode is not set for "
+                      "DVB operation.\n", __func__);
                return 0;
        }
 
index 2361f1a5e3c471e0c16f4be4f9a15ac524f2c5e9..102c5857a23d596aa0e4f8897651f3ff715d3332 100644 (file)
@@ -395,7 +395,8 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
        rc = usb_clear_halt(udev, usb_rcvbulkpipe(udev, 0x02));
 
        if (intf->num_altsetting > 0) {
-               rc = usb_set_interface(udev, intf->cur_altsetting->desc.bInterfaceNumber, 0);
+               rc = usb_set_interface(
+                       udev, intf->cur_altsetting->desc.bInterfaceNumber, 0);
                if (rc < 0) {
                        printk(KERN_INFO "%s usb_set_interface failed, "
                               "rc %d\n", __func__, rc);
@@ -421,7 +422,8 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
                snprintf(devpath, sizeof(devpath), "usb\\%d-%s",
                         udev->bus->busnum, udev->devpath);
                printk(KERN_INFO "stellar device was found.\n");
-               return smsusb1_load_firmware(udev, smscore_registry_getmode(devpath));
+               return smsusb1_load_firmware(
+                               udev, smscore_registry_getmode(devpath));
        }
 
        rc = smsusb_init_device(intf);