Skip to content

Commit

Permalink
i2c: imx: make bitrate an u32 type
Browse files Browse the repository at this point in the history
sparse found this assignment of u32 to an int. Fix it:

drivers/i2c/busses/i2c-imx.c:540:56: warning: incorrect type in argument 3 (different signedness)

and also fix the type in platform_data. All current users use values
which fit into the old and new type, so it is a safe change.

Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
Reviewed-by: Richard Zhao <richard.zhao@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Wolfram Sang authored and Wolfram Sang committed Jul 10, 2012
1 parent 1f09c67 commit 8c88ab0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/arm/plat-mxc/include/mach/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
**/
struct imxi2c_platform_data {
int bitrate;
u32 bitrate;
};

#endif /* __ASM_ARCH_I2C_H_ */
4 changes: 2 additions & 2 deletions drivers/i2c/busses/i2c-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
struct imxi2c_platform_data *pdata = pdev->dev.platform_data;
struct pinctrl *pinctrl;
void __iomem *base;
int irq, bitrate;
int ret;
int irq, ret;
u32 bitrate;

dev_dbg(&pdev->dev, "<%s>\n", __func__);

Expand Down

0 comments on commit 8c88ab0

Please sign in to comment.