Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2720
b: refs/heads/master
c: 7f02d56
h: refs/heads/master
v: v3
  • Loading branch information
Sylvain Munaut authored and Greg Kroah-Hartman committed Jun 22, 2005
1 parent 5b53a37 commit de0ca2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: d68a861d857c11a017a8f755fa250afaf8b1bcdb
refs/heads/master: 7f02d56e54f2a8afaa01974df650ace9dc15d0cd
14 changes: 8 additions & 6 deletions trunk/drivers/i2c/busses/i2c-mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ static int __devinit mpc_i2c_probe(struct ocp_device *ocp)
} else
i2c->irq = 0;

mpc_i2c_setclock(i2c);
ocp_set_drvdata(ocp, i2c);

i2c->adap = mpc_ops;
i2c_set_adapdata(&i2c->adap, i2c);

Expand All @@ -341,8 +344,6 @@ static int __devinit mpc_i2c_probe(struct ocp_device *ocp)
goto fail_add;
}

mpc_i2c_setclock(i2c);
ocp_set_drvdata(ocp, i2c);
return result;

fail_add:
Expand All @@ -358,8 +359,8 @@ static int __devinit mpc_i2c_probe(struct ocp_device *ocp)
static void __devexit mpc_i2c_remove(struct ocp_device *ocp)
{
struct mpc_i2c *i2c = ocp_get_drvdata(ocp);
ocp_set_drvdata(ocp, NULL);
i2c_del_adapter(&i2c->adap);
ocp_set_drvdata(ocp, NULL);

if (ocp->def->irq != OCP_IRQ_NA)
free_irq(i2c->irq, i2c);
Expand Down Expand Up @@ -430,6 +431,9 @@ static int fsl_i2c_probe(struct device *device)
goto fail_irq;
}

mpc_i2c_setclock(i2c);
dev_set_drvdata(device, i2c);

i2c->adap = mpc_ops;
i2c_set_adapdata(&i2c->adap, i2c);
i2c->adap.dev.parent = &pdev->dev;
Expand All @@ -438,8 +442,6 @@ static int fsl_i2c_probe(struct device *device)
goto fail_add;
}

mpc_i2c_setclock(i2c);
dev_set_drvdata(device, i2c);
return result;

fail_add:
Expand All @@ -456,8 +458,8 @@ static int fsl_i2c_remove(struct device *device)
{
struct mpc_i2c *i2c = dev_get_drvdata(device);

dev_set_drvdata(device, NULL);
i2c_del_adapter(&i2c->adap);
dev_set_drvdata(device, NULL);

if (i2c->irq != 0)
free_irq(i2c->irq, i2c);
Expand Down

0 comments on commit de0ca2e

Please sign in to comment.