From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Grant Likely <grant.likely@secretlab.ca>,
Kevin Hilman <khilman@ti.com>, Tony Lindgren <tony@atomide.com>,
Benoit Cousson <b-cousson@ti.com>,
Rob Herring <rob.herring@calxeda.com>
Subject: [PATCH 3/3] ARM: OMAP: I2C: fix compilation when !CONFIG_OF
Date: Sun, 22 Jan 2012 04:02:33 -0700 [thread overview]
Message-ID: <20120122110232.6508.68451.stgit@dusk> (raw)
In-Reply-To: <20120122105942.6508.82335.stgit@dusk>
Commit 6145197be6cc0583fa1a2f4ec1079d366137061e ("i2c: OMAP: Add DT
support for i2c controller") breaks compilation when CONFIG_OF is not
defined:
CC drivers/i2c/busses/i2c-omap.o
drivers/i2c/busses/i2c-omap.c: In function 'omap_i2c_probe':
drivers/i2c/busses/i2c-omap.c:1021:26: error: 'omap_i2c_of_match' undeclared (first use in this function)
drivers/i2c/busses/i2c-omap.c:1021:26: note: each undeclared identifier is reported only once for each function it appears in
Fix this by avoiding of_*() functions when !CONFIG_OF.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
drivers/i2c/busses/i2c-omap.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index f713eac..1008e96 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -989,7 +989,7 @@ omap_i2c_probe(struct platform_device *pdev)
struct resource *mem, *irq, *ioarea;
struct omap_i2c_bus_platform_data *pdata = pdev->dev.platform_data;
struct device_node *node = pdev->dev.of_node;
- const struct of_device_id *match;
+ const struct of_device_id *match = NULL;
irq_handler_t isr;
int r;
@@ -1018,7 +1018,9 @@ omap_i2c_probe(struct platform_device *pdev)
goto err_release_region;
}
+#ifdef CONFIG_OF
match = of_match_device(omap_i2c_of_match, &pdev->dev);
+#endif
if (match) {
u32 freq = 100000; /* default to 100000 Hz */
WARNING: multiple messages have this Message-ID (diff)
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: OMAP: I2C: fix compilation when !CONFIG_OF
Date: Sun, 22 Jan 2012 04:02:33 -0700 [thread overview]
Message-ID: <20120122110232.6508.68451.stgit@dusk> (raw)
In-Reply-To: <20120122105942.6508.82335.stgit@dusk>
Commit 6145197be6cc0583fa1a2f4ec1079d366137061e ("i2c: OMAP: Add DT
support for i2c controller") breaks compilation when CONFIG_OF is not
defined:
CC drivers/i2c/busses/i2c-omap.o
drivers/i2c/busses/i2c-omap.c: In function 'omap_i2c_probe':
drivers/i2c/busses/i2c-omap.c:1021:26: error: 'omap_i2c_of_match' undeclared (first use in this function)
drivers/i2c/busses/i2c-omap.c:1021:26: note: each undeclared identifier is reported only once for each function it appears in
Fix this by avoiding of_*() functions when !CONFIG_OF.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
drivers/i2c/busses/i2c-omap.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index f713eac..1008e96 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -989,7 +989,7 @@ omap_i2c_probe(struct platform_device *pdev)
struct resource *mem, *irq, *ioarea;
struct omap_i2c_bus_platform_data *pdata = pdev->dev.platform_data;
struct device_node *node = pdev->dev.of_node;
- const struct of_device_id *match;
+ const struct of_device_id *match = NULL;
irq_handler_t isr;
int r;
@@ -1018,7 +1018,9 @@ omap_i2c_probe(struct platform_device *pdev)
goto err_release_region;
}
+#ifdef CONFIG_OF
match = of_match_device(omap_i2c_of_match, &pdev->dev);
+#endif
if (match) {
u32 freq = 100000; /* default to 100000 Hz */
next prev parent reply other threads:[~2012-01-22 11:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-22 11:02 [PATCH 0/3] ARM: OMAP: fix compilation problems with v3.3-rc1 Paul Walmsley
2012-01-22 11:02 ` Paul Walmsley
2012-01-22 11:02 ` [PATCH 1/3] ARM: OMAP: PRM: fix missing plat/irqs.h build breakage Paul Walmsley
2012-01-22 11:02 ` Paul Walmsley
2012-01-22 11:02 ` [PATCH 2/3] ARM: OMAP2+: io: fix compilation breakage on 2420-only configs Paul Walmsley
2012-01-22 11:02 ` Paul Walmsley
2012-01-22 11:02 ` Paul Walmsley [this message]
2012-01-22 11:02 ` [PATCH 3/3] ARM: OMAP: I2C: fix compilation when !CONFIG_OF Paul Walmsley
2012-01-22 15:40 ` Rob Herring
2012-01-22 15:40 ` Rob Herring
2012-01-22 15:46 ` Grant Likely
2012-01-22 15:46 ` Grant Likely
2012-01-22 15:45 ` Grant Likely
2012-01-22 15:45 ` Grant Likely
2012-01-22 16:06 ` Rob Herring
2012-01-22 16:06 ` Rob Herring
2012-01-22 16:59 ` Cousson, Benoit
2012-01-22 16:59 ` Cousson, Benoit
2012-01-22 19:54 ` Paul Walmsley
2012-01-22 19:54 ` Paul Walmsley
2012-01-22 20:07 ` Jean Delvare
2012-01-22 20:07 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120122110232.6508.68451.stgit@dusk \
--to=paul@pwsan.com \
--cc=b-cousson@ti.com \
--cc=grant.likely@secretlab.ca \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.