Skip to content

Commit

Permalink
spi: spi-oc-tiny: Use of_match_ptr() macro
Browse files Browse the repository at this point in the history
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Sachin Kamat authored and Mark Brown committed Apr 1, 2013
1 parent ff23fa3 commit 9547acc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/spi/spi-oc-tiny.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ static const struct of_device_id tiny_spi_match[] = {
{},
};
MODULE_DEVICE_TABLE(of, tiny_spi_match);
#else /* CONFIG_OF */
#define tiny_spi_match NULL
#endif /* CONFIG_OF */

static struct platform_driver tiny_spi_driver = {
Expand All @@ -404,7 +402,7 @@ static struct platform_driver tiny_spi_driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
.pm = NULL,
.of_match_table = tiny_spi_match,
.of_match_table = of_match_ptr(tiny_spi_match),
},
};
module_platform_driver(tiny_spi_driver);
Expand Down

0 comments on commit 9547acc

Please sign in to comment.