Skip to content

Commit 7eb2c73

Browse files
gcabidduherbertx
authored andcommitted
crypto: qat - remove redundant prototypes in qat_c62x
Move the definition of the adf_driver structure and remove the redundant prototypes for the functions adf_probe() and adf_remove() in the qat_c62x 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>
1 parent 2c4e8b2 commit 7eb2c73

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

drivers/crypto/intel/qat/qat_c62x/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_c62x_hw_data.h"
2121

22-
static const struct pci_device_id adf_pci_tbl[] = {
23-
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_C62X), },
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_C62X_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_C62X) },
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_C62X_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)