9
0
Fork 0

mtd: m25p80: add devicetree support

Until we have spi device_id support match to "m25p80" for now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-05-27 12:53:12 +02:00
parent 734e723c6a
commit b5a0a65cb5
1 changed files with 9 additions and 0 deletions

View File

@ -947,9 +947,18 @@ static int m25p_probe(struct device_d *dev)
return add_mtd_device(&flash->mtd, flash->mtd.name);
}
static __maybe_unused struct of_device_id m25p80_dt_ids[] = {
{
.compatible = "m25p80",
}, {
/* sentinel */
}
};
static struct driver_d m25p80_driver = {
.name = "m25p80",
.probe = m25p_probe,
.of_compatible = DRV_OF_COMPAT(m25p80_dt_ids),
};
device_spi_driver(m25p80_driver);