diff options
author | Wolfram Sang <wolfram@the-dreams.de> | 2012-07-08 07:11:43 -0400 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-07-10 04:43:37 -0400 |
commit | 8c88ab040115430fc146df7aa5a57538bf6d0e2d (patch) | |
tree | 4232cdc66b7ee2ec0eb15e5ea893105ef845346d | |
parent | 1f09c672314f8180113429ff36cad09296c40a9f (diff) |
i2c: imx: make bitrate an u32 type
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>
-rw-r--r-- | arch/arm/plat-mxc/include/mach/i2c.h | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/plat-mxc/include/mach/i2c.h b/arch/arm/plat-mxc/include/mach/i2c.h index 375cdd0cf876..8289d915e615 100644 --- a/arch/arm/plat-mxc/include/mach/i2c.h +++ b/arch/arm/plat-mxc/include/mach/i2c.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * | 15 | * |
16 | **/ | 16 | **/ |
17 | struct imxi2c_platform_data { | 17 | struct imxi2c_platform_data { |
18 | int bitrate; | 18 | u32 bitrate; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #endif /* __ASM_ARCH_I2C_H_ */ | 21 | #endif /* __ASM_ARCH_I2C_H_ */ |
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index dd2a0839b266..90460dd5e5ab 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
@@ -471,8 +471,8 @@ static int __init i2c_imx_probe(struct platform_device *pdev) | |||
471 | struct imxi2c_platform_data *pdata = pdev->dev.platform_data; | 471 | struct imxi2c_platform_data *pdata = pdev->dev.platform_data; |
472 | struct pinctrl *pinctrl; | 472 | struct pinctrl *pinctrl; |
473 | void __iomem *base; | 473 | void __iomem *base; |
474 | int irq, bitrate; | 474 | int irq, ret; |
475 | int ret; | 475 | u32 bitrate; |
476 | 476 | ||
477 | dev_dbg(&pdev->dev, "<%s>\n", __func__); | 477 | dev_dbg(&pdev->dev, "<%s>\n", __func__); |
478 | 478 | ||