From f1c5ffb1e7e67009394c82c8534412ae21bc5e74 Mon Sep 17 00:00:00 2001 From: Gaurav Kashyap Date: Wed, 1 Apr 2020 13:32:35 -0700 Subject: [PATCH] Fix GKI compilation for inline encryption modules Changes to fix compilation for inline encryption when compiled as modules for GKI. Change-Id: If091f807fdfb42ceb846334458c48d1687231f6e Signed-off-by: Gaurav Kashyap --- drivers/scsi/ufs/Makefile | 3 +-- drivers/scsi/ufs/ufshcd-crypto-qti.c | 3 ++- drivers/scsi/ufs/ufshcd-crypto-qti.h | 2 +- drivers/soc/qcom/Makefile | 4 +--- drivers/soc/qcom/crypto-qti-platform.h | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/ufs/Makefile b/drivers/scsi/ufs/Makefile index 4114351744c7..fe3cb5a786bf 100644 --- a/drivers/scsi/ufs/Makefile +++ b/drivers/scsi/ufs/Makefile @@ -16,5 +16,4 @@ ufshcd-qti-core-y += ufshcd-qti.o ufs-sysfs.o ufshcd-qti-core-$(CONFIG_SCSI_UFS_BSG) += ufs_bsg.o ufshcd-core-$(CONFIG_SCSI_UFS_CRYPTO) += ufshcd-crypto.o ufshcd-qti-core-$(CONFIG_SCSI_UFS_CRYPTO) += ufshcd-crypto.o -ufshcd-core-$(CONFIG_SCSI_UFS_CRYPTO_QTI) += ufshcd-crypto-qti.o -ufshcd-qti-core-$(CONFIG_SCSI_UFS_CRYPTO_QTI) += ufshcd-crypto-qti.o +obj-$(CONFIG_SCSI_UFS_CRYPTO_QTI) += ufshcd-crypto-qti.o diff --git a/drivers/scsi/ufs/ufshcd-crypto-qti.c b/drivers/scsi/ufs/ufshcd-crypto-qti.c index 11381e097e69..6e1020e08ed0 100644 --- a/drivers/scsi/ufs/ufshcd-crypto-qti.c +++ b/drivers/scsi/ufs/ufshcd-crypto-qti.c @@ -284,8 +284,9 @@ int ufshcd_crypto_qti_debug(struct ufs_hba *hba) void ufshcd_crypto_qti_set_vops(struct ufs_hba *hba) { - return ufshcd_crypto_set_vops(hba, &ufshcd_crypto_qti_variant_ops); + hba->crypto_vops = &ufshcd_crypto_qti_variant_ops; } +EXPORT_SYMBOL(ufshcd_crypto_qti_set_vops); int ufshcd_crypto_qti_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op) diff --git a/drivers/scsi/ufs/ufshcd-crypto-qti.h b/drivers/scsi/ufs/ufshcd-crypto-qti.h index 5c1b2ae1c8c5..aa4090f226af 100644 --- a/drivers/scsi/ufs/ufshcd-crypto-qti.h +++ b/drivers/scsi/ufs/ufshcd-crypto-qti.h @@ -34,7 +34,7 @@ int ufshcd_crypto_qti_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op); int ufshcd_crypto_qti_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op); -#ifdef CONFIG_SCSI_UFS_CRYPTO_QTI +#if IS_ENABLED(CONFIG_SCSI_UFS_CRYPTO_QTI) void ufshcd_crypto_qti_set_vops(struct ufs_hba *hba); #else static inline void ufshcd_crypto_qti_set_vops(struct ufs_hba *hba) diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile index 74025a2836ce..037f97788822 100644 --- a/drivers/soc/qcom/Makefile +++ b/drivers/soc/qcom/Makefile @@ -76,6 +76,4 @@ obj-$(CONFIG_QCOM_HYP_CORE_CTL) += hyp_core_ctl.o obj-$(CONFIG_MSM_QBT_HANDLER) += qbt_handler.o obj-$(CONFIG_QTI_CRYPTO_COMMON) += crypto-qti-common.o obj-$(CONFIG_QTI_CRYPTO_TZ) += crypto-qti-tz.o -obj-$(CONFIG_QTI_HW_KEY_MANAGER) += hwkm_qti.o -hwkm_qti-y += hwkm.o -hwkm_qti-y += crypto-qti-hwkm.o +obj-$(CONFIG_QTI_HW_KEY_MANAGER) += hwkm.o crypto-qti-hwkm.o diff --git a/drivers/soc/qcom/crypto-qti-platform.h b/drivers/soc/qcom/crypto-qti-platform.h index 94980128f798..02e1067b9a5f 100644 --- a/drivers/soc/qcom/crypto-qti-platform.h +++ b/drivers/soc/qcom/crypto-qti-platform.h @@ -11,7 +11,7 @@ #include #include -#if IS_ENABLED(CONFIG_QTI_CRYPTO_TZ) || IS_ENABLED(CONFIG_QTI_HW_KEY_MANAGER) +#if IS_ENABLED(CONFIG_QTI_CRYPTO_COMMON) int crypto_qti_program_key(struct crypto_vops_qti_entry *ice_entry, const struct blk_crypto_key *key, unsigned int slot,