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)
|
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 i;
|
||||||
int rc;
|
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++) {
|
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]);
|
DRIVER_NAME_SHORT, &ctrl_info->queue_groups[i]);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dev_err(&pdev->dev,
|
dev_err(&pci_dev->dev,
|
||||||
"irq %u init failed with error %d\n",
|
"irq %u init failed with error %d\n",
|
||||||
pci_irq_vector(pdev, i), rc);
|
pci_irq_vector(pci_dev, i), rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
ctrl_info->num_msix_vectors_initialized++;
|
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);
|
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)
|
const struct pci_device_id *id)
|
||||||
{
|
{
|
||||||
char *ctrl_description;
|
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 rc;
|
||||||
int node;
|
int node;
|
||||||
struct pqi_ctrl_info *ctrl_info;
|
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 &&
|
if (pqi_disable_device_id_wildcards &&
|
||||||
id->subvendor == PCI_ANY_ID &&
|
id->subvendor == PCI_ANY_ID &&
|
||||||
id->subdevice == 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");
|
"controller not probed because device ID wildcards are disabled\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id->subvendor == PCI_ANY_ID || id->subdevice == PCI_ANY_ID)
|
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");
|
"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)
|
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);
|
ctrl_info = pqi_alloc_ctrl_info(node);
|
||||||
if (!ctrl_info) {
|
if (!ctrl_info) {
|
||||||
dev_err(&pdev->dev,
|
dev_err(&pci_dev->dev,
|
||||||
"failed to allocate controller info block\n");
|
"failed to allocate controller info block\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctrl_info->pci_dev = pdev;
|
ctrl_info->pci_dev = pci_dev;
|
||||||
|
|
||||||
rc = pqi_pci_init(ctrl_info);
|
rc = pqi_pci_init(ctrl_info);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
@ -6300,23 +6301,23 @@ static int pqi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
return rc;
|
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;
|
struct pqi_ctrl_info *ctrl_info;
|
||||||
|
|
||||||
ctrl_info = pci_get_drvdata(pdev);
|
ctrl_info = pci_get_drvdata(pci_dev);
|
||||||
if (!ctrl_info)
|
if (!ctrl_info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pqi_remove_ctrl(ctrl_info);
|
pqi_remove_ctrl(ctrl_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pqi_shutdown(struct pci_dev *pdev)
|
static void pqi_shutdown(struct pci_dev *pci_dev)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct pqi_ctrl_info *ctrl_info;
|
struct pqi_ctrl_info *ctrl_info;
|
||||||
|
|
||||||
ctrl_info = pci_get_drvdata(pdev);
|
ctrl_info = pci_get_drvdata(pci_dev);
|
||||||
if (!ctrl_info)
|
if (!ctrl_info)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -6329,7 +6330,7 @@ static void pqi_shutdown(struct pci_dev *pdev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
dev_warn(&pdev->dev,
|
dev_warn(&pci_dev->dev,
|
||||||
"unable to flush controller cache\n");
|
"unable to flush controller cache\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue