Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8abf6fbb authored by Jonas Aaberg's avatar Jonas Aaberg Committed by Ben Dooks
Browse files

i2c-nomadik: cosmetic coding style corrections



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

Signed-off-by: default avatarJonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 1fdb24e9
Loading
Loading
Loading
Loading
+46 −43
Original line number Diff line number Diff line
@@ -135,19 +135,19 @@ struct i2c_nmk_client {
};

/**
 * struct nmk_i2c_dev - private data structure of the controller
 * @pdev: parent platform device
 * @adap: corresponding I2C adapter
 * @irq: interrupt line for the controller
 * @virtbase: virtual io memory area
 * @clk: hardware i2c block clock
 * @cfg: machine provided controller configuration
 * @cli: holder of client specific data
 * @stop: stop condition
 * @xfer_complete: acknowledge completion for a I2C message
 * @result: controller propogated result
 * @regulator: pointer to i2c regulator
 * @busy: Busy doing transfer
 * struct nmk_i2c_dev - private data structure of the controller.
 * @pdev: parent platform device.
 * @adap: corresponding I2C adapter.
 * @irq: interrupt line for the controller.
 * @virtbase: virtual io memory area.
 * @clk: hardware i2c block clock.
 * @cfg: machine provided controller configuration.
 * @cli: holder of client specific data.
 * @stop: stop condition.
 * @xfer_complete: acknowledge completion for a I2C message.
 * @result: controller propogated result.
 * @regulator: pointer to i2c regulator.
 * @busy: Busy doing transfer.
 */
struct nmk_i2c_dev {
	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 "
		"giving up after %d attempts", LOOP_ATTEMPTS);
	dev_err(&dev->pdev->dev,
		"flushing operation timed out giving up after %d attempts",
		LOOP_ATTEMPTS);

	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)
	 */
	if (dev->cfg.sm > I2C_FREQ_MODE_FAST) {
		dev_err(&dev->pdev->dev, "do not support this mode "
			"defaulting to std. mode\n");
		dev_err(&dev->pdev->dev,
			"do not support this mode defaulting to std. mode\n");
		brcr2 = i2c_clk/(100000 * 2) & 0xffff;
		writel((brcr1 | brcr2), dev->virtbase + I2C_BRCR);
		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) {
			/* get the abort cause */
			cause =	(i2c_sr >> 4) & 0x7;
			dev_err(&dev->pdev->dev, "%s\n", cause
				>= ARRAY_SIZE(abort_causes) ?
			dev_err(&dev->pdev->dev, "%s\n",
				cause >= ARRAY_SIZE(abort_causes) ?
				"unknown reason" :
				abort_causes[cause]);
		}
@@ -644,8 +645,8 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap,

		for (i = 0; i < num_msgs; i++) {
			if (unlikely(msgs[i].flags & I2C_M_TEN)) {
				dev_err(&dev->pdev->dev, "10 bit addressing"
						"not supported\n");
				dev_err(&dev->pdev->dev,
					"10 bit addressing not supported\n");

				status = -EINVAL;
				goto out;
@@ -789,8 +790,9 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)

		if (dev->cli.count) {
			dev->result = -EIO;
			dev_err(&dev->pdev->dev, "%lu bytes still remain to be"
					"xfered\n", dev->cli.count);
			dev_err(&dev->pdev->dev,
				"%lu bytes still remain to be xfered\n",
				dev->cli.count);
			(void) init_hw(dev);
		}
		complete(&dev->xfer_complete);
@@ -980,8 +982,9 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev)

	i2c_set_adapdata(adap, dev);

	dev_info(&pdev->dev, "initialize %s on virtual "
		"base %p\n", adap->name, dev->virtbase);
	dev_info(&pdev->dev,
		 "initialize %s on virtual base %p\n",
		 adap->name, dev->virtbase);

	ret = i2c_add_numbered_adapter(adap);
	if (ret) {