Commit 9547acce authored by Sachin Kamat's avatar Sachin Kamat Committed by Mark Brown

spi: spi-oc-tiny: Use of_match_ptr() macro

This eliminates having an #ifdef returning NULL for the case
when OF is disabled.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Acked-by: default avatarThomas Chou <thomas@wytron.com.tw>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent ff23fa3b
...@@ -393,8 +393,6 @@ static const struct of_device_id tiny_spi_match[] = { ...@@ -393,8 +393,6 @@ static const struct of_device_id tiny_spi_match[] = {
{}, {},
}; };
MODULE_DEVICE_TABLE(of, tiny_spi_match); MODULE_DEVICE_TABLE(of, tiny_spi_match);
#else /* CONFIG_OF */
#define tiny_spi_match NULL
#endif /* CONFIG_OF */ #endif /* CONFIG_OF */
static struct platform_driver tiny_spi_driver = { static struct platform_driver tiny_spi_driver = {
...@@ -404,7 +402,7 @@ static struct platform_driver tiny_spi_driver = { ...@@ -404,7 +402,7 @@ static struct platform_driver tiny_spi_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = NULL, .pm = NULL,
.of_match_table = tiny_spi_match, .of_match_table = of_match_ptr(tiny_spi_match),
}, },
}; };
module_platform_driver(tiny_spi_driver); module_platform_driver(tiny_spi_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment