aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorSimon Glass2020-02-03 07:36:15 -0700
committerSimon Glass2020-02-05 19:33:46 -0700
commit61b29b82683863a970fd4609a7c58512872616bc (patch)
tree5b83289e241abbef5906999bc26a13e0814585b5 /lib/crypto
parenta466db5adb58e486fbd8ae63536b03a70d69f68d (diff)
dm: core: Require users of devres to include the header
At present devres.h is included in all files that include dm.h but few make use of it. Also this pulls in linux/compat which adds several more headers. Drop the automatic inclusion and require files to include devres themselves. This provides a good indication of which files use devres. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/asymmetric_type.c2
-rw-r--r--lib/crypto/pkcs7_parser.c1
-rw-r--r--lib/crypto/public_key.c2
-rw-r--r--lib/crypto/x509_cert_parser.c1
-rw-r--r--lib/crypto/x509_public_key.c2
5 files changed, 8 insertions, 0 deletions
diff --git a/lib/crypto/asymmetric_type.c b/lib/crypto/asymmetric_type.c
index e04666c0801..7aa55092ac7 100644
--- a/lib/crypto/asymmetric_type.c
+++ b/lib/crypto/asymmetric_type.c
@@ -7,6 +7,7 @@
* Written by David Howells (dhowells@redhat.com)
*/
#ifndef __UBOOT__
+#include <dm/devres.h>
#include <keys/asymmetric-subtype.h>
#include <keys/asymmetric-parser.h>
#endif
@@ -14,6 +15,7 @@
#ifdef __UBOOT__
#include <linux/compat.h>
#include <linux/ctype.h>
+#include <linux/err.h>
#include <linux/string.h>
#else
#include <linux/seq_file.h>
diff --git a/lib/crypto/pkcs7_parser.c b/lib/crypto/pkcs7_parser.c
index bf9e7e888f6..f5dda1179f8 100644
--- a/lib/crypto/pkcs7_parser.c
+++ b/lib/crypto/pkcs7_parser.c
@@ -7,6 +7,7 @@
#define pr_fmt(fmt) "PKCS7: "fmt
#ifdef __UBOOT__
+#include <dm/devres.h>
#include <linux/bitops.h>
#include <linux/compat.h>
#endif
diff --git a/lib/crypto/public_key.c b/lib/crypto/public_key.c
index 634377472f4..8b4821767aa 100644
--- a/lib/crypto/public_key.c
+++ b/lib/crypto/public_key.c
@@ -9,7 +9,9 @@
#define pr_fmt(fmt) "PKEY: "fmt
#ifdef __UBOOT__
+#include <dm/devres.h>
#include <linux/compat.h>
+#include <linux/err.h>
#else
#include <linux/module.h>
#include <linux/export.h>
diff --git a/lib/crypto/x509_cert_parser.c b/lib/crypto/x509_cert_parser.c
index e6d2a426a0b..4e41cffd230 100644
--- a/lib/crypto/x509_cert_parser.c
+++ b/lib/crypto/x509_cert_parser.c
@@ -6,6 +6,7 @@
*/
#define pr_fmt(fmt) "X.509: "fmt
+#include <dm/devres.h>
#include <linux/kernel.h>
#ifndef __UBOOT__
#include <linux/export.h>
diff --git a/lib/crypto/x509_public_key.c b/lib/crypto/x509_public_key.c
index 04bdb672b49..676c0df1741 100644
--- a/lib/crypto/x509_public_key.c
+++ b/lib/crypto/x509_public_key.c
@@ -8,7 +8,9 @@
#define pr_fmt(fmt) "X.509: "fmt
#ifdef __UBOOT__
#include <common.h>
+#include <dm/devres.h>
#include <linux/compat.h>
+#include <linux/err.h>
#include <linux/errno.h>
#else
#include <linux/module.h>