diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-05-14 21:14:27 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 11:00:53 -0700 |
commit | 240f3ee0c864a19fa74fb9f049f53e63e77c3182 (patch) | |
tree | 8536b68ffdde359cd5c1399b278fb65af74a4b65 /drivers | |
parent | 0f064b52ce0f837791924b252ae59476ef26de69 (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.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/staging/cpc-usb/sja2m16c.h b/drivers/staging/cpc-usb/sja2m16c.h index bd453e27055..654bd3fc91d 100644 --- a/drivers/staging/cpc-usb/sja2m16c.h +++ b/drivers/staging/cpc-usb/sja2m16c.h @@ -1,41 +1,41 @@ -#ifndef SJA2M16C_H -#define SJA2M16C_H +#ifndef _SJA2M16C_H +#define _SJA2M16C_H #include "cpc.h" -#define BAUDRATE_TOLERANCE_PERCENT 1 -#define SAMPLEPOINT_TOLERANCE_PERCENT 5 -#define SAMPLEPOINT_UPPER_LIMIT 88 +#define BAUDRATE_TOLERANCE_PERCENT 1 +#define SAMPLEPOINT_TOLERANCE_PERCENT 5 +#define SAMPLEPOINT_UPPER_LIMIT 88 -// M16C parameters - typedef struct FIELD_C0CONR { +/* M16C parameters */ +struct FIELD_C0CONR { unsigned int brp:4; - unsigned int sam:1; - unsigned int pr:3; - unsigned int dummy:8; -} FIELD_C0CONR_T; -typedef struct FIELD_C1CONR { + unsigned int sam:1; + unsigned int pr:3; + unsigned int dummy:8; +}; +struct FIELD_C1CONR { unsigned int ph1:3; - unsigned int ph2:3; - unsigned int sjw:2; - unsigned int dummy:8; -} FIELD_C1CONR_T; + unsigned int ph2:3; + unsigned int sjw:2; + unsigned int dummy:8; +}; typedef union C0CONR { unsigned char c0con; - FIELD_C0CONR_T bc0con; + struct FIELD_C0CONR bc0con; } C0CONR_T; typedef union C1CONR { unsigned char c1con; - FIELD_C1CONR_T bc1con; + struct FIELD_C1CONR bc1con; } C1CONR_T; -#define SJA_TSEG1 ((pParams->btr1 & 0x0f)+1) -#define SJA_TSEG2 (((pParams->btr1 & 0x70)>>4)+1) -#define SJA_BRP ((pParams->btr0 & 0x3f)+1) -#define SJA_SJW ((pParams->btr0 & 0xc0)>>6) -#define SJA_SAM ((pParams->btr1 & 0x80)>>7) +#define SJA_TSEG1 ((pParams->btr1 & 0x0f)+1) +#define SJA_TSEG2 (((pParams->btr1 & 0x70)>>4)+1) +#define SJA_BRP ((pParams->btr0 & 0x3f)+1) +#define SJA_SJW ((pParams->btr0 & 0xc0)>>6) +#define SJA_SAM ((pParams->btr1 & 0x80)>>7) int baudrate_m16c(int clk, int brp, int pr, int ph1, int ph2); int samplepoint_m16c(int brp, int pr, int ph1, int ph2); -int SJA1000_TO_M16C_BASIC_Params(CPC_MSG_T * pMsg); +int SJA1000_TO_M16C_BASIC_Params(CPC_MSG_T *pMsg); -#endif /* */ +#endif |