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>
This commit is contained in:
parent
dcf8abfcb0
commit
19d69b8600
|
@ -105,8 +105,6 @@ static const struct of_device_id dataflash_dt_ids[] = {
|
||||||
{ .compatible = "atmel,dataflash", },
|
{ .compatible = "atmel,dataflash", },
|
||||||
{ /* sentinel */ }
|
{ /* sentinel */ }
|
||||||
};
|
};
|
||||||
#else
|
|
||||||
#define dataflash_dt_ids NULL
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ......................................................................... */
|
/* ......................................................................... */
|
||||||
|
@ -914,7 +912,7 @@ static struct spi_driver dataflash_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "mtd_dataflash",
|
.name = "mtd_dataflash",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.of_match_table = dataflash_dt_ids,
|
.of_match_table = of_match_ptr(dataflash_dt_ids),
|
||||||
},
|
},
|
||||||
|
|
||||||
.probe = dataflash_probe,
|
.probe = dataflash_probe,
|
||||||
|
|
Loading…
Reference in New Issue