Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347077
b: refs/heads/master
c: 658122f
h: refs/heads/master
i:
  347075: 44f99c3
v: v3
  • Loading branch information
Abhilash Kesavan authored and Wolfram Sang committed Nov 19, 2012
1 parent 5969149 commit 257b51b
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 3b2f3ceb3c7f4a8c2d11aa7652842e5ce1b0dcc3
refs/heads/master: 658122fe5e3a72940631ceda3efcb841054d91dc
16 changes: 9 additions & 7 deletions trunk/drivers/i2c/busses/i2c-s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,13 +908,6 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)

pdata = i2c->pdata;

/* inititalise the gpio */

if (pdata->cfg_gpio)
pdata->cfg_gpio(to_platform_device(i2c->dev));
else if (IS_ERR(i2c->pctrl) && s3c24xx_i2c_parse_dt_gpio(i2c))
return -EINVAL;

/* write slave address */

writeb(pdata->slave_addr, i2c->regs + S3C2410_IICADD);
Expand Down Expand Up @@ -1055,6 +1048,15 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)

i2c->pctrl = devm_pinctrl_get_select_default(i2c->dev);

/* inititalise the i2c gpio lines */

if (i2c->pdata->cfg_gpio) {
i2c->pdata->cfg_gpio(to_platform_device(i2c->dev));
} else if (IS_ERR(i2c->pctrl) && s3c24xx_i2c_parse_dt_gpio(i2c)) {
ret = -EINVAL;
goto err_clk;
}

/* initialise the i2c controller */

ret = s3c24xx_i2c_init(i2c);
Expand Down

0 comments on commit 257b51b

Please sign in to comment.