diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-02-05 22:45:08 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-06 07:52:59 -0500 |
commit | b53b34f042fe17df21a431abc76896a72dbc5670 (patch) | |
tree | 09a555f081caf4ddcdeecafbc74ad170956c3334 /drivers/spi/spi-davinci.c | |
parent | 91cfe7e73b484703baf353d3915823210a417d77 (diff) |
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: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-davinci.c')
-rw-r--r-- | drivers/spi/spi-davinci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 04d69b650328..50f750989258 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c | |||
@@ -802,8 +802,7 @@ static int spi_davinci_get_pdata(struct platform_device *pdev, | |||
802 | pdata = &dspi->pdata; | 802 | pdata = &dspi->pdata; |
803 | 803 | ||
804 | pdata->version = SPI_VERSION_1; | 804 | pdata->version = SPI_VERSION_1; |
805 | match = of_match_device(of_match_ptr(davinci_spi_of_match), | 805 | match = of_match_device(davinci_spi_of_match, &pdev->dev); |
806 | &pdev->dev); | ||
807 | if (!match) | 806 | if (!match) |
808 | return -ENODEV; | 807 | return -ENODEV; |
809 | 808 | ||
@@ -824,7 +823,6 @@ static int spi_davinci_get_pdata(struct platform_device *pdev, | |||
824 | return 0; | 823 | return 0; |
825 | } | 824 | } |
826 | #else | 825 | #else |
827 | #define davinci_spi_of_match NULL | ||
828 | static struct davinci_spi_platform_data | 826 | static struct davinci_spi_platform_data |
829 | *spi_davinci_get_pdata(struct platform_device *pdev, | 827 | *spi_davinci_get_pdata(struct platform_device *pdev, |
830 | struct davinci_spi *dspi) | 828 | struct davinci_spi *dspi) |
@@ -1032,7 +1030,7 @@ static struct platform_driver davinci_spi_driver = { | |||
1032 | .driver = { | 1030 | .driver = { |
1033 | .name = "spi_davinci", | 1031 | .name = "spi_davinci", |
1034 | .owner = THIS_MODULE, | 1032 | .owner = THIS_MODULE, |
1035 | .of_match_table = davinci_spi_of_match, | 1033 | .of_match_table = of_match_ptr(davinci_spi_of_match), |
1036 | }, | 1034 | }, |
1037 | .probe = davinci_spi_probe, | 1035 | .probe = davinci_spi_probe, |
1038 | .remove = davinci_spi_remove, | 1036 | .remove = davinci_spi_remove, |