Skip to content

Commit 7bc566f

Browse files
committed
crypto: qat - remove redundant prototypes in qat_c3xxx
JIRA: https://issues.redhat.com/browse/RHEL-72768 JIRA: https://issues.redhat.com/browse/RHEL-84366 Upstream Status: merged into herbert/crypto-2.6.git commit 4fc54f6 Author: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Date: Wed Mar 26 15:59:52 2025 +0000 crypto: qat - remove redundant prototypes in qat_c3xxx Move the definition of the adf_driver structure and remove the redundant prototypes for the functions adf_probe() and adf_remove() in the qat_c3xxx driver. Also move the pci_device_id table close to where it is used and drop the inner comma as it is not required. This does not introduce any functional change. Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Vladis Dronov <vdronov@redhat.com>
1 parent ace1634 commit 7bc566f

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,6 @@
1919
#include <adf_dbgfs.h>
2020
#include "adf_c3xxx_hw_data.h"
2121

22-
static const struct pci_device_id adf_pci_tbl[] = {
23-
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_C3XXX), },
24-
{ }
25-
};
26-
MODULE_DEVICE_TABLE(pci, adf_pci_tbl);
27-
28-
static int adf_probe(struct pci_dev *dev, const struct pci_device_id *ent);
29-
static void adf_remove(struct pci_dev *dev);
30-
31-
static struct pci_driver adf_driver = {
32-
.id_table = adf_pci_tbl,
33-
.name = ADF_C3XXX_DEVICE_NAME,
34-
.probe = adf_probe,
35-
.remove = adf_remove,
36-
.sriov_configure = adf_sriov_configure,
37-
.err_handler = &adf_err_handler,
38-
};
39-
4022
static void adf_cleanup_pci_dev(struct adf_accel_dev *accel_dev)
4123
{
4224
pci_release_regions(accel_dev->accel_pci_dev.pci_dev);
@@ -227,6 +209,21 @@ static void adf_remove(struct pci_dev *pdev)
227209
kfree(accel_dev);
228210
}
229211

212+
static const struct pci_device_id adf_pci_tbl[] = {
213+
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_C3XXX) },
214+
{ }
215+
};
216+
MODULE_DEVICE_TABLE(pci, adf_pci_tbl);
217+
218+
static struct pci_driver adf_driver = {
219+
.id_table = adf_pci_tbl,
220+
.name = ADF_C3XXX_DEVICE_NAME,
221+
.probe = adf_probe,
222+
.remove = adf_remove,
223+
.sriov_configure = adf_sriov_configure,
224+
.err_handler = &adf_err_handler,
225+
};
226+
230227
static int __init adfdrv_init(void)
231228
{
232229
request_module("intel_qat");

0 commit comments

Comments
 (0)