Skip to content

Commit 8dece35

Browse files
committed
[media] dm644x_ccdc: use unsigned long for fpc_table_addr
The fpc_table_addr is used as an unsigned integer that stores an address. At the Kernel, the proper type for such integers is unsigned long. This generates lots of warnings when compiling on 64 bits. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
1 parent 212bdba commit 8dece35

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/media/platform/davinci/dm644x_ccdc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static int ccdc_update_raw_params(struct ccdc_config_params_raw *raw_params)
291291
dev_dbg(ccdc_cfg.dev, "\n copy_from_user failed");
292292
return -EFAULT;
293293
}
294-
config_params->fault_pxl.fpc_table_addr = (unsigned int)fpc_physaddr;
294+
config_params->fault_pxl.fpc_table_addr = (unsigned long)fpc_physaddr;
295295
return 0;
296296
}
297297

@@ -506,7 +506,7 @@ static void ccdc_config_fpc(struct ccdc_fault_pixel *fpc)
506506

507507
/* Configure Fault pixel if needed */
508508
regw(fpc->fpc_table_addr, CCDC_FPC_ADDR);
509-
dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to FPC_ADDR...\n",
509+
dev_dbg(ccdc_cfg.dev, "\nWriting 0x%lx to FPC_ADDR...\n",
510510
(fpc->fpc_table_addr));
511511
/* Write the FPC params with FPC disable */
512512
val = fpc->fp_num & CCDC_FPC_FPC_NUM_MASK;

‎include/media/davinci/dm644x_ccdc.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ struct ccdc_fault_pixel {
114114
/* Number of fault pixel */
115115
unsigned short fp_num;
116116
/* Address of fault pixel table */
117-
unsigned int fpc_table_addr;
117+
unsigned long fpc_table_addr;
118118
};
119119

120120
/* Structure for CCDC configuration parameters for raw capture mode passed

0 commit comments

Comments
 (0)