From: Piotr Chmura <chmooreck@poczta.onet.pl>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Greg KH <gregkh@suse.de>,
Devin Heitmueller <dheitmueller@kernellabs.com>,
Mauro Carvalho Chehab <maurochehab@gmail.com>,
Patrick Dickey <pdickeybeta@gmail.com>,
LMML <linux-media@vger.kernel.org>,
devel@driverdev.osuosl.org
Subject: [PATCH 3/7] staging/as102: cleanup - get rid of typedefs
Date: Sat, 15 Oct 2011 22:54:32 +0200 [thread overview]
Message-ID: <4E99F308.20406@poczta.onet.pl> (raw)
In-Reply-To: <4E9992F9.7000101@poczta.onet.pl>
staging as102: cleanup - get rid off typedefs
Cleanup code: get rid of typedef in structures and union definitions.
Signed-off-by: Piotr Chmura<chmooreck@poczta.onet.pl>
Cc: Devin Heitmueller<dheitmueller@kernellabs.com>
Cc: Greg HK<gregkh@suse.de>
diff -Nur linux.as102.02-nbox/drivers/staging/as102/as10x_cmd.h linux.as102.03-typedefs/drivers/staging/as102/as10x_cmd.h
--- linux.as102.02-nbox/drivers/staging/as102/as10x_cmd.h 2011-10-14 17:55:02.000000000 +0200
+++ linux.as102.03-typedefs/drivers/staging/as102/as10x_cmd.h 2011-10-14 18:48:39.000000000 +0200
@@ -52,7 +52,7 @@
/*********************************/
/* TYPE DEFINITION */
/*********************************/
-typedef enum {
+enum control_proc {
CONTROL_PROC_TURNON = 0x0001,
CONTROL_PROC_TURNON_RSP = 0x0100,
CONTROL_PROC_SET_REGISTER = 0x0002,
@@ -92,11 +92,11 @@
CONTROL_PROC_DUMPLOG_MEMORY_RSP = 0xFE00,
CONTROL_PROC_TURNOFF = 0x00FF,
CONTROL_PROC_TURNOFF_RSP = 0xFF00
-} control_proc;
+};
#pragma pack(1)
-typedef union {
+union TURN_ON {
/* request */
struct {
/* request identifier */
@@ -109,9 +109,9 @@
/* error */
uint8_t error;
} rsp;
-} TURN_ON;
+};
-typedef union {
+union TURN_OFF {
/* request */
struct {
/* request identifier */
@@ -124,9 +124,9 @@
/* error */
uint8_t err;
} rsp;
-} TURN_OFF;
+};
-typedef union {
+union SET_TUNE {
/* request */
struct {
/* request identifier */
@@ -141,9 +141,9 @@
/* response error */
uint8_t error;
} rsp;
-} SET_TUNE;
+};
-typedef union {
+union GET_TUNE_STATUS {
/* request */
struct {
/* request identifier */
@@ -158,9 +158,9 @@
/* tune status */
struct as10x_tune_status sts;
} rsp;
-} GET_TUNE_STATUS;
+};
-typedef union {
+union GET_TPS {
/* request */
struct {
/* request identifier */
@@ -175,9 +175,9 @@
/* tps details */
struct as10x_tps tps;
} rsp;
-} GET_TPS;
+};
-typedef union {
+union COMMON {
/* request */
struct {
/* request identifier */
@@ -190,9 +190,9 @@
/* response error */
uint8_t error;
} rsp;
-} COMMON;
+};
-typedef union {
+union ADD_PID_FILTER {
/* request */
struct {
/* request identifier */
@@ -213,9 +213,9 @@
/* Filter id */
uint8_t filter_id;
} rsp;
-} ADD_PID_FILTER;
+};
-typedef union {
+union DEL_PID_FILTER {
/* request */
struct {
/* request identifier */
@@ -230,9 +230,9 @@
/* response error */
uint8_t error;
} rsp;
-} DEL_PID_FILTER;
+};
-typedef union {
+union START_STREAMING {
/* request */
struct {
/* request identifier */
@@ -245,9 +245,9 @@
/* error */
uint8_t error;
} rsp;
-} START_STREAMING;
+};
-typedef union {
+union STOP_STREAMING {
/* request */
struct {
/* request identifier */
@@ -260,9 +260,9 @@
/* error */
uint8_t error;
} rsp;
-} STOP_STREAMING;
+};
-typedef union {
+union GET_DEMOD_STATS {
/* request */
struct {
/* request identifier */
@@ -277,9 +277,9 @@
/* demod stats */
struct as10x_demod_stats stats;
} rsp;
-} GET_DEMOD_STATS;
+};
-typedef union {
+union GET_IMPULSE_RESP {
/* request */
struct {
/* request identifier */
@@ -294,9 +294,9 @@
/* impulse response ready */
uint8_t is_ready;
} rsp;
-} GET_IMPULSE_RESP;
+};
-typedef union {
+union FW_CONTEXT {
/* request */
struct {
/* request identifier */
@@ -319,9 +319,9 @@
/* error */
uint8_t error;
} rsp;
-} FW_CONTEXT;
+};
-typedef union {
+union SET_REGISTER {
/* request */
struct {
/* response identifier */
@@ -338,9 +338,9 @@
/* error */
uint8_t error;
} rsp;
-} SET_REGISTER;
+};
-typedef union {
+union GET_REGISTER {
/* request */
struct {
/* response identifier */
@@ -357,9 +357,9 @@
/* register content */
struct as10x_register_value reg_val;
} rsp;
-} GET_REGISTER;
+};
-typedef union {
+union CFG_CHANGE_MODE {
/* request */
struct {
/* request identifier */
@@ -374,7 +374,7 @@
/* error */
uint8_t error;
} rsp;
-} CFG_CHANGE_MODE;
+};
struct as10x_cmd_header_t {
uint16_t req_id;
@@ -384,7 +384,7 @@
};
#define DUMP_BLOCK_SIZE 16
-typedef union {
+union DUMP_MEMORY {
/* request */
struct {
/* request identifier */
@@ -411,9 +411,9 @@
uint32_t data32[DUMP_BLOCK_SIZE / sizeof(uint32_t)];
} u;
} rsp;
-} DUMP_MEMORY;
+};
-typedef union {
+union DUMPLOG_MEMORY {
struct {
/* request identifier */
uint16_t proc_id;
@@ -430,9 +430,9 @@
/* dump data */
uint8_t data[DUMP_BLOCK_SIZE];
} rsp;
-} DUMPLOG_MEMORY;
+};
-typedef union {
+union RAW_DATA {
/* request */
struct {
uint16_t proc_id;
@@ -445,32 +445,32 @@
uint8_t data[64 - sizeof(struct as10x_cmd_header_t) /* header */
- 2 /* proc_id */ - 1 /* rc */];
} rsp;
-} RAW_DATA;
+};
struct as10x_cmd_t {
/* header */
struct as10x_cmd_header_t header;
/* body */
union {
- TURN_ON turn_on;
- TURN_OFF turn_off;
- SET_TUNE set_tune;
- GET_TUNE_STATUS get_tune_status;
- GET_TPS get_tps;
- COMMON common;
- ADD_PID_FILTER add_pid_filter;
- DEL_PID_FILTER del_pid_filter;
- START_STREAMING start_streaming;
- STOP_STREAMING stop_streaming;
- GET_DEMOD_STATS get_demod_stats;
- GET_IMPULSE_RESP get_impulse_rsp;
- FW_CONTEXT context;
- SET_REGISTER set_register;
- GET_REGISTER get_register;
- CFG_CHANGE_MODE cfg_change_mode;
- DUMP_MEMORY dump_memory;
- DUMPLOG_MEMORY dumplog_memory;
- RAW_DATA raw_data;
+ union TURN_ON turn_on;
+ union TURN_OFF turn_off;
+ union SET_TUNE set_tune;
+ union GET_TUNE_STATUS get_tune_status;
+ union GET_TPS get_tps;
+ union COMMON common;
+ union ADD_PID_FILTER add_pid_filter;
+ union DEL_PID_FILTER del_pid_filter;
+ union START_STREAMING start_streaming;
+ union STOP_STREAMING stop_streaming;
+ union GET_DEMOD_STATS get_demod_stats;
+ union GET_IMPULSE_RESP get_impulse_rsp;
+ union FW_CONTEXT context;
+ union SET_REGISTER set_register;
+ union GET_REGISTER get_register;
+ union CFG_CHANGE_MODE cfg_change_mode;
+ union DUMP_MEMORY dump_memory;
+ union DUMPLOG_MEMORY dumplog_memory;
+ union RAW_DATA raw_data;
} body;
};
next prev parent reply other threads:[~2011-10-15 20:54 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-25 12:33 Problems cloning the git repostories Patrick Dickey
2011-09-25 13:55 ` Devin Heitmueller
2011-09-26 3:25 ` Mauro Carvalho Chehab
2011-09-27 2:20 ` Devin Heitmueller
2011-09-27 7:44 ` Staging submission: PCTV 80e and PCTV 74e drivers (was Re: Problems cloning the git repostories) Stefan Richter
2011-09-27 17:43 ` Greg KH
2011-09-27 19:33 ` Stefan Richter
2011-10-15 20:54 ` [PATCH 0/7] Staging submission: PCTV 74e drivers and some cleanup (was: Staging submission: PCTV 80e and PCTV 74e drivers) Piotr Chmura
2011-10-17 22:31 ` Greg KH
2011-10-19 12:36 ` Staging questions: WAS Re: [PATCH 0/7] Staging submission: PCTV 74e drivers and some cleanup Patrick Dickey
2011-10-19 13:57 ` Devin Heitmueller
2011-10-20 3:44 ` Mauro Carvalho Chehab
2011-10-20 10:53 ` Patrick Dickey
2011-10-20 11:22 ` Mauro Carvalho Chehab
[not found] ` <4E9992F9.7000101@poczta.onet.pl>
2011-10-15 20:54 ` [PATCH 2/7] staging/as102: add new device nBox DVB-T Dongle Piotr Chmura
2011-10-15 20:54 ` Piotr Chmura [this message]
2011-10-15 20:54 ` [PATCH 4/7] staging/as102: cleanup - formatting code Piotr Chmura
2011-10-16 12:23 ` Julian Andres Klode
2011-10-16 12:40 ` Devin Heitmueller
2011-10-16 21:53 ` Dan Carpenter
2011-10-15 20:54 ` [PATCH 5/7] staging as102: cleanup - get rid of pragma(pack) Piotr Chmura
[not found] ` <4E999733.2010802@poczta.onet.pl>
2011-10-15 20:54 ` [PATCH 1/7] Staging submission: PCTV 74e driver (as102) Piotr Chmura
2011-10-16 8:57 ` Stefan Richter
2011-10-16 11:45 ` Devin Heitmueller
2011-10-16 13:44 ` Mauro Carvalho Chehab
2011-10-18 9:10 ` [PATCH 0/14] staging/media/as102: new driver submission (was " Piotr Chmura
2011-10-18 15:52 ` Devin Heitmueller
2011-10-18 17:20 ` Piotr Chmura
2011-10-19 11:41 ` Javier Martinez Canillas
2011-10-19 11:44 ` Mauro Carvalho Chehab
2011-10-19 13:07 ` Piotr Chmura
[not found] ` <20111018094647.d4982eb2.chmooreck@poczta.onet.pl>
2011-10-18 9:11 ` [PATCH 1/14] staging/media/as102: initial import from Abilis Piotr Chmura
2011-10-18 16:24 ` Dan Carpenter
2011-10-18 16:38 ` Mauro Carvalho Chehab
2011-10-18 22:33 ` Dan Carpenter
2011-10-18 19:46 ` [RESEND PATCH " Piotr Chmura
2011-10-30 21:03 ` Piotr Chmura
2011-10-30 21:25 ` Stefan Richter
2011-10-31 10:24 ` Sylwester Nawrocki
2011-10-18 9:11 ` [PATCH 2/14] staging/media/as102: checkpatch fixes Piotr Chmura
2011-10-18 19:48 ` [RESEND PATCH " Piotr Chmura
2011-10-18 9:11 ` [PATCH 3/14] " Piotr Chmura
2011-10-18 19:50 ` [RESEND PATCH " Piotr Chmura
2011-10-18 9:11 ` [PATCH 4/14] " Piotr Chmura
2011-10-18 19:51 ` [RESEND PATCH " Piotr Chmura
2011-10-29 10:22 ` Sylwester Nawrocki
2011-10-29 13:17 ` Piotr Chmura
2011-10-29 16:14 ` Sylwester Nawrocki
2011-10-29 17:48 ` Piotr Chmura
2011-10-29 21:37 ` Sylwester Nawrocki
2011-10-30 7:11 ` [PATCH v3 " Piotr Chmura
2011-10-30 11:17 ` Stefan Richter
2011-10-31 10:48 ` Stefan Richter
2011-10-31 11:47 ` Mauro Carvalho Chehab
2011-10-29 16:25 ` [RESEND PATCH " Piotr Chmura
2011-10-29 16:39 ` Sylwester Nawrocki
2011-10-29 17:00 ` Dan Carpenter
2011-10-18 9:11 ` [PATCH 5/14] " Piotr Chmura
2011-10-18 19:54 ` [RESEND PATCH " Piotr Chmura
2011-10-30 13:53 ` [PATCH v3 " Piotr Chmura
2011-10-18 9:12 ` [PATCH 6/14] " Piotr Chmura
2011-10-18 19:56 ` [RESEND PATCH " Piotr Chmura
2011-10-18 9:12 ` [PATCH 7/14] " Piotr Chmura
2011-10-18 19:57 ` [RESEND PATCH " Piotr Chmura
2011-10-18 9:12 ` [PATCH 8/14] " Piotr Chmura
2011-10-18 19:58 ` [RESEND PATCH " Piotr Chmura
2011-10-18 9:12 ` [PATCH 9/14] staging/media/as102: Add Elgato EyeTV DTT Deluxe Piotr Chmura
2011-10-18 19:59 ` [RESEND PATCH " Piotr Chmura
2011-10-18 9:12 ` [PATCH 10/14] staging/media/as102: properly handle multiple product names Piotr Chmura
2011-10-18 20:02 ` [RESEND PATCH " Piotr Chmura
2011-10-18 20:28 ` Joe Perches
2011-10-18 20:54 ` Piotr Chmura
2011-10-18 20:56 ` Greg KH
2011-10-18 20:58 ` Joe Perches
2011-10-18 9:13 ` [PATCH 11/14] staging/media/as102: fix compile warning about unused function Piotr Chmura
2011-10-18 20:03 ` [RESEND PATCH " Piotr Chmura
2011-10-30 20:04 ` Sylwester Nawrocki
2011-10-30 21:15 ` Stefan Richter
2011-10-18 9:13 ` [PATCH 12/14] staging/media/as102: fix licensing oversight Piotr Chmura
2011-10-18 20:05 ` [RESEND PATCH " Piotr Chmura
2011-10-18 9:13 ` [PATCH 13/14] staging/media/as102: fix compile Piotr Chmura
2011-10-18 9:13 ` [PATCH 14/14] staging/media/as102: add nBox Tuner Dongle support Piotr Chmura
2011-10-15 20:55 ` [PATCH 6/7] staging/as102: cleanup - get rid of editor comments Piotr Chmura
2011-10-15 20:55 ` [PATCH 7/7] staging/as102: cleanup - get rid unnecessary LINUX and WIN32 defines Piotr Chmura
2011-10-30 21:09 ` Problems cloning the git repostories Marek Vasut
2011-09-25 14:53 ` Anca Emanuel
2011-09-25 18:03 ` Johannes Stezenbach
2011-09-26 2:56 ` Mauro Carvalho Chehab
2011-09-26 10:15 ` Scott Jiang
2011-09-26 19:24 ` Johannes Stezenbach
2011-09-26 11:27 ` Patrick Dickey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E99F308.20406@poczta.onet.pl \
--to=chmooreck@poczta.onet.pl \
--cc=devel@driverdev.osuosl.org \
--cc=dheitmueller@kernellabs.com \
--cc=gregkh@suse.de \
--cc=linux-media@vger.kernel.org \
--cc=maurochehab@gmail.com \
--cc=pdickeybeta@gmail.com \
--cc=stefanr@s5r6.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.