summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/hisilicon/hpre/hpre_main.c
diff options
context:
space:
mode:
authorMeng Yu <yumeng18@huawei.com>2020-07-10 09:40:44 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-07-16 13:49:11 +0200
commita0c34e8dd8646957a68aa6e3946b9c87554bd6e1 (patch)
tree807409b020a78b149052e736f2e0be7d9a2714b7 /drivers/crypto/hisilicon/hpre/hpre_main.c
parentcrypto: hisilicon/hpre - Modify the Macro definition and format (diff)
downloadlinux-a0c34e8dd8646957a68aa6e3946b9c87554bd6e1.tar.xz
linux-a0c34e8dd8646957a68aa6e3946b9c87554bd6e1.zip
crypto: hisilicon/hpre - Add a switch in sriov_configure
If CONFIG_PCI_IOV is not enabled, we can not use "sriov_configure". Fixes: 5ec302a364bf("crypto: hisilicon - add SRIOV support for HPRE") Signed-off-by: Meng Yu <yumeng18@huawei.com> Reviewed-by: Zaibo Xu <xuzaibo@huawei.com> Reviewed-by: Shukun Tan <tanshukun1@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hisilicon/hpre/hpre_main.c')
-rw-r--r--drivers/crypto/hisilicon/hpre/hpre_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c
index da17729ef8ba..37c2bc5d7c96 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_main.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_main.c
@@ -925,7 +925,8 @@ static struct pci_driver hpre_pci_driver = {
.id_table = hpre_dev_ids,
.probe = hpre_probe,
.remove = hpre_remove,
- .sriov_configure = hisi_qm_sriov_configure,
+ .sriov_configure = IS_ENABLED(CONFIG_PCI_IOV) ?
+ hisi_qm_sriov_configure : NULL,
.err_handler = &hpre_err_handler,
};