]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
crypto: ux500/hash - Enable DT probing of the driver
authorLee Jones <lee.jones@linaro.org>
Thu, 16 May 2013 11:27:26 +0000 (12:27 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 27 May 2013 12:07:58 +0000 (14:07 +0200)
By providing an OF match table with a suitable compatible string, we
can ensure the ux500-hasht driver is probed by supplying an associated
DT node in a given platform's Device Tree.

Cc: linux-crypto@vger.kernel.org
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/crypto/ux500/hash/hash_core.c

index cf55089675398145e4481d810076553465b6031f..3b8f661d0edf3ddef00e8eec4e5038552ef8e769 100644 (file)
@@ -1961,6 +1961,11 @@ static int ux500_hash_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(ux500_hash_pm, ux500_hash_suspend, ux500_hash_resume);
 
+static const struct of_device_id ux500_hash_match[] = {
+        { .compatible = "stericsson,ux500-hash" },
+        { },
+};
+
 static struct platform_driver hash_driver = {
        .probe  = ux500_hash_probe,
        .remove = ux500_hash_remove,
@@ -1968,6 +1973,7 @@ static struct platform_driver hash_driver = {
        .driver = {
                .owner = THIS_MODULE,
                .name  = "hash1",
+               .of_match_table = ux500_hash_match,
                .pm    = &ux500_hash_pm,
        }
 };