aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mxs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-mxs.c')
-rw-r--r--drivers/i2c/busses/i2c-mxs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 1b1a936eccc9..d6abaf2cf2e3 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -127,7 +127,7 @@ struct mxs_i2c_dev {
127 struct device *dev; 127 struct device *dev;
128 void __iomem *regs; 128 void __iomem *regs;
129 struct completion cmd_complete; 129 struct completion cmd_complete;
130 u32 cmd_err; 130 int cmd_err;
131 struct i2c_adapter adapter; 131 struct i2c_adapter adapter;
132 const struct mxs_i2c_speed_config *speed; 132 const struct mxs_i2c_speed_config *speed;
133 133
@@ -316,7 +316,7 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg,
316 if (msg->len == 0) 316 if (msg->len == 0)
317 return -EINVAL; 317 return -EINVAL;
318 318
319 init_completion(&i2c->cmd_complete); 319 INIT_COMPLETION(i2c->cmd_complete);
320 i2c->cmd_err = 0; 320 i2c->cmd_err = 0;
321 321
322 ret = mxs_i2c_dma_setup_xfer(adap, msg, flags); 322 ret = mxs_i2c_dma_setup_xfer(adap, msg, flags);
@@ -473,6 +473,8 @@ static int mxs_i2c_probe(struct platform_device *pdev)
473 i2c->dev = dev; 473 i2c->dev = dev;
474 i2c->speed = &mxs_i2c_95kHz_config; 474 i2c->speed = &mxs_i2c_95kHz_config;
475 475
476 init_completion(&i2c->cmd_complete);
477
476 if (dev->of_node) { 478 if (dev->of_node) {
477 err = mxs_i2c_get_ofdata(i2c); 479 err = mxs_i2c_get_ofdata(i2c);
478 if (err) 480 if (err)