Commit b53b34f0 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

spi: davinci: Use of_match_ptr at appropriate place

It's pointless to use of_match_ptr within CONFIG_OF guard.
Use of_match_ptr around davinci_spi_of_match when setting .of_match_table.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 91cfe7e7
...@@ -802,8 +802,7 @@ static int spi_davinci_get_pdata(struct platform_device *pdev, ...@@ -802,8 +802,7 @@ static int spi_davinci_get_pdata(struct platform_device *pdev,
pdata = &dspi->pdata; pdata = &dspi->pdata;
pdata->version = SPI_VERSION_1; pdata->version = SPI_VERSION_1;
match = of_match_device(of_match_ptr(davinci_spi_of_match), match = of_match_device(davinci_spi_of_match, &pdev->dev);
&pdev->dev);
if (!match) if (!match)
return -ENODEV; return -ENODEV;
...@@ -824,7 +823,6 @@ static int spi_davinci_get_pdata(struct platform_device *pdev, ...@@ -824,7 +823,6 @@ static int spi_davinci_get_pdata(struct platform_device *pdev,
return 0; return 0;
} }
#else #else
#define davinci_spi_of_match NULL
static struct davinci_spi_platform_data static struct davinci_spi_platform_data
*spi_davinci_get_pdata(struct platform_device *pdev, *spi_davinci_get_pdata(struct platform_device *pdev,
struct davinci_spi *dspi) struct davinci_spi *dspi)
...@@ -1032,7 +1030,7 @@ static struct platform_driver davinci_spi_driver = { ...@@ -1032,7 +1030,7 @@ static struct platform_driver davinci_spi_driver = {
.driver = { .driver = {
.name = "spi_davinci", .name = "spi_davinci",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = davinci_spi_of_match, .of_match_table = of_match_ptr(davinci_spi_of_match),
}, },
.probe = davinci_spi_probe, .probe = davinci_spi_probe,
.remove = davinci_spi_remove, .remove = davinci_spi_remove,
......
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