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

i2c: designware: Change from u32 to unsigned int for regmap_read() calls

regmap_read() API signature expects the caller to send "unsigned int"
type to return back the read value, but there are some occurrences of 'u32'
across i2c-designware-* files.

Change them to match the regmap_read() signature.

Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

authored by

Shyam Sundar S K and committed by
Wolfram Sang
1c7c5fca 60a1f9f2

+16 -14
+6 -5
drivers/i2c/busses/i2c-designware-common.c
··· 388 388 389 389 int i2c_dw_set_sda_hold(struct dw_i2c_dev *dev) 390 390 { 391 - u32 reg; 391 + unsigned int reg; 392 392 int ret; 393 393 394 394 ret = i2c_dw_acquire_lock(dev); ··· 439 439 void __i2c_dw_disable(struct dw_i2c_dev *dev) 440 440 { 441 441 int timeout = 100; 442 - u32 status; 442 + unsigned int status; 443 443 444 444 do { 445 445 __i2c_dw_disable_nowait(dev); ··· 524 524 */ 525 525 int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev) 526 526 { 527 - u32 status; 527 + unsigned int status; 528 528 int ret; 529 529 530 530 ret = regmap_read_poll_timeout(dev->map, DW_IC_STATUS, status, ··· 568 568 569 569 int i2c_dw_set_fifo_size(struct dw_i2c_dev *dev) 570 570 { 571 - u32 param, tx_fifo_depth, rx_fifo_depth; 571 + u32 tx_fifo_depth, rx_fifo_depth; 572 + unsigned int param; 572 573 int ret; 573 574 574 575 /* ··· 609 608 610 609 void i2c_dw_disable(struct dw_i2c_dev *dev) 611 610 { 612 - u32 dummy; 611 + unsigned int dummy; 613 612 int ret; 614 613 615 614 ret = i2c_dw_acquire_lock(dev);
+1 -1
drivers/i2c/busses/i2c-designware-core.h
··· 265 265 u8 *rx_buf; 266 266 int msg_err; 267 267 unsigned int status; 268 - u32 abort_source; 268 + unsigned int abort_source; 269 269 int irq; 270 270 u32 flags; 271 271 struct i2c_adapter adapter;
+7 -6
drivers/i2c/busses/i2c-designware-master.c
··· 39 39 40 40 static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev) 41 41 { 42 - u32 comp_param1; 42 + unsigned int comp_param1; 43 43 u32 sda_falling_time, scl_falling_time; 44 44 struct i2c_timings *t = &dev->timings; 45 45 const char *fp_str = ""; ··· 211 211 { 212 212 struct i2c_msg *msgs = dev->msgs; 213 213 u32 ic_con = 0, ic_tar = 0; 214 - u32 dummy; 214 + unsigned int dummy; 215 215 216 216 /* Disable the adapter */ 217 217 __i2c_dw_disable(dev); ··· 287 287 int msg_wrt_idx, msg_itr_lmt, buf_len, data_idx; 288 288 int cmd = 0, status; 289 289 u8 *tx_buf; 290 - u32 val; 290 + unsigned int val; 291 291 292 292 /* 293 293 * In order to enable the interrupt for UCSI i.e. AMD NAVI GPU card, ··· 505 505 unsigned int rx_valid; 506 506 507 507 for (; dev->msg_read_idx < dev->msgs_num; dev->msg_read_idx++) { 508 - u32 len, tmp; 508 + unsigned int tmp; 509 + u32 len; 509 510 u8 *buf; 510 511 511 512 if (!(msgs[dev->msg_read_idx].flags & I2C_M_RD)) ··· 654 653 655 654 static u32 i2c_dw_read_clear_intrbits(struct dw_i2c_dev *dev) 656 655 { 657 - u32 stat, dummy; 656 + unsigned int stat, dummy; 658 657 659 658 /* 660 659 * The IC_INTR_STAT register just indicates "enabled" interrupts. ··· 715 714 static irqreturn_t i2c_dw_isr(int this_irq, void *dev_id) 716 715 { 717 716 struct dw_i2c_dev *dev = dev_id; 718 - u32 stat, enabled; 717 + unsigned int stat, enabled; 719 718 720 719 regmap_read(dev->map, DW_IC_ENABLE, &enabled); 721 720 regmap_read(dev->map, DW_IC_RAW_INTR_STAT, &stat);
+2 -2
drivers/i2c/busses/i2c-designware-slave.c
··· 98 98 99 99 static u32 i2c_dw_read_clear_intrbits_slave(struct dw_i2c_dev *dev) 100 100 { 101 - u32 stat, dummy; 101 + unsigned int stat, dummy; 102 102 103 103 /* 104 104 * The IC_INTR_STAT register just indicates "enabled" interrupts. ··· 150 150 static irqreturn_t i2c_dw_isr_slave(int this_irq, void *dev_id) 151 151 { 152 152 struct dw_i2c_dev *dev = dev_id; 153 - u32 raw_stat, stat, enabled, tmp; 153 + unsigned int raw_stat, stat, enabled, tmp; 154 154 u8 val = 0, slave_activity; 155 155 156 156 regmap_read(dev->map, DW_IC_ENABLE, &enabled);