Patchwork [1/1] i2c: at91: Use of_match_ptr() macro

login
register
mail settings
Submitter Sachin Kamat
Date March 14, 2013, 10:13 a.m.
Message ID <1363255983-25407-1-git-send-email-sachin.kamat@linaro.org>
Download mbox | patch
Permalink /patch/227533/
State Accepted
Headers show

Comments

Sachin Kamat - March 14, 2013, 10:13 a.m.
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/i2c/busses/i2c-at91.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Wolfram Sang - March 29, 2013, 11:42 a.m.
On Thu, Mar 14, 2013 at 03:43:03PM +0530, Sachin Kamat wrote:
> This eliminates having an #ifdef returning NULL for the case
> when OF is disabled.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Applied to for-next, thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index 75195e3..23a1c44 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -603,8 +603,6 @@  static const struct of_device_id atmel_twi_dt_ids[] = {
 	}
 };
 MODULE_DEVICE_TABLE(of, atmel_twi_dt_ids);
-#else
-#define atmel_twi_dt_ids NULL
 #endif
 
 static bool filter(struct dma_chan *chan, void *slave)
@@ -828,7 +826,7 @@  static struct platform_driver at91_twi_driver = {
 	.driver		= {
 		.name	= "at91_i2c",
 		.owner	= THIS_MODULE,
-		.of_match_table = atmel_twi_dt_ids,
+		.of_match_table = of_match_ptr(atmel_twi_dt_ids),
 		.pm	= at91_twi_pm_ops,
 	},
 };