Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322870
b: refs/heads/master
c: 72ee734
h: refs/heads/master
v: v3
  • Loading branch information
Wolfram Sang committed Sep 12, 2012
1 parent 687c449 commit aaf49e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c076ada4e4aaf45e1a31ad6de7c6cce36081e045
refs/heads/master: 72ee734a6716aac5aaf336da70a811e308d2a84e
13 changes: 6 additions & 7 deletions trunk/drivers/i2c/busses/i2c-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit aaf49e6

Please sign in to comment.