mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 03:21:32 +00:00
[media] staging: as102: Replace pragma(pack) with attribute __packed
Cc: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
57753767dd
commit
fa1a13f621
@ -20,11 +20,10 @@
|
|||||||
|
|
||||||
extern int dual_tuner;
|
extern int dual_tuner;
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct as10x_raw_fw_pkt {
|
struct as10x_raw_fw_pkt {
|
||||||
unsigned char address[4];
|
unsigned char address[4];
|
||||||
unsigned char data[MAX_FW_PKT_SIZE - 6];
|
unsigned char data[MAX_FW_PKT_SIZE - 6];
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
struct as10x_fw_pkt_t {
|
struct as10x_fw_pkt_t {
|
||||||
union {
|
union {
|
||||||
@ -32,8 +31,7 @@ struct as10x_fw_pkt_t {
|
|||||||
unsigned char length[2];
|
unsigned char length[2];
|
||||||
} u;
|
} u;
|
||||||
struct as10x_raw_fw_pkt raw;
|
struct as10x_raw_fw_pkt raw;
|
||||||
};
|
} __packed;
|
||||||
#pragma pack()
|
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
int as102_fw_upload(struct as102_bus_adapter_t *bus_adap);
|
int as102_fw_upload(struct as102_bus_adapter_t *bus_adap);
|
||||||
|
@ -94,8 +94,6 @@ enum control_proc {
|
|||||||
CONTROL_PROC_TURNOFF_RSP = 0xFF00
|
CONTROL_PROC_TURNOFF_RSP = 0xFF00
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
union as10x_turn_on {
|
union as10x_turn_on {
|
||||||
/* request */
|
/* request */
|
||||||
struct {
|
struct {
|
||||||
@ -109,7 +107,7 @@ union as10x_turn_on {
|
|||||||
/* error */
|
/* error */
|
||||||
uint8_t error;
|
uint8_t error;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_turn_off {
|
union as10x_turn_off {
|
||||||
/* request */
|
/* request */
|
||||||
@ -124,7 +122,7 @@ union as10x_turn_off {
|
|||||||
/* error */
|
/* error */
|
||||||
uint8_t err;
|
uint8_t err;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_set_tune {
|
union as10x_set_tune {
|
||||||
/* request */
|
/* request */
|
||||||
@ -141,7 +139,7 @@ union as10x_set_tune {
|
|||||||
/* response error */
|
/* response error */
|
||||||
uint8_t error;
|
uint8_t error;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_get_tune_status {
|
union as10x_get_tune_status {
|
||||||
/* request */
|
/* request */
|
||||||
@ -158,7 +156,7 @@ union as10x_get_tune_status {
|
|||||||
/* tune status */
|
/* tune status */
|
||||||
struct as10x_tune_status sts;
|
struct as10x_tune_status sts;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_get_tps {
|
union as10x_get_tps {
|
||||||
/* request */
|
/* request */
|
||||||
@ -175,7 +173,7 @@ union as10x_get_tps {
|
|||||||
/* tps details */
|
/* tps details */
|
||||||
struct as10x_tps tps;
|
struct as10x_tps tps;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_common {
|
union as10x_common {
|
||||||
/* request */
|
/* request */
|
||||||
@ -190,7 +188,7 @@ union as10x_common {
|
|||||||
/* response error */
|
/* response error */
|
||||||
uint8_t error;
|
uint8_t error;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_add_pid_filter {
|
union as10x_add_pid_filter {
|
||||||
/* request */
|
/* request */
|
||||||
@ -213,7 +211,7 @@ union as10x_add_pid_filter {
|
|||||||
/* Filter id */
|
/* Filter id */
|
||||||
uint8_t filter_id;
|
uint8_t filter_id;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_del_pid_filter {
|
union as10x_del_pid_filter {
|
||||||
/* request */
|
/* request */
|
||||||
@ -230,7 +228,7 @@ union as10x_del_pid_filter {
|
|||||||
/* response error */
|
/* response error */
|
||||||
uint8_t error;
|
uint8_t error;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_start_streaming {
|
union as10x_start_streaming {
|
||||||
/* request */
|
/* request */
|
||||||
@ -245,7 +243,7 @@ union as10x_start_streaming {
|
|||||||
/* error */
|
/* error */
|
||||||
uint8_t error;
|
uint8_t error;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_stop_streaming {
|
union as10x_stop_streaming {
|
||||||
/* request */
|
/* request */
|
||||||
@ -260,7 +258,7 @@ union as10x_stop_streaming {
|
|||||||
/* error */
|
/* error */
|
||||||
uint8_t error;
|
uint8_t error;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_get_demod_stats {
|
union as10x_get_demod_stats {
|
||||||
/* request */
|
/* request */
|
||||||
@ -277,7 +275,7 @@ union as10x_get_demod_stats {
|
|||||||
/* demod stats */
|
/* demod stats */
|
||||||
struct as10x_demod_stats stats;
|
struct as10x_demod_stats stats;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_get_impulse_resp {
|
union as10x_get_impulse_resp {
|
||||||
/* request */
|
/* request */
|
||||||
@ -294,7 +292,7 @@ union as10x_get_impulse_resp {
|
|||||||
/* impulse response ready */
|
/* impulse response ready */
|
||||||
uint8_t is_ready;
|
uint8_t is_ready;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_fw_context {
|
union as10x_fw_context {
|
||||||
/* request */
|
/* request */
|
||||||
@ -319,7 +317,7 @@ union as10x_fw_context {
|
|||||||
/* error */
|
/* error */
|
||||||
uint8_t error;
|
uint8_t error;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_set_register {
|
union as10x_set_register {
|
||||||
/* request */
|
/* request */
|
||||||
@ -338,7 +336,7 @@ union as10x_set_register {
|
|||||||
/* error */
|
/* error */
|
||||||
uint8_t error;
|
uint8_t error;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_get_register {
|
union as10x_get_register {
|
||||||
/* request */
|
/* request */
|
||||||
@ -357,7 +355,7 @@ union as10x_get_register {
|
|||||||
/* register content */
|
/* register content */
|
||||||
struct as10x_register_value reg_val;
|
struct as10x_register_value reg_val;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_cfg_change_mode {
|
union as10x_cfg_change_mode {
|
||||||
/* request */
|
/* request */
|
||||||
@ -374,14 +372,14 @@ union as10x_cfg_change_mode {
|
|||||||
/* error */
|
/* error */
|
||||||
uint8_t error;
|
uint8_t error;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
struct as10x_cmd_header_t {
|
struct as10x_cmd_header_t {
|
||||||
uint16_t req_id;
|
uint16_t req_id;
|
||||||
uint16_t prog;
|
uint16_t prog;
|
||||||
uint16_t version;
|
uint16_t version;
|
||||||
uint16_t data_len;
|
uint16_t data_len;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
#define DUMP_BLOCK_SIZE 16
|
#define DUMP_BLOCK_SIZE 16
|
||||||
|
|
||||||
@ -412,7 +410,7 @@ union as10x_dump_memory {
|
|||||||
uint32_t data32[DUMP_BLOCK_SIZE / sizeof(uint32_t)];
|
uint32_t data32[DUMP_BLOCK_SIZE / sizeof(uint32_t)];
|
||||||
} u;
|
} u;
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_dumplog_memory {
|
union as10x_dumplog_memory {
|
||||||
struct {
|
struct {
|
||||||
@ -431,7 +429,7 @@ union as10x_dumplog_memory {
|
|||||||
/* dump data */
|
/* dump data */
|
||||||
uint8_t data[DUMP_BLOCK_SIZE];
|
uint8_t data[DUMP_BLOCK_SIZE];
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
union as10x_raw_data {
|
union as10x_raw_data {
|
||||||
/* request */
|
/* request */
|
||||||
@ -446,7 +444,7 @@ union as10x_raw_data {
|
|||||||
uint8_t data[64 - sizeof(struct as10x_cmd_header_t) /* header */
|
uint8_t data[64 - sizeof(struct as10x_cmd_header_t) /* header */
|
||||||
- 2 /* proc_id */ - 1 /* rc */];
|
- 2 /* proc_id */ - 1 /* rc */];
|
||||||
} rsp;
|
} rsp;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
struct as10x_cmd_t {
|
struct as10x_cmd_t {
|
||||||
struct as10x_cmd_header_t header;
|
struct as10x_cmd_header_t header;
|
||||||
@ -471,15 +469,14 @@ struct as10x_cmd_t {
|
|||||||
union as10x_dumplog_memory dumplog_memory;
|
union as10x_dumplog_memory dumplog_memory;
|
||||||
union as10x_raw_data raw_data;
|
union as10x_raw_data raw_data;
|
||||||
} body;
|
} body;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
struct as10x_token_cmd_t {
|
struct as10x_token_cmd_t {
|
||||||
/* token cmd */
|
/* token cmd */
|
||||||
struct as10x_cmd_t c;
|
struct as10x_cmd_t c;
|
||||||
/* token response */
|
/* token response */
|
||||||
struct as10x_cmd_t r;
|
struct as10x_cmd_t r;
|
||||||
};
|
} __packed;
|
||||||
#pragma pack()
|
|
||||||
|
|
||||||
|
|
||||||
/**************************/
|
/**************************/
|
||||||
|
@ -111,7 +111,6 @@
|
|||||||
#define CFG_MODE_OFF 1
|
#define CFG_MODE_OFF 1
|
||||||
#define CFG_MODE_AUTO 2
|
#define CFG_MODE_AUTO 2
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct as10x_tps {
|
struct as10x_tps {
|
||||||
uint8_t constellation;
|
uint8_t constellation;
|
||||||
uint8_t hierarchy;
|
uint8_t hierarchy;
|
||||||
@ -123,7 +122,7 @@ struct as10x_tps {
|
|||||||
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;
|
||||||
|
|
||||||
struct as10x_tune_args {
|
struct as10x_tune_args {
|
||||||
/* frequency */
|
/* frequency */
|
||||||
@ -144,7 +143,7 @@ struct as10x_tune_args {
|
|||||||
uint8_t guard_interval;
|
uint8_t guard_interval;
|
||||||
/* transmission mode */
|
/* transmission mode */
|
||||||
uint8_t transmission_mode;
|
uint8_t transmission_mode;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
struct as10x_tune_status {
|
struct as10x_tune_status {
|
||||||
/* tune status */
|
/* tune status */
|
||||||
@ -155,7 +154,7 @@ struct as10x_tune_status {
|
|||||||
uint16_t PER;
|
uint16_t PER;
|
||||||
/* bit error rate 10^-4 */
|
/* bit error rate 10^-4 */
|
||||||
uint16_t BER;
|
uint16_t BER;
|
||||||
};
|
} __packed;
|
||||||
|
|
||||||
struct as10x_demod_stats {
|
struct as10x_demod_stats {
|
||||||
/* frame counter */
|
/* frame counter */
|
||||||
@ -168,13 +167,13 @@ struct as10x_demod_stats {
|
|||||||
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;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
struct as10x_register_value {
|
struct as10x_register_value {
|
||||||
uint8_t mode;
|
uint8_t mode;
|
||||||
@ -183,9 +182,7 @@ struct as10x_register_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;
|
||||||
|
|
||||||
#pragma pack()
|
|
||||||
|
|
||||||
struct as10x_register_addr {
|
struct as10x_register_addr {
|
||||||
/* register addr */
|
/* register addr */
|
||||||
|
Loading…
Reference in New Issue
Block a user