From 0ecdccdfe5bea3f5fff211c8071d879eb092015a Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 21 Jan 2012 18:24:17 +0000 Subject: [PATCH] --- yaml --- r: 296373 b: refs/heads/master c: 2b4d9d2b001be2ff06be2ea5c52e9adaf85b0805 h: refs/heads/master i: 296371: 968c78700dcb1c13ab76042f2a2dbbb98b04825d v: v3 --- [refs] | 2 +- trunk/drivers/mfd/ucb1x00-core.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d2e780fb3fb7..8a2bcf4a71aa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ed442b6798eb39eda3bcea92ef9403280b603818 +refs/heads/master: 2b4d9d2b001be2ff06be2ea5c52e9adaf85b0805 diff --git a/trunk/drivers/mfd/ucb1x00-core.c b/trunk/drivers/mfd/ucb1x00-core.c index 9f8ea52f0ca8..ed2a4b2e518f 100644 --- a/trunk/drivers/mfd/ucb1x00-core.c +++ b/trunk/drivers/mfd/ucb1x00-core.c @@ -554,16 +554,17 @@ static int ucb1x00_probe(struct mcp *mcp) mcp_enable(mcp); id = mcp_reg_read(mcp, UCB_ID); + mcp_disable(mcp); if (id != UCB_ID_1200 && id != UCB_ID_1300 && id != UCB_ID_TC35143) { printk(KERN_WARNING "UCB1x00 ID not found: %04x\n", id); - goto err_disable; + goto out; } ucb = kzalloc(sizeof(struct ucb1x00), GFP_KERNEL); ret = -ENOMEM; if (!ucb) - goto err_disable; + goto out; device_initialize(&ucb->dev); ucb->dev.class = &ucb1x00_class; @@ -581,7 +582,9 @@ static int ucb1x00_probe(struct mcp *mcp) if (ret) goto err_dev_add; + ucb1x00_enable(ucb); ucb->irq = ucb1x00_detect_irq(ucb); + ucb1x00_disable(ucb); if (ucb->irq == NO_IRQ) { dev_err(&ucb->dev, "IRQ probe failed\n"); ret = -ENODEV; @@ -633,8 +636,6 @@ static int ucb1x00_probe(struct mcp *mcp) device_del(&ucb->dev); err_dev_add: put_device(&ucb->dev); - err_disable: - mcp_disable(mcp); out: if (pdata && pdata->reset) pdata->reset(UCB_RST_PROBE_FAIL);