|
@@ -1407,11 +1407,10 @@ MODULE_DEVICE_TABLE(of, stm32_hash_of_match);
|
|
|
static int stm32_hash_get_of_match(struct stm32_hash_dev *hdev,
|
|
|
struct device *dev)
|
|
|
{
|
|
|
- const struct of_device_id *match;
|
|
|
int err;
|
|
|
|
|
|
- match = of_match_device(stm32_hash_of_match, dev);
|
|
|
- if (!match) {
|
|
|
+ hdev->pdata = of_device_get_match_data(dev);
|
|
|
+ if (!hdev->pdata) {
|
|
|
dev_err(dev, "no compatible OF match\n");
|
|
|
return -EINVAL;
|
|
|
}
|
|
@@ -1419,8 +1418,6 @@ static int stm32_hash_get_of_match(struct stm32_hash_dev *hdev,
|
|
|
err = of_property_read_u32(dev->of_node, "dma-maxburst",
|
|
|
&hdev->dma_maxburst);
|
|
|
|
|
|
- hdev->pdata = match->data;
|
|
|
-
|
|
|
return err;
|
|
|
}
|
|
|
|