summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-altera.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2012-08-15 11:30:28 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-18 01:56:18 +0400
commit89f98dc5eaf78a5a6920c54ee8ef8992d35f8c48 (patch)
tree18caf97076651e5cb396779dfd4d6c1c98b3ac53 /drivers/spi/spi-altera.c
parentba59a807883382f6ce5ad884312d91d5748e90ee (diff)
downloadlinux-89f98dc5eaf78a5a6920c54ee8ef8992d35f8c48.tar.xz
spi: spi-altera: Use of_match_ptr
Instead of having to define the match table to NULL if CONFIG_OF isn't set, use the of_match_ptr() macro which will do this for us. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/spi/spi-altera.c')
-rw-r--r--drivers/spi/spi-altera.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index c00d00e96ee4..f1fec2a19d10 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -307,8 +307,6 @@ static const struct of_device_id altera_spi_match[] = {
{},
};
MODULE_DEVICE_TABLE(of, altera_spi_match);
-#else /* CONFIG_OF */
-#define altera_spi_match NULL
#endif /* CONFIG_OF */
static struct platform_driver altera_spi_driver = {
@@ -318,7 +316,7 @@ static struct platform_driver altera_spi_driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
.pm = NULL,
- .of_match_table = altera_spi_match,
+ .of_match_table = of_match_ptr(altera_spi_match),
},
};
module_platform_driver(altera_spi_driver);