Commit 14e0e4bf authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[media] staging: as102: Whitespace and indentation cleanup

Remove some unnecessary braces. Replace spaces with tabs where
expected. Replace gcc specific __FUNCTION__ with  C99 __func__.
No functional changes.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarSylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 88010289
...@@ -121,22 +121,22 @@ static int as10x_pid_filter(struct as102_dev_t *dev, ...@@ -121,22 +121,22 @@ static int as10x_pid_filter(struct as102_dev_t *dev,
switch (onoff) { switch (onoff) {
case 0: case 0:
ret = as10x_cmd_del_PID_filter(bus_adap, (uint16_t) pid); ret = as10x_cmd_del_PID_filter(bus_adap, (uint16_t) pid);
dprintk(debug, "DEL_PID_FILTER([%02d] 0x%04x) ret = %d\n", dprintk(debug, "DEL_PID_FILTER([%02d] 0x%04x) ret = %d\n",
index, pid, ret); index, pid, ret);
break; break;
case 1: case 1:
{ {
struct as10x_ts_filter filter; struct as10x_ts_filter filter;
filter.type = TS_PID_TYPE_TS; filter.type = TS_PID_TYPE_TS;
filter.idx = 0xFF; filter.idx = 0xFF;
filter.pid = pid; filter.pid = pid;
ret = as10x_cmd_add_PID_filter(bus_adap, &filter); ret = as10x_cmd_add_PID_filter(bus_adap, &filter);
dprintk(debug, "ADD_PID_FILTER([%02d -> %02d], 0x%04x) ret = %d\n", dprintk(debug, "ADD_PID_FILTER([%02d -> %02d], 0x%04x) ret = %d\n",
index, filter.idx, filter.pid, ret); index, filter.idx, filter.pid, ret);
break; break;
} }
} }
...@@ -157,10 +157,9 @@ static int as102_dvb_dmx_start_feed(struct dvb_demux_feed *dvbdmxfeed) ...@@ -157,10 +157,9 @@ static int as102_dvb_dmx_start_feed(struct dvb_demux_feed *dvbdmxfeed)
if (mutex_lock_interruptible(&as102_dev->sem)) if (mutex_lock_interruptible(&as102_dev->sem))
return -ERESTARTSYS; return -ERESTARTSYS;
if (pid_filtering) { if (pid_filtering)
as10x_pid_filter(as102_dev, as10x_pid_filter(as102_dev, dvbdmxfeed->index,
dvbdmxfeed->index, dvbdmxfeed->pid, 1); dvbdmxfeed->pid, 1);
}
if (as102_dev->streaming++ == 0) if (as102_dev->streaming++ == 0)
ret = as102_start_stream(as102_dev); ret = as102_start_stream(as102_dev);
...@@ -183,10 +182,9 @@ static int as102_dvb_dmx_stop_feed(struct dvb_demux_feed *dvbdmxfeed) ...@@ -183,10 +182,9 @@ static int as102_dvb_dmx_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
if (--as102_dev->streaming == 0) if (--as102_dev->streaming == 0)
as102_stop_stream(as102_dev); as102_stop_stream(as102_dev);
if (pid_filtering) { if (pid_filtering)
as10x_pid_filter(as102_dev, as10x_pid_filter(as102_dev, dvbdmxfeed->index,
dvbdmxfeed->index, dvbdmxfeed->pid, 0); dvbdmxfeed->pid, 0);
}
mutex_unlock(&as102_dev->sem); mutex_unlock(&as102_dev->sem);
LEAVE(); LEAVE();
......
...@@ -32,13 +32,13 @@ extern struct usb_driver as102_usb_driver; ...@@ -32,13 +32,13 @@ extern struct usb_driver as102_usb_driver;
#define dprintk(debug, args...) \ #define dprintk(debug, args...) \
do { if (debug) { \ do { if (debug) { \
printk(KERN_DEBUG "%s: ",__FUNCTION__); \ pr_debug("%s: ", __func__); \
printk(args); \ printk(args); \
} } while (0) } } while (0)
#ifdef TRACE #ifdef TRACE
#define ENTER() printk(">> enter %s\n", __FUNCTION__) #define ENTER() pr_debug(">> enter %s\n", __func__)
#define LEAVE() printk("<< leave %s\n", __FUNCTION__) #define LEAVE() pr_debug("<< leave %s\n", __func__)
#else #else
#define ENTER() #define ENTER()
#define LEAVE() #define LEAVE()
......
...@@ -56,16 +56,16 @@ static const char *as102_device_names[] = { ...@@ -56,16 +56,16 @@ static const char *as102_device_names[] = {
}; };
struct usb_driver as102_usb_driver = { struct usb_driver as102_usb_driver = {
.name = DRIVER_FULL_NAME, .name = DRIVER_FULL_NAME,
.probe = as102_usb_probe, .probe = as102_usb_probe,
.disconnect = as102_usb_disconnect, .disconnect = as102_usb_disconnect,
.id_table = as102_usb_id_table .id_table = as102_usb_id_table
}; };
static const struct file_operations as102_dev_fops = { static const struct file_operations as102_dev_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = as102_open, .open = as102_open,
.release = as102_release, .release = as102_release,
}; };
static struct usb_class_driver as102_usb_class_driver = { static struct usb_class_driver as102_usb_class_driver = {
......
...@@ -232,7 +232,7 @@ int as10x_cmd_get_tune_status(as10x_handle_t *phandle, ...@@ -232,7 +232,7 @@ int as10x_cmd_get_tune_status(as10x_handle_t *phandle,
} }
/** /**
* send get TPS command to AS10x * as10x_cmd_get_tps - send get TPS command to AS10x
* @phandle: pointer to AS10x handle * @phandle: pointer to AS10x handle
* @ptps: pointer to TPS parameters structure * @ptps: pointer to TPS parameters structure
* *
......
This diff is collapsed.
...@@ -24,9 +24,9 @@ struct as102_dev_t; ...@@ -24,9 +24,9 @@ struct as102_dev_t;
#include "as10x_cmd.h" #include "as10x_cmd.h"
/* values for "mode" field */ /* values for "mode" field */
#define REGMODE8 8 #define REGMODE8 8
#define REGMODE16 16 #define REGMODE16 16
#define REGMODE32 32 #define REGMODE32 32
struct as102_priv_ops_t { struct as102_priv_ops_t {
int (*upload_fw_pkt) (struct as102_bus_adapter_t *bus_adap, int (*upload_fw_pkt) (struct as102_bus_adapter_t *bus_adap,
......
...@@ -26,170 +26,169 @@ ...@@ -26,170 +26,169 @@
/*********************************/ /*********************************/
/* bandwidth constant values */ /* bandwidth constant values */
#define BW_5_MHZ 0x00 #define BW_5_MHZ 0x00
#define BW_6_MHZ 0x01 #define BW_6_MHZ 0x01
#define BW_7_MHZ 0x02 #define BW_7_MHZ 0x02
#define BW_8_MHZ 0x03 #define BW_8_MHZ 0x03
/* hierarchy priority selection values */ /* hierarchy priority selection values */
#define HIER_NO_PRIORITY 0x00 #define HIER_NO_PRIORITY 0x00
#define HIER_LOW_PRIORITY 0x01 #define HIER_LOW_PRIORITY 0x01
#define HIER_HIGH_PRIORITY 0x02 #define HIER_HIGH_PRIORITY 0x02
/* constellation available values */ /* constellation available values */
#define CONST_QPSK 0x00 #define CONST_QPSK 0x00
#define CONST_QAM16 0x01 #define CONST_QAM16 0x01
#define CONST_QAM64 0x02 #define CONST_QAM64 0x02
#define CONST_UNKNOWN 0xFF #define CONST_UNKNOWN 0xFF
/* hierarchy available values */ /* hierarchy available values */
#define HIER_NONE 0x00 #define HIER_NONE 0x00
#define HIER_ALPHA_1 0x01 #define HIER_ALPHA_1 0x01
#define HIER_ALPHA_2 0x02 #define HIER_ALPHA_2 0x02
#define HIER_ALPHA_4 0x03 #define HIER_ALPHA_4 0x03
#define HIER_UNKNOWN 0xFF #define HIER_UNKNOWN 0xFF
/* interleaving available values */ /* interleaving available values */
#define INTLV_NATIVE 0x00 #define INTLV_NATIVE 0x00
#define INTLV_IN_DEPTH 0x01 #define INTLV_IN_DEPTH 0x01
#define INTLV_UNKNOWN 0xFF #define INTLV_UNKNOWN 0xFF
/* code rate available values */ /* code rate available values */
#define CODE_RATE_1_2 0x00 #define CODE_RATE_1_2 0x00
#define CODE_RATE_2_3 0x01 #define CODE_RATE_2_3 0x01
#define CODE_RATE_3_4 0x02 #define CODE_RATE_3_4 0x02
#define CODE_RATE_5_6 0x03 #define CODE_RATE_5_6 0x03
#define CODE_RATE_7_8 0x04 #define CODE_RATE_7_8 0x04
#define CODE_RATE_UNKNOWN 0xFF #define CODE_RATE_UNKNOWN 0xFF
/* guard interval available values */ /* guard interval available values */
#define GUARD_INT_1_32 0x00 #define GUARD_INT_1_32 0x00
#define GUARD_INT_1_16 0x01 #define GUARD_INT_1_16 0x01
#define GUARD_INT_1_8 0x02 #define GUARD_INT_1_8 0x02
#define GUARD_INT_1_4 0x03 #define GUARD_INT_1_4 0x03
#define GUARD_UNKNOWN 0xFF #define GUARD_UNKNOWN 0xFF
/* transmission mode available values */ /* transmission mode available values */
#define TRANS_MODE_2K 0x00 #define TRANS_MODE_2K 0x00
#define TRANS_MODE_8K 0x01 #define TRANS_MODE_8K 0x01
#define TRANS_MODE_4K 0x02 #define TRANS_MODE_4K 0x02
#define TRANS_MODE_UNKNOWN 0xFF #define TRANS_MODE_UNKNOWN 0xFF
/* DVBH signalling available values */ /* DVBH signalling available values */
#define TIMESLICING_PRESENT 0x01 #define TIMESLICING_PRESENT 0x01
#define MPE_FEC_PRESENT 0x02 #define MPE_FEC_PRESENT 0x02
/* tune state available */ /* tune state available */
#define TUNE_STATUS_NOT_TUNED 0x00 #define TUNE_STATUS_NOT_TUNED 0x00
#define TUNE_STATUS_IDLE 0x01 #define TUNE_STATUS_IDLE 0x01
#define TUNE_STATUS_LOCKING 0x02 #define TUNE_STATUS_LOCKING 0x02
#define TUNE_STATUS_SIGNAL_DVB_OK 0x03 #define TUNE_STATUS_SIGNAL_DVB_OK 0x03
#define TUNE_STATUS_STREAM_DETECTED 0x04 #define TUNE_STATUS_STREAM_DETECTED 0x04
#define TUNE_STATUS_STREAM_TUNED 0x05 #define TUNE_STATUS_STREAM_TUNED 0x05
#define TUNE_STATUS_ERROR 0xFF #define TUNE_STATUS_ERROR 0xFF
/* available TS FID filter types */ /* available TS FID filter types */
#define TS_PID_TYPE_TS 0 #define TS_PID_TYPE_TS 0
#define TS_PID_TYPE_PSI_SI 1 #define TS_PID_TYPE_PSI_SI 1
#define TS_PID_TYPE_MPE 2 #define TS_PID_TYPE_MPE 2
/* number of echos available */ /* number of echos available */
#define MAX_ECHOS 15 #define MAX_ECHOS 15
/* Context types */ /* Context types */
#define CONTEXT_LNA 1010 #define CONTEXT_LNA 1010
#define CONTEXT_ELNA_HYSTERESIS 4003 #define CONTEXT_ELNA_HYSTERESIS 4003
#define CONTEXT_ELNA_GAIN 4004 #define CONTEXT_ELNA_GAIN 4004
#define CONTEXT_MER_THRESHOLD 5005 #define CONTEXT_MER_THRESHOLD 5005
#define CONTEXT_MER_OFFSET 5006 #define CONTEXT_MER_OFFSET 5006
#define CONTEXT_IR_STATE 7000 #define CONTEXT_IR_STATE 7000
#define CONTEXT_TSOUT_MSB_FIRST 7004 #define CONTEXT_TSOUT_MSB_FIRST 7004
#define CONTEXT_TSOUT_FALLING_EDGE 7005 #define CONTEXT_TSOUT_FALLING_EDGE 7005
/* Configuration modes */ /* Configuration modes */
#define CFG_MODE_ON 0 #define CFG_MODE_ON 0
#define CFG_MODE_OFF 1 #define CFG_MODE_OFF 1
#define CFG_MODE_AUTO 2 #define CFG_MODE_AUTO 2
struct as10x_tps { struct as10x_tps {
uint8_t constellation; uint8_t constellation;
uint8_t hierarchy; uint8_t hierarchy;
uint8_t interleaving_mode; uint8_t interleaving_mode;
uint8_t code_rate_HP; uint8_t code_rate_HP;
uint8_t code_rate_LP; uint8_t code_rate_LP;
uint8_t guard_interval; uint8_t guard_interval;
uint8_t transmission_mode; uint8_t transmission_mode;
uint8_t DVBH_mask_HP; uint8_t DVBH_mask_HP;
uint8_t DVBH_mask_LP; uint8_t DVBH_mask_LP;
uint16_t cell_ID; uint16_t cell_ID;
} __packed; } __packed;
struct as10x_tune_args { struct as10x_tune_args {
/* frequency */ /* frequency */
uint32_t freq; uint32_t freq;
/* bandwidth */ /* bandwidth */
uint8_t bandwidth; uint8_t bandwidth;
/* hierarchy selection */ /* hierarchy selection */
uint8_t hier_select; uint8_t hier_select;
/* constellation */ /* constellation */
uint8_t constellation; uint8_t constellation;
/* hierarchy */ /* hierarchy */
uint8_t hierarchy; uint8_t hierarchy;
/* interleaving mode */ /* interleaving mode */
uint8_t interleaving_mode; uint8_t interleaving_mode;
/* code rate */ /* code rate */
uint8_t code_rate; uint8_t code_rate;
/* guard interval */ /* guard interval */
uint8_t guard_interval; uint8_t guard_interval;
/* transmission mode */ /* transmission mode */
uint8_t transmission_mode; uint8_t transmission_mode;
} __packed; } __packed;
struct as10x_tune_status { struct as10x_tune_status {
/* tune status */ /* tune status */
uint8_t tune_state; uint8_t tune_state;
/* signal strength */ /* signal strength */
int16_t signal_strength; int16_t signal_strength;
/* packet error rate 10^-4 */ /* packet error rate 10^-4 */
uint16_t PER; uint16_t PER;
/* bit error rate 10^-4 */ /* bit error rate 10^-4 */
uint16_t BER; uint16_t BER;
} __packed; } __packed;
struct as10x_demod_stats { struct as10x_demod_stats {
/* frame counter */ /* frame counter */
uint32_t frame_count; uint32_t frame_count;
/* Bad frame counter */ /* Bad frame counter */
uint32_t bad_frame_count; uint32_t bad_frame_count;
/* Number of wrong bytes fixed by Reed-Solomon */ /* Number of wrong bytes fixed by Reed-Solomon */
uint32_t bytes_fixed_by_rs; uint32_t bytes_fixed_by_rs;
/* Averaged MER */ /* Averaged MER */
uint16_t mer; uint16_t mer;
/* statistics calculation state indicator (started or not) */ /* statistics calculation state indicator (started or not) */
uint8_t has_started; uint8_t has_started;
} __packed; } __packed;
struct as10x_ts_filter { struct as10x_ts_filter {
uint16_t pid; /** valid PID value 0x00 : 0x2000 */ uint16_t pid; /* valid PID value 0x00 : 0x2000 */
uint8_t type; /** Red TS_PID_TYPE_<N> values */ uint8_t type; /* Red TS_PID_TYPE_<N> values */
uint8_t idx; /** index in filtering table */ uint8_t idx; /* index in filtering table */
} __packed; } __packed;
struct as10x_register_value { struct as10x_register_value {
uint8_t mode; uint8_t mode;
union { union {
uint8_t value8; /* 8 bit value */ uint8_t value8; /* 8 bit value */
uint16_t value16; /* 16 bit value */ uint16_t value16; /* 16 bit value */
uint32_t value32; /* 32 bit value */ uint32_t value32; /* 32 bit value */
}u; } u;
} __packed; } __packed;
struct as10x_register_addr { struct as10x_register_addr {
/* register addr */ /* register addr */
uint32_t addr; uint32_t addr;
/* register mode access */ /* register mode access */
uint8_t mode; uint8_t mode;
}; };
#endif #endif
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