提交 8c88ab04 编写于 作者: W Wolfram Sang 提交者: Wolfram Sang

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: NWolfram Sang <wolfram@the-dreams.de>
Reviewed-by: NRichard Zhao <richard.zhao@freescale.com>
Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 1f09c672
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* *
**/ **/
struct imxi2c_platform_data { struct imxi2c_platform_data {
int bitrate; u32 bitrate;
}; };
#endif /* __ASM_ARCH_I2C_H_ */ #endif /* __ASM_ARCH_I2C_H_ */
...@@ -471,8 +471,8 @@ static int __init i2c_imx_probe(struct platform_device *pdev) ...@@ -471,8 +471,8 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
struct imxi2c_platform_data *pdata = pdev->dev.platform_data; struct imxi2c_platform_data *pdata = pdev->dev.platform_data;
struct pinctrl *pinctrl; struct pinctrl *pinctrl;
void __iomem *base; void __iomem *base;
int irq, bitrate; int irq, ret;
int ret; u32 bitrate;
dev_dbg(&pdev->dev, "<%s>\n", __func__); dev_dbg(&pdev->dev, "<%s>\n", __func__);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册