mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 13:13:57 +08:00
scsi: smartpqi: make pdev pointer names consistent
make all variable names for pointers to struct pci_dev consistent throughout the driver. Reviewed-by: Scott Benesh <scott.benesh@microsemi.com> Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com> Signed-off-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
1f37e992ad
commit
d91d7820d3
@ -3093,19 +3093,19 @@ static irqreturn_t pqi_irq_handler(int irq, void *data)
|
||||
|
||||
static int pqi_request_irqs(struct pqi_ctrl_info *ctrl_info)
|
||||
{
|
||||
struct pci_dev *pdev = ctrl_info->pci_dev;
|
||||
struct pci_dev *pci_dev = ctrl_info->pci_dev;
|
||||
int i;
|
||||
int rc;
|
||||
|
||||
ctrl_info->event_irq = pci_irq_vector(pdev, 0);
|
||||
ctrl_info->event_irq = pci_irq_vector(pci_dev, 0);
|
||||
|
||||
for (i = 0; i < ctrl_info->num_msix_vectors_enabled; i++) {
|
||||
rc = request_irq(pci_irq_vector(pdev, i), pqi_irq_handler, 0,
|
||||
rc = request_irq(pci_irq_vector(pci_dev, i), pqi_irq_handler, 0,
|
||||
DRIVER_NAME_SHORT, &ctrl_info->queue_groups[i]);
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev,
|
||||
dev_err(&pci_dev->dev,
|
||||
"irq %u init failed with error %d\n",
|
||||
pci_irq_vector(pdev, i), rc);
|
||||
pci_irq_vector(pci_dev, i), rc);
|
||||
return rc;
|
||||
}
|
||||
ctrl_info->num_msix_vectors_initialized++;
|
||||
@ -6229,7 +6229,7 @@ static void pqi_remove_ctrl(struct pqi_ctrl_info *ctrl_info)
|
||||
pqi_free_ctrl_resources(ctrl_info);
|
||||
}
|
||||
|
||||
static void pqi_print_ctrl_info(struct pci_dev *pdev,
|
||||
static void pqi_print_ctrl_info(struct pci_dev *pci_dev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
char *ctrl_description;
|
||||
@ -6248,41 +6248,42 @@ static void pqi_print_ctrl_info(struct pci_dev *pdev,
|
||||
}
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, "%s found\n", ctrl_description);
|
||||
dev_info(&pci_dev->dev, "%s found\n", ctrl_description);
|
||||
}
|
||||
|
||||
static int pqi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
static int pqi_pci_probe(struct pci_dev *pci_dev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
int rc;
|
||||
int node;
|
||||
struct pqi_ctrl_info *ctrl_info;
|
||||
|
||||
pqi_print_ctrl_info(pdev, id);
|
||||
pqi_print_ctrl_info(pci_dev, id);
|
||||
|
||||
if (pqi_disable_device_id_wildcards &&
|
||||
id->subvendor == PCI_ANY_ID &&
|
||||
id->subdevice == PCI_ANY_ID) {
|
||||
dev_warn(&pdev->dev,
|
||||
dev_warn(&pci_dev->dev,
|
||||
"controller not probed because device ID wildcards are disabled\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (id->subvendor == PCI_ANY_ID || id->subdevice == PCI_ANY_ID)
|
||||
dev_warn(&pdev->dev,
|
||||
dev_warn(&pci_dev->dev,
|
||||
"controller device ID matched using wildcards\n");
|
||||
|
||||
node = dev_to_node(&pdev->dev);
|
||||
node = dev_to_node(&pci_dev->dev);
|
||||
if (node == NUMA_NO_NODE)
|
||||
set_dev_node(&pdev->dev, 0);
|
||||
set_dev_node(&pci_dev->dev, 0);
|
||||
|
||||
ctrl_info = pqi_alloc_ctrl_info(node);
|
||||
if (!ctrl_info) {
|
||||
dev_err(&pdev->dev,
|
||||
dev_err(&pci_dev->dev,
|
||||
"failed to allocate controller info block\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ctrl_info->pci_dev = pdev;
|
||||
ctrl_info->pci_dev = pci_dev;
|
||||
|
||||
rc = pqi_pci_init(ctrl_info);
|
||||
if (rc)
|
||||
@ -6300,23 +6301,23 @@ error:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void pqi_pci_remove(struct pci_dev *pdev)
|
||||
static void pqi_pci_remove(struct pci_dev *pci_dev)
|
||||
{
|
||||
struct pqi_ctrl_info *ctrl_info;
|
||||
|
||||
ctrl_info = pci_get_drvdata(pdev);
|
||||
ctrl_info = pci_get_drvdata(pci_dev);
|
||||
if (!ctrl_info)
|
||||
return;
|
||||
|
||||
pqi_remove_ctrl(ctrl_info);
|
||||
}
|
||||
|
||||
static void pqi_shutdown(struct pci_dev *pdev)
|
||||
static void pqi_shutdown(struct pci_dev *pci_dev)
|
||||
{
|
||||
int rc;
|
||||
struct pqi_ctrl_info *ctrl_info;
|
||||
|
||||
ctrl_info = pci_get_drvdata(pdev);
|
||||
ctrl_info = pci_get_drvdata(pci_dev);
|
||||
if (!ctrl_info)
|
||||
goto error;
|
||||
|
||||
@ -6329,7 +6330,7 @@ static void pqi_shutdown(struct pci_dev *pdev)
|
||||
return;
|
||||
|
||||
error:
|
||||
dev_warn(&pdev->dev,
|
||||
dev_warn(&pci_dev->dev,
|
||||
"unable to flush controller cache\n");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user