Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: ccs: Switch from standard integer types to kernel ones

The preferred integer types in the kernel are the Linux specific ones,
switch from standard C types to u32 and alike.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Sakari Ailus and committed by
Mauro Carvalho Chehab
dffbdf37 8a75e8dc

+14 -15
+1 -1
drivers/media/i2c/ccs/ccs-core.c
··· 1190 1190 { 1191 1191 struct v4l2_ctrl *vblank = sensor->vblank; 1192 1192 struct v4l2_ctrl *hblank = sensor->hblank; 1193 - uint16_t min_fll, max_fll, min_llp, max_llp, min_lbp; 1193 + u16 min_fll, max_fll, min_llp, max_llp, min_lbp; 1194 1194 int min, max; 1195 1195 1196 1196 if (sensor->binning_vertical > 1 || sensor->binning_horizontal > 1) {
+10 -11
drivers/media/i2c/ccs/ccs-reg-access.c
··· 17 17 #include "ccs.h" 18 18 #include "ccs-limits.h" 19 19 20 - static uint32_t float_to_u32_mul_1000000(struct i2c_client *client, 21 - uint32_t phloat) 20 + static u32 float_to_u32_mul_1000000(struct i2c_client *client, u32 phloat) 22 21 { 23 - int32_t exp; 24 - uint64_t man; 22 + s32 exp; 23 + u64 man; 25 24 26 25 if (phloat >= 0x80000000) { 27 26 dev_err(&client->dev, "this is a negative number\n"); ··· 136 137 unsigned int ccs_reg_width(u32 reg) 137 138 { 138 139 if (reg & CCS_FL_16BIT) 139 - return sizeof(uint16_t); 140 + return sizeof(u16); 140 141 if (reg & CCS_FL_32BIT) 141 - return sizeof(uint32_t); 142 + return sizeof(u32); 142 143 143 - return sizeof(uint8_t); 144 + return sizeof(u8); 144 145 } 145 146 146 147 static u32 ireal32_to_u32_mul_1000000(struct i2c_client *client, u32 val) ··· 204 205 size_t i; 205 206 206 207 for (i = 0; i < num_regs; i++, regs++) { 207 - uint8_t *data; 208 + u8 *data; 208 209 209 210 if (regs->addr + regs->len < CCS_REG_ADDR(reg) + width) 210 211 continue; ··· 215 216 data = &regs->value[CCS_REG_ADDR(reg) - regs->addr]; 216 217 217 218 switch (width) { 218 - case sizeof(uint8_t): 219 + case sizeof(u8): 219 220 *val = *data; 220 221 break; 221 - case sizeof(uint16_t): 222 + case sizeof(u16): 222 223 *val = get_unaligned_be16(data); 223 224 break; 224 - case sizeof(uint32_t): 225 + case sizeof(u32): 225 226 *val = get_unaligned_be32(data); 226 227 break; 227 228 default:
+3 -3
drivers/media/i2c/ccs/ccs.h
··· 84 84 unsigned short i2c_addr_dfl; /* Default i2c addr */ 85 85 unsigned short i2c_addr_alt; /* Alternate i2c addr */ 86 86 87 - uint32_t ext_clk; /* sensor external clk */ 87 + u32 ext_clk; /* sensor external clk */ 88 88 89 89 unsigned int lanes; /* Number of CSI-2 lanes */ 90 - uint32_t csi_signalling_mode; /* CCS_CSI_SIGNALLING_MODE_* */ 91 - uint64_t *op_sys_clock; 90 + u32 csi_signalling_mode; /* CCS_CSI_SIGNALLING_MODE_* */ 91 + u64 *op_sys_clock; 92 92 93 93 enum ccs_module_board_orient module_board_orient; 94 94