|
@@ -242,7 +242,6 @@ MODULE_DEVICE_TABLE(of, stm32_dfsdm_of_match);
|
|
|
static int stm32_dfsdm_probe(struct platform_device *pdev)
|
|
|
{
|
|
|
struct dfsdm_priv *priv;
|
|
|
- const struct of_device_id *of_id;
|
|
|
const struct stm32_dfsdm_dev_data *dev_data;
|
|
|
struct stm32_dfsdm *dfsdm;
|
|
|
int ret;
|
|
@@ -253,13 +252,8 @@ static int stm32_dfsdm_probe(struct platform_device *pdev)
|
|
|
|
|
|
priv->pdev = pdev;
|
|
|
|
|
|
- of_id = of_match_node(stm32_dfsdm_of_match, pdev->dev.of_node);
|
|
|
- if (!of_id->data) {
|
|
|
- dev_err(&pdev->dev, "Data associated to device is missing\n");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
+ dev_data = of_device_get_match_data(&pdev->dev);
|
|
|
|
|
|
- dev_data = (const struct stm32_dfsdm_dev_data *)of_id->data;
|
|
|
dfsdm = &priv->dfsdm;
|
|
|
dfsdm->fl_list = devm_kcalloc(&pdev->dev, dev_data->num_filters,
|
|
|
sizeof(*dfsdm->fl_list), GFP_KERNEL);
|