mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Turn rtlx upside down.
o Coding style
o Race condition on open
o Switch to dynamic major
o Header file cleanup
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
0b154bb7d0
commit
afc4841d8a
2 changed files with 105 additions and 120 deletions
|
|
@ -16,21 +16,19 @@
|
|||
#define RTLX_ID (RTLX_xID | RTLX_VERSION)
|
||||
#define RTLX_CHANNELS 8
|
||||
|
||||
enum rtlx_state {
|
||||
RTLX_STATE_UNUSED = 0,
|
||||
RTLX_STATE_INITIALISED,
|
||||
RTLX_STATE_REMOTE_READY,
|
||||
RTLX_STATE_OPENED
|
||||
};
|
||||
|
||||
#define RTLX_BUFFER_SIZE 1024
|
||||
|
||||
/*
|
||||
* lx_state bits
|
||||
*/
|
||||
#define RTLX_STATE_OPENED 1UL
|
||||
|
||||
/* each channel supports read and write.
|
||||
linux (vpe0) reads lx_buffer and writes rt_buffer
|
||||
SP (vpe1) reads rt_buffer and writes lx_buffer
|
||||
*/
|
||||
typedef struct rtlx_channel {
|
||||
enum rtlx_state rt_state;
|
||||
enum rtlx_state lx_state;
|
||||
struct rtlx_channel {
|
||||
unsigned long lx_state;
|
||||
|
||||
int buffer_size;
|
||||
|
||||
|
|
@ -43,14 +41,12 @@ typedef struct rtlx_channel {
|
|||
|
||||
void *queues;
|
||||
|
||||
} rtlx_channel_t;
|
||||
};
|
||||
|
||||
typedef struct rtlx_info {
|
||||
struct rtlx_info {
|
||||
unsigned long id;
|
||||
enum rtlx_state state;
|
||||
|
||||
struct rtlx_channel channel[RTLX_CHANNELS];
|
||||
};
|
||||
|
||||
} rtlx_info_t;
|
||||
|
||||
#endif
|
||||
#endif /* _RTLX_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue