[PATCH v3 02/11] i2c: OMAP: Add DT support for i2c controller
Olof Johansson
olof at lixom.net
Wed Dec 21 08:24:07 EST 2011
Hi,
On Tue, Dec 20, 2011 at 8:27 AM, Benoit Cousson <b-cousson at ti.com> wrote:
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index a43d002..dcbc1ec 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -37,6 +37,8 @@
> #include <linux/platform_device.h>
> #include <linux/clk.h>
> #include <linux/io.h>
> +#include <linux/of_i2c.h>
> +#include <linux/of_device.h>
> #include <linux/slab.h>
> #include <linux/i2c-omap.h>
> #include <linux/pm_runtime.h>
[...]
> @@ -1165,6 +1195,7 @@ static struct platform_driver omap_i2c_driver = {
> .name = "omap_i2c",
> .owner = THIS_MODULE,
> .pm = OMAP_I2C_PM_OPS,
> + .of_match_table = of_match_ptr(omap_i2c_of_match),
> },
> };
of_match_ptr() comes from <linux/of.h>, so you need to include that to
not break !CONFIG_OF builds.
-Olof
More information about the devicetree-discuss
mailing list