[PATCH 6/6] security/keys/encrypted: Drop export of key_type_encrypted

From: Dan Williams
Date: Tue Mar 19 2019 - 02:19:31 EST


Now that all users lookup the key type by name, drop the export and the
direct module dependency.

Cc: Mimi Zohar <zohar@xxxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
---
include/keys/encrypted-type.h | 2 --
security/keys/encrypted-keys/encrypted.c | 3 +--
2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/keys/encrypted-type.h b/include/keys/encrypted-type.h
index 1d4541370a64..dd509835b4a4 100644
--- a/include/keys/encrypted-type.h
+++ b/include/keys/encrypted-type.h
@@ -33,6 +33,4 @@ struct encrypted_key_payload {
u8 payload_data[0]; /* payload data + datablob + hmac */
};

-extern struct key_type key_type_encrypted;
-
#endif /* _KEYS_ENCRYPTED_TYPE_H */
diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/encrypted.c
index 06925d3b30c9..c3999d5e2a19 100644
--- a/security/keys/encrypted-keys/encrypted.c
+++ b/security/keys/encrypted-keys/encrypted.c
@@ -1012,7 +1012,7 @@ static void encrypted_destroy(struct key *key)
kzfree(key->payload.data[0]);
}

-struct key_type key_type_encrypted = {
+static struct key_type key_type_encrypted = {
.name = "encrypted",
.instantiate = encrypted_instantiate,
.update = encrypted_update,
@@ -1020,7 +1020,6 @@ struct key_type key_type_encrypted = {
.describe = user_describe,
.read = encrypted_read,
};
-EXPORT_SYMBOL_GPL(key_type_encrypted);

static int __init init_encrypted(void)
{