crypto: talitos - eliminate unneeded 'done' functions at build time
authorChristophe Leroy <christophe.leroy@c-s.fr>
Mon, 17 Jun 2019 21:14:45 +0000 (21:14 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 27 Jun 2019 06:28:01 +0000 (14:28 +0800)
When building for SEC1 only, talitos2_done functions are unneeded
and should go away.

For this, use has_ftr_sec1() which will always return true when only
SEC1 support is being built, allowing GCC to drop TALITOS2 functions.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/talitos.c

index c865f5d5eabaa84e649d1e2150ef65b396f177c6..cb2da0921392a1b6d44dfe7df3876d07b789c48c 100644 (file)
@@ -3414,7 +3414,7 @@ static int talitos_probe(struct platform_device *ofdev)
        if (err)
                goto err_out;
 
-       if (of_device_is_compatible(np, "fsl,sec1.0")) {
+       if (has_ftr_sec1(priv)) {
                if (priv->num_channels == 1)
                        tasklet_init(&priv->done_task[0], talitos1_done_ch0,
                                     (unsigned long)dev);