diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-14 06:07:00 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 08:19:51 -0400 |
commit | 19d69b86007e6ede34c08f0b5635d1aaba6a46b7 (patch) | |
tree | 4af64b248e4170fe737d0e69486c565119e8bca9 | |
parent | dcf8abfcb0816adfb9bb175cbea00d7a1a2cae69 (diff) |
mtd: dataflash: Use of_match_ptr() macro
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 945c9f762349..28779b6dfcd9 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -105,8 +105,6 @@ static const struct of_device_id dataflash_dt_ids[] = { | |||
105 | { .compatible = "atmel,dataflash", }, | 105 | { .compatible = "atmel,dataflash", }, |
106 | { /* sentinel */ } | 106 | { /* sentinel */ } |
107 | }; | 107 | }; |
108 | #else | ||
109 | #define dataflash_dt_ids NULL | ||
110 | #endif | 108 | #endif |
111 | 109 | ||
112 | /* ......................................................................... */ | 110 | /* ......................................................................... */ |
@@ -914,7 +912,7 @@ static struct spi_driver dataflash_driver = { | |||
914 | .driver = { | 912 | .driver = { |
915 | .name = "mtd_dataflash", | 913 | .name = "mtd_dataflash", |
916 | .owner = THIS_MODULE, | 914 | .owner = THIS_MODULE, |
917 | .of_match_table = dataflash_dt_ids, | 915 | .of_match_table = of_match_ptr(dataflash_dt_ids), |
918 | }, | 916 | }, |
919 | 917 | ||
920 | .probe = dataflash_probe, | 918 | .probe = dataflash_probe, |