[PATCH 1/2] spi: rspi: fix build error when CONFIG_OF is not set

From: Geert Uytterhoeven
Date: Mon Feb 03 2014 - 03:22:06 EST


If CONFIG_OF=n:

drivers/spi/spi-rspi.c: In function 'rspi_probe':
drivers/spi/spi-rspi.c:1203:26: error: 'rspi_of_match' undeclared (first use in this function)
drivers/spi/spi-rspi.c:1203:26: note: each undeclared identifier is reported only once for each function it appears in

Use of_match_ptr() to fix this.

Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxxxxxxx>
---
drivers/spi/spi-rspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 1c3aed63a2e0..df637184f6f0 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -1200,7 +1200,7 @@ static int rspi_probe(struct platform_device *pdev)
return -ENOMEM;
}

- of_id = of_match_device(rspi_of_match, &pdev->dev);
+ of_id = of_match_device(of_match_ptr(rspi_of_match), &pdev->dev);
if (of_id) {
ops = of_id->data;
ret = rspi_parse_dt(&pdev->dev, master);
--
1.7.9.5