Re: [PATCH v2] i2c: davinci: Refactor i2c_davinci_wait_bus_not_busy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 13, 2015 at 03:03:28PM +0200, Alexander Sverdlin wrote:
> There are several problems in the function:
> - "to_cnt" variable does nothing
> - schedule_timeout() call without setting current state does nothing
> - "allow_sleep" parameter is not really used
> 
> Refactor the function so that it really tries to wait. In case of timeout try
> to recover the bus.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxx>

Don't you get a build warning?

drivers/i2c/busses/i2c-davinci.c: In function 'i2c_davinci_wait_bus_not_busy':
drivers/i2c/busses/i2c-davinci.c:364:18: warning: passing argument 1 of 'i2c_recover_bus' from incompatible pointer type
  i2c_recover_bus(dev);
                  ^
In file included from drivers/i2c/busses/i2c-davinci.c:26:0:
include/linux/i2c.h:446:5: note: expected 'struct i2c_adapter *' but argument is of type 'struct davinci_i2c_dev *'
 int i2c_recover_bus(struct i2c_adapter *adap);

Or sparse complains, too:

drivers/i2c/busses/i2c-davinci.c:364:25: warning: incorrect type in argument 1 (different base types)
drivers/i2c/busses/i2c-davinci.c:364:25:    expected struct i2c_adapter *adap
drivers/i2c/busses/i2c-davinci.c:364:25:    got struct davinci_i2c_dev *dev

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux