i2c-nomadik: cosmetic coding style corrections

This fixes a number of whitespace and punctuation problems
around the Nomadik I2C driver.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This commit is contained in:
Jonas Aaberg 2011-10-20 18:23:01 +02:00 committed by Ben Dooks
parent 1fdb24e969
commit 8abf6fbbd2

View File

@ -135,19 +135,19 @@ struct i2c_nmk_client {
}; };
/** /**
* struct nmk_i2c_dev - private data structure of the controller * struct nmk_i2c_dev - private data structure of the controller.
* @pdev: parent platform device * @pdev: parent platform device.
* @adap: corresponding I2C adapter * @adap: corresponding I2C adapter.
* @irq: interrupt line for the controller * @irq: interrupt line for the controller.
* @virtbase: virtual io memory area * @virtbase: virtual io memory area.
* @clk: hardware i2c block clock * @clk: hardware i2c block clock.
* @cfg: machine provided controller configuration * @cfg: machine provided controller configuration.
* @cli: holder of client specific data * @cli: holder of client specific data.
* @stop: stop condition * @stop: stop condition.
* @xfer_complete: acknowledge completion for a I2C message * @xfer_complete: acknowledge completion for a I2C message.
* @result: controller propogated result * @result: controller propogated result.
* @regulator: pointer to i2c regulator * @regulator: pointer to i2c regulator.
* @busy: Busy doing transfer * @busy: Busy doing transfer.
*/ */
struct nmk_i2c_dev { struct nmk_i2c_dev {
struct platform_device *pdev; struct platform_device *pdev;
@ -217,8 +217,9 @@ static int flush_i2c_fifo(struct nmk_i2c_dev *dev)
} }
} }
dev_err(&dev->pdev->dev, "flushing operation timed out " dev_err(&dev->pdev->dev,
"giving up after %d attempts", LOOP_ATTEMPTS); "flushing operation timed out giving up after %d attempts",
LOOP_ATTEMPTS);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
@ -363,8 +364,8 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev)
* and high speed (up to 3.4 Mb/s) * and high speed (up to 3.4 Mb/s)
*/ */
if (dev->cfg.sm > I2C_FREQ_MODE_FAST) { if (dev->cfg.sm > I2C_FREQ_MODE_FAST) {
dev_err(&dev->pdev->dev, "do not support this mode " dev_err(&dev->pdev->dev,
"defaulting to std. mode\n"); "do not support this mode defaulting to std. mode\n");
brcr2 = i2c_clk/(100000 * 2) & 0xffff; brcr2 = i2c_clk/(100000 * 2) & 0xffff;
writel((brcr1 | brcr2), dev->virtbase + I2C_BRCR); writel((brcr1 | brcr2), dev->virtbase + I2C_BRCR);
writel(I2C_FREQ_MODE_STANDARD << 4, writel(I2C_FREQ_MODE_STANDARD << 4,
@ -556,8 +557,8 @@ static int nmk_i2c_xfer_one(struct nmk_i2c_dev *dev, u16 flags)
if (((i2c_sr >> 2) & 0x3) == 0x3) { if (((i2c_sr >> 2) & 0x3) == 0x3) {
/* get the abort cause */ /* get the abort cause */
cause = (i2c_sr >> 4) & 0x7; cause = (i2c_sr >> 4) & 0x7;
dev_err(&dev->pdev->dev, "%s\n", cause dev_err(&dev->pdev->dev, "%s\n",
>= ARRAY_SIZE(abort_causes) ? cause >= ARRAY_SIZE(abort_causes) ?
"unknown reason" : "unknown reason" :
abort_causes[cause]); abort_causes[cause]);
} }
@ -644,8 +645,8 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap,
for (i = 0; i < num_msgs; i++) { for (i = 0; i < num_msgs; i++) {
if (unlikely(msgs[i].flags & I2C_M_TEN)) { if (unlikely(msgs[i].flags & I2C_M_TEN)) {
dev_err(&dev->pdev->dev, "10 bit addressing" dev_err(&dev->pdev->dev,
"not supported\n"); "10 bit addressing not supported\n");
status = -EINVAL; status = -EINVAL;
goto out; goto out;
@ -789,8 +790,9 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
if (dev->cli.count) { if (dev->cli.count) {
dev->result = -EIO; dev->result = -EIO;
dev_err(&dev->pdev->dev, "%lu bytes still remain to be" dev_err(&dev->pdev->dev,
"xfered\n", dev->cli.count); "%lu bytes still remain to be xfered\n",
dev->cli.count);
(void) init_hw(dev); (void) init_hw(dev);
} }
complete(&dev->xfer_complete); complete(&dev->xfer_complete);
@ -980,8 +982,9 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev)
i2c_set_adapdata(adap, dev); i2c_set_adapdata(adap, dev);
dev_info(&pdev->dev, "initialize %s on virtual " dev_info(&pdev->dev,
"base %p\n", adap->name, dev->virtbase); "initialize %s on virtual base %p\n",
adap->name, dev->virtbase);
ret = i2c_add_numbered_adapter(adap); ret = i2c_add_numbered_adapter(adap);
if (ret) { if (ret) {