Commit 789f900b authored by Giovanni Cabiddu's avatar Giovanni Cabiddu Committed by Herbert Xu

crypto: qat - drop input parameter from adf_enable_aer()

Remove pointer to struct pci_driver from function adf_enable_aer() as it
is possible to get it directly from pdev->driver.
Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: default avatarFiona Trahe <fiona.trahe@intel.com>
Reviewed-by: default avatarWojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 83e6a194
...@@ -198,7 +198,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -198,7 +198,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
} }
pci_set_master(pdev); pci_set_master(pdev);
if (adf_enable_aer(accel_dev, &adf_driver)) { if (adf_enable_aer(accel_dev)) {
dev_err(&pdev->dev, "Failed to enable aer\n"); dev_err(&pdev->dev, "Failed to enable aer\n");
ret = -EFAULT; ret = -EFAULT;
goto out_err_free_reg; goto out_err_free_reg;
......
...@@ -198,7 +198,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -198,7 +198,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
} }
pci_set_master(pdev); pci_set_master(pdev);
if (adf_enable_aer(accel_dev, &adf_driver)) { if (adf_enable_aer(accel_dev)) {
dev_err(&pdev->dev, "Failed to enable aer\n"); dev_err(&pdev->dev, "Failed to enable aer\n");
ret = -EFAULT; ret = -EFAULT;
goto out_err_free_reg; goto out_err_free_reg;
......
...@@ -175,7 +175,6 @@ static const struct pci_error_handlers adf_err_handler = { ...@@ -175,7 +175,6 @@ static const struct pci_error_handlers adf_err_handler = {
/** /**
* adf_enable_aer() - Enable Advance Error Reporting for acceleration device * adf_enable_aer() - Enable Advance Error Reporting for acceleration device
* @accel_dev: Pointer to acceleration device. * @accel_dev: Pointer to acceleration device.
* @adf: PCI device driver owning the given acceleration device.
* *
* Function enables PCI Advance Error Reporting for the * Function enables PCI Advance Error Reporting for the
* QAT acceleration device accel_dev. * QAT acceleration device accel_dev.
...@@ -183,11 +182,12 @@ static const struct pci_error_handlers adf_err_handler = { ...@@ -183,11 +182,12 @@ static const struct pci_error_handlers adf_err_handler = {
* *
* Return: 0 on success, error code otherwise. * Return: 0 on success, error code otherwise.
*/ */
int adf_enable_aer(struct adf_accel_dev *accel_dev, struct pci_driver *adf) int adf_enable_aer(struct adf_accel_dev *accel_dev)
{ {
struct pci_dev *pdev = accel_to_pci_dev(accel_dev); struct pci_dev *pdev = accel_to_pci_dev(accel_dev);
struct pci_driver *pdrv = pdev->driver;
adf->err_handler = &adf_err_handler; pdrv->err_handler = &adf_err_handler;
pci_enable_pcie_error_reporting(pdev); pci_enable_pcie_error_reporting(pdev);
return 0; return 0;
} }
......
...@@ -95,7 +95,7 @@ void adf_ae_fw_release(struct adf_accel_dev *accel_dev); ...@@ -95,7 +95,7 @@ void adf_ae_fw_release(struct adf_accel_dev *accel_dev);
int adf_ae_start(struct adf_accel_dev *accel_dev); int adf_ae_start(struct adf_accel_dev *accel_dev);
int adf_ae_stop(struct adf_accel_dev *accel_dev); int adf_ae_stop(struct adf_accel_dev *accel_dev);
int adf_enable_aer(struct adf_accel_dev *accel_dev, struct pci_driver *adf); int adf_enable_aer(struct adf_accel_dev *accel_dev);
void adf_disable_aer(struct adf_accel_dev *accel_dev); void adf_disable_aer(struct adf_accel_dev *accel_dev);
void adf_reset_sbr(struct adf_accel_dev *accel_dev); void adf_reset_sbr(struct adf_accel_dev *accel_dev);
void adf_reset_flr(struct adf_accel_dev *accel_dev); void adf_reset_flr(struct adf_accel_dev *accel_dev);
......
...@@ -200,7 +200,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -200,7 +200,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
} }
pci_set_master(pdev); pci_set_master(pdev);
if (adf_enable_aer(accel_dev, &adf_driver)) { if (adf_enable_aer(accel_dev)) {
dev_err(&pdev->dev, "Failed to enable aer\n"); dev_err(&pdev->dev, "Failed to enable aer\n");
ret = -EFAULT; ret = -EFAULT;
goto out_err_free_reg; goto out_err_free_reg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment