i2c: mxs: Fix type of error code
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 8 Jan 2013 00:32:06 +0000 (22:32 -0200)
committerWolfram Sang <w.sang@pengutronix.de>
Tue, 22 Jan 2013 08:54:23 +0000 (09:54 +0100)
cmd_err is used to handle error code, so it should not be unsigned.

This fixes the following warning when building with W=1 option:

drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer_msg':
drivers/i2c/busses/i2c-mxs.c:331:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: stable@kernel.org
drivers/i2c/busses/i2c-mxs.c

index 977c4d596b69aa5f4211dcf4f893997d31286b76..d6abaf2cf2e3535b4c7c4ad58dc9e5e772b56fee 100644 (file)
@@ -127,7 +127,7 @@ struct mxs_i2c_dev {
        struct device *dev;
        void __iomem *regs;
        struct completion cmd_complete;
-       u32 cmd_err;
+       int cmd_err;
        struct i2c_adapter adapter;
        const struct mxs_i2c_speed_config *speed;