Re: [PATCH V2 1/9] New drivers for MXC: add I2C support for MXC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wolfram Sang wrote:
Hi Darius,

this is not V5, is it? See below...Was there much rebasing needed for 2.6.29? Otherwise we could simply
keep this one?

http://article.gmane.org/gmane.linux.drivers.i2c/2962

Please keep and merge new patch.

+
+	pdata = pdev->dev.platform_data;
+	if (!pdata) {
+		dev_err(&pdev->dev, "I2C driver needs platform data\n");
+		return -ENODEV;
+	}
+
+	if (pdata->init) {
+		ret = pdata->init(&pdev->dev);
+		if (ret)
+			return ret;
+	}
+

For example, V5 stuff looked like this:

	pdata = pdev->dev.platform_data;

	if (pdata && pdata->init) {
		ret = pdata->init(&pdev->dev);
		if (ret)
			return ret;
	}

which is better.

New one is better. Because one could not have anything to init in the board.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux