Skip to content

Commit

Permalink
crypto: hisilicon/hpre - Add a switch in sriov_configure
Browse files Browse the repository at this point in the history
If CONFIG_PCI_IOV is not enabled, we can not use "sriov_configure".

Fixes: 5ec302a("crypto: hisilicon - add SRIOV support for HPRE")
Signed-off-by: Meng Yu <[email protected]>
Reviewed-by: Zaibo Xu <[email protected]>
Reviewed-by: Shukun Tan <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
yumeng0117 authored and herbertx committed Jul 16, 2020
1 parent a14f660 commit a0c34e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/crypto/hisilicon/hpre/hpre_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down

0 comments on commit a0c34e8

Please sign in to comment.