Commit fd92028e authored by Tero Kristo's avatar Tero Kristo Committed by Herbert Xu

crypto: sa2ul - add device links to child devices

The child devices for sa2ul (like the RNG) have hard dependency towards
the parent, they can't function without the parent enabled. Add device
link for this purpose so that the dependencies are taken care of properly.
Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d2c8ac18
......@@ -2302,6 +2302,15 @@ static int sa_dma_init(struct sa_crypto_data *dd)
return ret;
}
static int sa_link_child(struct device *dev, void *data)
{
struct device *parent = data;
device_link_add(dev, parent, DL_FLAG_AUTOPROBE_CONSUMER);
return 0;
}
static int sa_ul_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
......@@ -2352,6 +2361,8 @@ static int sa_ul_probe(struct platform_device *pdev)
if (ret)
goto release_dma;
device_for_each_child(&pdev->dev, &pdev->dev, sa_link_child);
return 0;
release_dma:
......
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