summaryrefslogtreecommitdiff
path: root/sound/soc/ti/davinci-mcasp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/ti/davinci-mcasp.c')
-rw-r--r--sound/soc/ti/davinci-mcasp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c
index 7e7d665a5504..b892d66f7847 100644
--- a/sound/soc/ti/davinci-mcasp.c
+++ b/sound/soc/ti/davinci-mcasp.c
@@ -21,8 +21,6 @@
#include <linux/clk.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
-#include <linux/of_platform.h>
-#include <linux/of_device.h>
#include <linux/platform_data/davinci_asp.h>
#include <linux/math64.h>
#include <linux/bitmap.h>
@@ -1882,9 +1880,10 @@ static bool davinci_mcasp_have_gpiochip(struct davinci_mcasp *mcasp)
static int davinci_mcasp_get_config(struct davinci_mcasp *mcasp,
struct platform_device *pdev)
{
- const struct of_device_id *match = of_match_device(mcasp_dt_ids, &pdev->dev);
struct device_node *np = pdev->dev.of_node;
struct davinci_mcasp_pdata *pdata = NULL;
+ const struct davinci_mcasp_pdata *match_pdata =
+ device_get_match_data(&pdev->dev);
const u32 *of_serial_dir32;
u32 val;
int i;
@@ -1893,8 +1892,8 @@ static int davinci_mcasp_get_config(struct davinci_mcasp *mcasp,
pdata = pdev->dev.platform_data;
pdata->dismod = DISMOD_LOW;
goto out;
- } else if (match) {
- pdata = devm_kmemdup(&pdev->dev, match->data, sizeof(*pdata),
+ } else if (match_pdata) {
+ pdata = devm_kmemdup(&pdev->dev, match_pdata, sizeof(*pdata),
GFP_KERNEL);
if (!pdata)
return -ENOMEM;