i2c: OMAP: Fix OMAP1 build error
Subsystems (4)
PATCH 1/1 i2c: OMAP: Fix OMAP1 build error
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.
--- drivers/i2c/busses/i2c-omap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-omap.c +1 -1
@@ -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 */
Signature · 1 line
1.7.0.4
Tony Lindgren
maintainerQuoted 11 lines · Cousson, Benoit
CONFIG_OFis not defined for OMAP1 yet and thus theomap1_defconfigbuild 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 inWrap
omap_i2c_of_matchwithof_match_ptr()to prevent compilation error in case of OMAP1 build.Signed-off-by Benoit Cousson <[email protected]>Cc Ben Dooks <[email protected]>
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
Quoted 20 lines
--- drivers/i2c/busses/i2c-omap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/i2c/busses/i2c-omap.c +1
-1@@ -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 */ Signature · 1 line
1.7.0.4