{
int stat;
+ clk_enable(dev->clk);
+
stat = flush_i2c_fifo(dev);
if (stat)
return stat;
dev->cli.operation = I2C_NO_OPERATION;
+ clk_disable(dev->clk);
+
return 0;
}
if (status)
return status;
+ clk_enable(dev->clk);
+
/* setup the i2c controller */
setup_i2c_controller(dev);
dev_err(&dev->pdev->dev, "%s\n",
cause >= ARRAY_SIZE(abort_causes)
? "unknown reason" : abort_causes[cause]);
+ clk_disable(dev->clk);
return status;
}
mdelay(1);
}
+ clk_disable(dev->clk);
+
/* return the no. messages processed */
if (status)
return status;
goto err_no_clk;
}
- clk_enable(dev->clk);
-
adap = &dev->adap;
adap->dev.parent = &pdev->dev;
adap->owner = THIS_MODULE;
return 0;
err_init_hw:
- clk_disable(dev->clk);
err_add_adap:
clk_put(dev->clk);
err_no_clk:
iounmap(dev->virtbase);
if (res)
release_mem_region(res->start, resource_size(res));
- clk_disable(dev->clk);
clk_put(dev->clk);
platform_set_drvdata(pdev, NULL);
kfree(dev);