Commit 5d392111 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Staging: dt3155: replace u_char usage



Use u8 instead, that's the proper thing to do.

Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 062d1647
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -122,13 +122,13 @@ int dt3155_major = 0;
struct dt3155_status_s dt3155_status[ MAXBOARDS ];

/* kernel logical address of the board */
u_char *dt3155_lbase[ MAXBOARDS ] = { NULL
u8 *dt3155_lbase[ MAXBOARDS ] = { NULL
#if MAXBOARDS == 2
				      , NULL
#endif
};
/* DT3155 registers              */
u_char *dt3155_bbase = NULL;		  /* kernel logical address of the *
u8 *dt3155_bbase = NULL;		  /* kernel logical address of the *
					   * buffer region                 */
u_int  dt3155_dev_open[ MAXBOARDS ] = {0
#if MAXBOARDS == 2
+2 −2
Original line number Diff line number Diff line
@@ -25,10 +25,10 @@ MA 02111-1307 USA
#define DT3155_DRV_INC

/* kernel logical address of the frame grabbers */
extern u_char *dt3155_lbase[MAXBOARDS];
extern u8 *dt3155_lbase[MAXBOARDS];

/* kernel logical address of ram buffer */
extern u_char *dt3155_bbase;
extern u8 *dt3155_bbase;

#ifdef __KERNEL__
#include <linux/wait.h>
+15 −15
Original line number Diff line number Diff line
@@ -86,17 +86,17 @@ I2C_CSR2 i2c_csr2;
I2C_EVEN_CSR           i2c_even_csr;
I2C_ODD_CSR            i2c_odd_csr;
I2C_CONFIG             i2c_config;
u_char                 i2c_dt_id;
u_char                 i2c_x_clip_start;
u_char                 i2c_y_clip_start;
u_char                 i2c_x_clip_end;
u_char                 i2c_y_clip_end;
u_char                 i2c_ad_addr;
u_char                 i2c_ad_lut;
u8                 i2c_dt_id;
u8                 i2c_x_clip_start;
u8                 i2c_y_clip_start;
u8                 i2c_x_clip_end;
u8                 i2c_y_clip_end;
u8                 i2c_ad_addr;
u8                 i2c_ad_lut;
I2C_AD_CMD             i2c_ad_cmd;
u_char                 i2c_dig_out;
u_char                 i2c_pm_lut_addr;
u_char                 i2c_pm_lut_data;
u8                 i2c_dig_out;
u8                 i2c_pm_lut_addr;
u8                 i2c_pm_lut_data;


// return the time difference (in microseconds) b/w <a> & <b>.
@@ -117,7 +117,7 @@ long elapsed2 (const struct timeval *pStart, const struct timeval *pEnd)
             otherwise returns 0

***********************************************************************/
int wait_ibsyclr(u_char * lpReg)
int wait_ibsyclr(u8 * lpReg)
{
  /* wait 100 microseconds */

@@ -168,7 +168,7 @@ int wait_ibsyclr(u_char * lpReg)
   Returns    TRUE   -  Successful completion
              FALSE  -  Timeout error - cycle did not complete!
***********************************************************************/
int WriteI2C (u_char * lpReg, u_short wIregIndex, u_char byVal)
int WriteI2C (u8 * lpReg, u_short wIregIndex, u8 byVal)
{
    int writestat;     /* status for return */

@@ -203,7 +203,7 @@ int WriteI2C (u_char * lpReg, u_short wIregIndex, u_char byVal)
   Returns    TRUE   -  Successful completion
              FALSE  -  Timeout error - cycle did not complete!
***********************************************************************/
int ReadI2C (u_char * lpReg, u_short wIregIndex, u_char * byVal)
int ReadI2C (u8 * lpReg, u_short wIregIndex, u8 * byVal)
{
  int writestat;     /* status for return */

@@ -229,8 +229,8 @@ int ReadI2C (u_char * lpReg, u_short wIregIndex, u_char * byVal)
  /* first read data is in IIC_CSR1 */
  ReadMReg((lpReg + IIC_CSR1), iic_csr1_r.reg);

  /* now get data u_char out of register */
  *byVal = (u_char) iic_csr1_r.fld.RD_DATA;
  /* now get data u8 out of register */
  *byVal = (u8) iic_csr1_r.fld.RD_DATA;

  return writestat;   /*  return with status */
}
+45 −45
Original line number Diff line number Diff line
@@ -261,71 +261,71 @@ extern DMA_UPPER_LMT_R odd_dma_upper_lmt_r;
/******** Assignments and Typedefs for 8 bit I2C Registers********************/

typedef union i2c_csr2_tag {
	u_char reg;
	u8 reg;
	struct {
		u_char CHROM_FIL:1;
		u_char SYNC_SNTL:1;
		u_char HZ50:1;
		u_char SYNC_PRESENT:1;
		u_char BUSY_EVE:1;
		u_char BUSY_ODD:1;
		u_char DISP_PASS:1;
		u8 CHROM_FIL:1;
		u8 SYNC_SNTL:1;
		u8 HZ50:1;
		u8 SYNC_PRESENT:1;
		u8 BUSY_EVE:1;
		u8 BUSY_ODD:1;
		u8 DISP_PASS:1;
	} fld;
} I2C_CSR2;

typedef union i2c_even_csr_tag {
	u_char    reg;
	u8    reg;
	struct {
		u_char DONE_EVE :1;
		u_char SNGL_EVE :1;
		u_char ERROR_EVE:1;
		u_char          :5;
		u8 DONE_EVE :1;
		u8 SNGL_EVE :1;
		u8 ERROR_EVE:1;
		u8          :5;
	} fld;
} I2C_EVEN_CSR;

typedef union i2c_odd_csr_tag {
	u_char reg;
	u8 reg;
	struct {
		u_char DONE_ODD:1;
		u_char SNGL_ODD:1;
		u_char ERROR_ODD:1;
		u_char :5;
		u8 DONE_ODD:1;
		u8 SNGL_ODD:1;
		u8 ERROR_ODD:1;
		u8 :5;
	} fld;
} I2C_ODD_CSR;

typedef union i2c_config_tag {
	u_char reg;
	u8 reg;
	struct {
		u_char ACQ_MODE:2;
		u_char EXT_TRIG_EN:1;
		u_char EXT_TRIG_POL:1;
		u_char H_SCALE:1;
		u_char CLIP:1;
		u_char PM_LUT_SEL:1;
		u_char PM_LUT_PGM:1;
		u8 ACQ_MODE:2;
		u8 EXT_TRIG_EN:1;
		u8 EXT_TRIG_POL:1;
		u8 H_SCALE:1;
		u8 CLIP:1;
		u8 PM_LUT_SEL:1;
		u8 PM_LUT_PGM:1;
	} fld;
} I2C_CONFIG;


typedef union i2c_ad_cmd_tag {
	/* bits can have 3 different meanings depending on value of AD_ADDR */
	u_char reg;
	u8 reg;
	/* Bt252 Command Register if AD_ADDR = 00h */
	struct {
		u_char             :2;
		u_char SYNC_LVL_SEL:2;
		u_char SYNC_CNL_SEL:2;
		u_char DIGITIZE_CNL_SEL1:2;
		u8             :2;
		u8 SYNC_LVL_SEL:2;
		u8 SYNC_CNL_SEL:2;
		u8 DIGITIZE_CNL_SEL1:2;
		} bt252_command;

	/* Bt252 IOUT0 register if AD_ADDR = 01h */
	struct {
		u_char IOUT_DATA:8;
		u8 IOUT_DATA:8;
	} bt252_iout0;

	/* BT252 IOUT1 register if AD_ADDR = 02h */
	struct {
		u_char IOUT_DATA:8;
		u8 IOUT_DATA:8;
	} bt252_iout1;
} I2C_AD_CMD;

@@ -336,23 +336,23 @@ extern I2C_CSR2 i2c_csr2;
extern I2C_EVEN_CSR		i2c_even_csr;
extern I2C_ODD_CSR		i2c_odd_csr;
extern I2C_CONFIG		i2c_config;
extern u_char			i2c_dt_id;
extern u_char			i2c_x_clip_start;
extern u_char			i2c_y_clip_start;
extern u_char			i2c_x_clip_end;
extern u_char			i2c_y_clip_end;
extern u_char			i2c_ad_addr;
extern u_char			i2c_ad_lut;
extern u8			i2c_dt_id;
extern u8			i2c_x_clip_start;
extern u8			i2c_y_clip_start;
extern u8			i2c_x_clip_end;
extern u8			i2c_y_clip_end;
extern u8			i2c_ad_addr;
extern u8			i2c_ad_lut;
extern I2C_AD_CMD		i2c_ad_cmd;
extern u_char			i2c_dig_out;
extern u_char			i2c_pm_lut_addr;
extern u_char			i2c_pm_lut_data;
extern u8			i2c_dig_out;
extern u8			i2c_pm_lut_addr;
extern u8			i2c_pm_lut_data;

/* Functions for Global use */

/* access 8-bit IIC registers */

extern int ReadI2C(u_char *lpReg, u_short wIregIndex, u_char *byVal);
extern int WriteI2C(u_char *lpReg, u_short wIregIndex, u_char byVal);
extern int ReadI2C(u8 *lpReg, u_short wIregIndex, u8 *byVal);
extern int WriteI2C(u8 *lpReg, u_short wIregIndex, u8 byVal);

#endif
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ u_long dt3155_setup_buffers(u_long *allocatorAddr)

      /* Make sure the buffering variables are consistent */
      {
	u_char *ptr = (u_char *) dt3155_fbuffer[ m ];
	u8 *ptr = (u8 *) dt3155_fbuffer[ m ];
	for( index = 0; index < sizeof(struct dt3155_fbuffer_s); index++)
	  *(ptr++)=0;
      }