diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2012-10-08 12:46:32 +0200 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-10-08 12:46:32 +0200 |
commit | 102084d3d3969646cc89ea159e50898aeafc6649 (patch) | |
tree | e92924469b3fab3ee6fa29e338e0a3a4cb167e82 /drivers/i2c/busses/i2c-mxs.c | |
parent | 6ccbe607132bd823abbad8d32b13af89161707da (diff) | |
parent | 979570e02981d4a8fc20b3cc8fd651856c98ee9d (diff) | |
download | blackbird-op-linux-102084d3d3969646cc89ea159e50898aeafc6649.tar.gz blackbird-op-linux-102084d3d3969646cc89ea159e50898aeafc6649.zip |
Merge tag 'v3.6-rc7' into i2c-embedded/for-next
Linux 3.6-rc7
Needed to get updates from i2c-embedded/for-current into i2c-embedded/for-next
Diffstat (limited to 'drivers/i2c/busses/i2c-mxs.c')
-rw-r--r-- | drivers/i2c/busses/i2c-mxs.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index 088c5c1ed17d..51f05b8520ed 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c @@ -365,10 +365,6 @@ static int mxs_i2c_get_ofdata(struct mxs_i2c_dev *i2c) struct device_node *node = dev->of_node; int ret; - if (!node) - return -EINVAL; - - i2c->speed = &mxs_i2c_95kHz_config; ret = of_property_read_u32(node, "clock-frequency", &speed); if (ret) dev_warn(dev, "No I2C speed selected, using 100kHz\n"); @@ -419,10 +415,13 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev) return err; i2c->dev = dev; + i2c->speed = &mxs_i2c_95kHz_config; - err = mxs_i2c_get_ofdata(i2c); - if (err) - return err; + if (dev->of_node) { + err = mxs_i2c_get_ofdata(i2c); + if (err) + return err; + } platform_set_drvdata(pdev, i2c); |