linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: OMAP: Fix OMAP1 build error
@ 2012-01-20 15:55 Cousson, Benoit
  2012-01-20 16:22 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Cousson, Benoit @ 2012-01-20 15:55 UTC (permalink / raw)
  To: Tony Lindgren, Ben Dooks; +Cc: linux-omap

CONFIG_OF is not defined for OMAP1 yet and thus the omap1_defconfig build
generate an error for 3.3-rc1.

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

Wrap omap_i2c_of_match with of_match_ptr() to prevent compilation error in case of OMAP1 build.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Ben Dooks <ben-linux@fluff.org>
---
 drivers/i2c/busses/i2c-omap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index f713eac..801df60 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1018,7 +1018,7 @@ omap_i2c_probe(struct platform_device *pdev)
 		goto err_release_region;
 	}
 
-	match = of_match_device(omap_i2c_of_match, &pdev->dev);
+	match = of_match_device(of_match_ptr(omap_i2c_of_match), &pdev->dev);
 	if (match) {
 		u32 freq = 100000; /* default to 100000 Hz */
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: OMAP: Fix OMAP1 build error
  2012-01-20 15:55 [PATCH] i2c: OMAP: Fix OMAP1 build error Cousson, Benoit
@ 2012-01-20 16:22 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2012-01-20 16:22 UTC (permalink / raw)
  To: Cousson, Benoit; +Cc: Ben Dooks, linux-omap

* Cousson, Benoit <b-cousson@ti.com> [120120 07:22]:
> CONFIG_OF is not defined for OMAP1 yet and thus the omap1_defconfig build
> generate an error for 3.3-rc1.
> 
> 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
> 
> Wrap omap_i2c_of_match with of_match_ptr() to prevent compilation error in case of OMAP1 build.
> 
> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Ben Dooks <ben-linux@fluff.org>

Thanks, Ben care to ack this one? I'd like to apply it into
my fixes branch so I can compile and boot test all the
following fixes without having to apply this fix every
time I compile ;)

Regards,

Tony

> ---
>  drivers/i2c/busses/i2c-omap.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index f713eac..801df60 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1018,7 +1018,7 @@ omap_i2c_probe(struct platform_device *pdev)
>  		goto err_release_region;
>  	}
>  
> -	match = of_match_device(omap_i2c_of_match, &pdev->dev);
> +	match = of_match_device(of_match_ptr(omap_i2c_of_match), &pdev->dev);
>  	if (match) {
>  		u32 freq = 100000; /* default to 100000 Hz */
>  
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-20 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 15:55 [PATCH] i2c: OMAP: Fix OMAP1 build error Cousson, Benoit
2012-01-20 16:22 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).