Commit 4ecd8281 authored by Bryan Thompson's avatar Bryan Thompson Committed by Greg Kroah-Hartman

staging: unisys: virtpci: Fix CamelCase virtpci device list lock

Rename VpcidevListLock to vpcidev_list_lock in virtpci.c
Signed-off-by: default avatarBryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8a7281b2
...@@ -150,7 +150,7 @@ static struct kobj_type virtpci_driver_kobj_type = { ...@@ -150,7 +150,7 @@ static struct kobj_type virtpci_driver_kobj_type = {
}; };
static struct virtpci_dev *vpcidev_list_head; static struct virtpci_dev *vpcidev_list_head;
static DEFINE_RWLOCK(VpcidevListLock); static DEFINE_RWLOCK(vpcidev_list_lock);
/* filled in with info about this driver, wrt it servicing client busses */ /* filled in with info about this driver, wrt it servicing client busses */
static struct ultra_vbus_deviceinfo Bus_DriverInfo; static struct ultra_vbus_deviceinfo Bus_DriverInfo;
...@@ -589,10 +589,10 @@ static void delete_all(void) ...@@ -589,10 +589,10 @@ static void delete_all(void)
struct virtpci_dev *tmpvpcidev, *nextvpcidev; struct virtpci_dev *tmpvpcidev, *nextvpcidev;
/* delete the entire vhba/vnic list in one shot */ /* delete the entire vhba/vnic list in one shot */
write_lock_irqsave(&VpcidevListLock, flags); write_lock_irqsave(&vpcidev_list_lock, flags);
tmpvpcidev = vpcidev_list_head; tmpvpcidev = vpcidev_list_head;
vpcidev_list_head = NULL; vpcidev_list_head = NULL;
write_unlock_irqrestore(&VpcidevListLock, flags); write_unlock_irqrestore(&vpcidev_list_lock, flags);
/* delete one vhba/vnic at a time */ /* delete one vhba/vnic at a time */
while (tmpvpcidev) { while (tmpvpcidev) {
...@@ -966,7 +966,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype, ...@@ -966,7 +966,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
/* add the vhba/vnic to virtpci device list - but check for /* add the vhba/vnic to virtpci device list - but check for
* duplicate wwnn/macaddr first * duplicate wwnn/macaddr first
*/ */
write_lock_irqsave(&VpcidevListLock, flags); write_lock_irqsave(&vpcidev_list_lock, flags);
for (tmpvpcidev = vpcidev_list_head; tmpvpcidev; for (tmpvpcidev = vpcidev_list_head; tmpvpcidev;
tmpvpcidev = tmpvpcidev->next) { tmpvpcidev = tmpvpcidev->next) {
if (devtype == VIRTHBA_TYPE) { if (devtype == VIRTHBA_TYPE) {
...@@ -988,7 +988,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype, ...@@ -988,7 +988,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
/* found a vhba/vnic already in the list with same /* found a vhba/vnic already in the list with same
* wwnn or macaddr - reject add * wwnn or macaddr - reject add
*/ */
write_unlock_irqrestore(&VpcidevListLock, flags); write_unlock_irqrestore(&vpcidev_list_lock, flags);
kfree(virtpcidev); kfree(virtpcidev);
LOGERR("**** FAILED vhba/vnic already exists in the list\n"); LOGERR("**** FAILED vhba/vnic already exists in the list\n");
POSTCODE_LINUX_2(VPCI_CREATE_FAILURE_PC, POSTCODE_SEVERITY_ERR); POSTCODE_LINUX_2(VPCI_CREATE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
...@@ -1006,7 +1006,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype, ...@@ -1006,7 +1006,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
vpcidev_list_head = virtpcidev; vpcidev_list_head = virtpcidev;
} }
write_unlock_irqrestore(&VpcidevListLock, flags); write_unlock_irqrestore(&vpcidev_list_lock, flags);
/* Must transition channel to ATTACHED state BEFORE /* Must transition channel to ATTACHED state BEFORE
* registering the device, because polling of the channel * registering the device, because polling of the channel
...@@ -1040,7 +1040,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype, ...@@ -1040,7 +1040,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
BUS_ID(pDev), BUS_ID(pDev),
CHANNELCLI_DETACHED, NULL); CHANNELCLI_DETACHED, NULL);
/* remove virtpcidev, the one we just added, from the list */ /* remove virtpcidev, the one we just added, from the list */
write_lock_irqsave(&VpcidevListLock, flags); write_lock_irqsave(&vpcidev_list_lock, flags);
for (tmpvpcidev = vpcidev_list_head, prev = NULL; for (tmpvpcidev = vpcidev_list_head, prev = NULL;
tmpvpcidev; tmpvpcidev;
prev = tmpvpcidev, tmpvpcidev = tmpvpcidev->next) { prev = tmpvpcidev, tmpvpcidev = tmpvpcidev->next) {
...@@ -1052,7 +1052,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype, ...@@ -1052,7 +1052,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
break; break;
} }
} }
write_unlock_irqrestore(&VpcidevListLock, flags); write_unlock_irqrestore(&vpcidev_list_lock, flags);
kfree(virtpcidev); kfree(virtpcidev);
return 0; return 0;
} }
...@@ -1084,7 +1084,7 @@ static int virtpci_device_serverdown(struct device *parentbus, ...@@ -1084,7 +1084,7 @@ static int virtpci_device_serverdown(struct device *parentbus,
} }
/* find the vhba or vnic in virtpci device list */ /* find the vhba or vnic in virtpci device list */
write_lock_irqsave(&VpcidevListLock, flags); write_lock_irqsave(&vpcidev_list_lock, flags);
for (tmpvpcidev = vpcidev_list_head, prevvpcidev = NULL; for (tmpvpcidev = vpcidev_list_head, prevvpcidev = NULL;
(tmpvpcidev && !found); (tmpvpcidev && !found);
...@@ -1114,7 +1114,7 @@ static int virtpci_device_serverdown(struct device *parentbus, ...@@ -1114,7 +1114,7 @@ static int virtpci_device_serverdown(struct device *parentbus,
vpcidriver = tmpvpcidev->mydriver; vpcidriver = tmpvpcidev->mydriver;
rc = vpcidriver->suspend(tmpvpcidev, 0); rc = vpcidriver->suspend(tmpvpcidev, 0);
} }
write_unlock_irqrestore(&VpcidevListLock, flags); write_unlock_irqrestore(&vpcidev_list_lock, flags);
if (!found) { if (!found) {
LOGERR("**** FAILED to find vhba/vnic in the list\n"); LOGERR("**** FAILED to find vhba/vnic in the list\n");
...@@ -1143,7 +1143,7 @@ static int virtpci_device_serverup(struct device *parentbus, ...@@ -1143,7 +1143,7 @@ static int virtpci_device_serverup(struct device *parentbus,
} }
/* find the vhba or vnic in virtpci device list */ /* find the vhba or vnic in virtpci device list */
write_lock_irqsave(&VpcidevListLock, flags); write_lock_irqsave(&vpcidev_list_lock, flags);
for (tmpvpcidev = vpcidev_list_head, prevvpcidev = NULL; for (tmpvpcidev = vpcidev_list_head, prevvpcidev = NULL;
(tmpvpcidev && !found); (tmpvpcidev && !found);
...@@ -1182,7 +1182,7 @@ static int virtpci_device_serverup(struct device *parentbus, ...@@ -1182,7 +1182,7 @@ static int virtpci_device_serverup(struct device *parentbus,
rc = vpcidriver->resume(tmpvpcidev); rc = vpcidriver->resume(tmpvpcidev);
} }
write_unlock_irqrestore(&VpcidevListLock, flags); write_unlock_irqrestore(&vpcidev_list_lock, flags);
if (!found) { if (!found) {
LOGERR("**** FAILED to find vhba/vnic in the list\n"); LOGERR("**** FAILED to find vhba/vnic in the list\n");
...@@ -1223,7 +1223,7 @@ static int virtpci_device_del(struct device *parentbus, ...@@ -1223,7 +1223,7 @@ static int virtpci_device_del(struct device *parentbus,
* device_unregister after we release the lock; otherwise we * device_unregister after we release the lock; otherwise we
* encounter "schedule while atomic" * encounter "schedule while atomic"
*/ */
write_lock_irqsave(&VpcidevListLock, flags); write_lock_irqsave(&vpcidev_list_lock, flags);
for (tmpvpcidev = vpcidev_list_head, prevvpcidev = NULL; tmpvpcidev;) { for (tmpvpcidev = vpcidev_list_head, prevvpcidev = NULL; tmpvpcidev;) {
if (tmpvpcidev->devtype != devtype) if (tmpvpcidev->devtype != devtype)
DEL_CONTINUE; DEL_CONTINUE;
...@@ -1275,7 +1275,7 @@ static int virtpci_device_del(struct device *parentbus, ...@@ -1275,7 +1275,7 @@ static int virtpci_device_del(struct device *parentbus,
else else
tmpvpcidev = vpcidev_list_head; tmpvpcidev = vpcidev_list_head;
} }
write_unlock_irqrestore(&VpcidevListLock, flags); write_unlock_irqrestore(&vpcidev_list_lock, flags);
if (!all && (count == 0)) { if (!all && (count == 0)) {
LOGERR("**** FAILED to find vhba/vnic in the list\n"); LOGERR("**** FAILED to find vhba/vnic in the list\n");
...@@ -1456,7 +1456,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf, ...@@ -1456,7 +1456,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
str_pos += scnprintf(vbuf + str_pos, len - str_pos, str_pos += scnprintf(vbuf + str_pos, len - str_pos,
"\n Virtual PCI devices\n"); "\n Virtual PCI devices\n");
read_lock_irqsave(&VpcidevListLock, flags); read_lock_irqsave(&vpcidev_list_lock, flags);
tmpvpcidev = vpcidev_list_head; tmpvpcidev = vpcidev_list_head;
while (tmpvpcidev) { while (tmpvpcidev) {
if (tmpvpcidev->devtype == VIRTHBA_TYPE) { if (tmpvpcidev->devtype == VIRTHBA_TYPE) {
...@@ -1489,7 +1489,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf, ...@@ -1489,7 +1489,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
tmpvpcidev->queueinfo.chan); tmpvpcidev->queueinfo.chan);
tmpvpcidev = tmpvpcidev->next; tmpvpcidev = tmpvpcidev->next;
} }
read_unlock_irqrestore(&VpcidevListLock, flags); read_unlock_irqrestore(&vpcidev_list_lock, flags);
str_pos += scnprintf(vbuf + str_pos, len - str_pos, "\n"); str_pos += scnprintf(vbuf + str_pos, len - str_pos, "\n");
bytes_read = simple_read_from_buffer(buf, len, offset, vbuf, str_pos); bytes_read = simple_read_from_buffer(buf, len, offset, vbuf, str_pos);
......
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