aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-05-15 00:14:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 14:00:53 -0400
commit240f3ee0c864a19fa74fb9f049f53e63e77c3182 (patch)
tree8536b68ffdde359cd5c1399b278fb65af74a4b65 /drivers
parent0f064b52ce0f837791924b252ae59476ef26de69 (diff)
Staging: cpc-usb: fix checkpatch warnings in sja2m16c.h
This fixes most of the coding style issues in sja2m16c.h Cc: Sebastian Haas <haas@ems-wuensche.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/cpc-usb/sja2m16c.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/staging/cpc-usb/sja2m16c.h b/drivers/staging/cpc-usb/sja2m16c.h
index bd453e270559..654bd3fc91dc 100644
--- a/drivers/staging/cpc-usb/sja2m16c.h
+++ b/drivers/staging/cpc-usb/sja2m16c.h
@@ -1,41 +1,41 @@
1#ifndef SJA2M16C_H 1#ifndef _SJA2M16C_H
2#define SJA2M16C_H 2#define _SJA2M16C_H
3 3
4#include "cpc.h" 4#include "cpc.h"
5 5
6#define BAUDRATE_TOLERANCE_PERCENT 1 6#define BAUDRATE_TOLERANCE_PERCENT 1
7#define SAMPLEPOINT_TOLERANCE_PERCENT 5 7#define SAMPLEPOINT_TOLERANCE_PERCENT 5
8#define SAMPLEPOINT_UPPER_LIMIT 88 8#define SAMPLEPOINT_UPPER_LIMIT 88
9 9
10// M16C parameters 10/* M16C parameters */
11 typedef struct FIELD_C0CONR { 11struct FIELD_C0CONR {
12 unsigned int brp:4; 12 unsigned int brp:4;
13 unsigned int sam:1; 13 unsigned int sam:1;
14 unsigned int pr:3; 14 unsigned int pr:3;
15 unsigned int dummy:8; 15 unsigned int dummy:8;
16} FIELD_C0CONR_T; 16};
17typedef struct FIELD_C1CONR { 17struct FIELD_C1CONR {
18 unsigned int ph1:3; 18 unsigned int ph1:3;
19 unsigned int ph2:3; 19 unsigned int ph2:3;
20 unsigned int sjw:2; 20 unsigned int sjw:2;
21 unsigned int dummy:8; 21 unsigned int dummy:8;
22} FIELD_C1CONR_T; 22};
23typedef union C0CONR { 23typedef union C0CONR {
24 unsigned char c0con; 24 unsigned char c0con;
25 FIELD_C0CONR_T bc0con; 25 struct FIELD_C0CONR bc0con;
26} C0CONR_T; 26} C0CONR_T;
27typedef union C1CONR { 27typedef union C1CONR {
28 unsigned char c1con; 28 unsigned char c1con;
29 FIELD_C1CONR_T bc1con; 29 struct FIELD_C1CONR bc1con;
30} C1CONR_T; 30} C1CONR_T;
31 31
32#define SJA_TSEG1 ((pParams->btr1 & 0x0f)+1) 32#define SJA_TSEG1 ((pParams->btr1 & 0x0f)+1)
33#define SJA_TSEG2 (((pParams->btr1 & 0x70)>>4)+1) 33#define SJA_TSEG2 (((pParams->btr1 & 0x70)>>4)+1)
34#define SJA_BRP ((pParams->btr0 & 0x3f)+1) 34#define SJA_BRP ((pParams->btr0 & 0x3f)+1)
35#define SJA_SJW ((pParams->btr0 & 0xc0)>>6) 35#define SJA_SJW ((pParams->btr0 & 0xc0)>>6)
36#define SJA_SAM ((pParams->btr1 & 0x80)>>7) 36#define SJA_SAM ((pParams->btr1 & 0x80)>>7)
37int baudrate_m16c(int clk, int brp, int pr, int ph1, int ph2); 37int baudrate_m16c(int clk, int brp, int pr, int ph1, int ph2);
38int samplepoint_m16c(int brp, int pr, int ph1, int ph2); 38int samplepoint_m16c(int brp, int pr, int ph1, int ph2);
39int SJA1000_TO_M16C_BASIC_Params(CPC_MSG_T * pMsg); 39int SJA1000_TO_M16C_BASIC_Params(CPC_MSG_T *pMsg);
40 40
41#endif /* */ 41#endif