From: Bryan Thompson Date: Mon, 3 Nov 2014 19:21:02 +0000 (-0500) Subject: staging: unisys: virtpci: Fix CamelCase virtpci device list lock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4ecd8281b2fa6fc49927a22e95ddb859d40a20b4;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: unisys: virtpci: Fix CamelCase virtpci device list lock Rename VpcidevListLock to vpcidev_list_lock in virtpci.c Signed-off-by: Bryan Thompson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c index 383be50f6a3d..143bb0028981 100644 --- a/drivers/staging/unisys/virtpci/virtpci.c +++ b/drivers/staging/unisys/virtpci/virtpci.c @@ -150,7 +150,7 @@ static struct kobj_type virtpci_driver_kobj_type = { }; 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 */ static struct ultra_vbus_deviceinfo Bus_DriverInfo; @@ -589,10 +589,10 @@ static void delete_all(void) struct virtpci_dev *tmpvpcidev, *nextvpcidev; /* 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; vpcidev_list_head = NULL; - write_unlock_irqrestore(&VpcidevListLock, flags); + write_unlock_irqrestore(&vpcidev_list_lock, flags); /* delete one vhba/vnic at a time */ while (tmpvpcidev) { @@ -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 * duplicate wwnn/macaddr first */ - write_lock_irqsave(&VpcidevListLock, flags); + write_lock_irqsave(&vpcidev_list_lock, flags); for (tmpvpcidev = vpcidev_list_head; tmpvpcidev; tmpvpcidev = tmpvpcidev->next) { if (devtype == VIRTHBA_TYPE) { @@ -988,7 +988,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype, /* found a vhba/vnic already in the list with same * wwnn or macaddr - reject add */ - write_unlock_irqrestore(&VpcidevListLock, flags); + write_unlock_irqrestore(&vpcidev_list_lock, flags); kfree(virtpcidev); LOGERR("**** FAILED vhba/vnic already exists in the list\n"); POSTCODE_LINUX_2(VPCI_CREATE_FAILURE_PC, POSTCODE_SEVERITY_ERR); @@ -1006,7 +1006,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype, vpcidev_list_head = virtpcidev; } - write_unlock_irqrestore(&VpcidevListLock, flags); + write_unlock_irqrestore(&vpcidev_list_lock, flags); /* Must transition channel to ATTACHED state BEFORE * registering the device, because polling of the channel @@ -1040,7 +1040,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype, BUS_ID(pDev), CHANNELCLI_DETACHED, NULL); /* 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; tmpvpcidev; prev = tmpvpcidev, tmpvpcidev = tmpvpcidev->next) { @@ -1052,7 +1052,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype, break; } } - write_unlock_irqrestore(&VpcidevListLock, flags); + write_unlock_irqrestore(&vpcidev_list_lock, flags); kfree(virtpcidev); return 0; } @@ -1084,7 +1084,7 @@ static int virtpci_device_serverdown(struct device *parentbus, } /* 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; (tmpvpcidev && !found); @@ -1114,7 +1114,7 @@ static int virtpci_device_serverdown(struct device *parentbus, vpcidriver = tmpvpcidev->mydriver; rc = vpcidriver->suspend(tmpvpcidev, 0); } - write_unlock_irqrestore(&VpcidevListLock, flags); + write_unlock_irqrestore(&vpcidev_list_lock, flags); if (!found) { LOGERR("**** FAILED to find vhba/vnic in the list\n"); @@ -1143,7 +1143,7 @@ static int virtpci_device_serverup(struct device *parentbus, } /* 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; (tmpvpcidev && !found); @@ -1182,7 +1182,7 @@ static int virtpci_device_serverup(struct device *parentbus, rc = vpcidriver->resume(tmpvpcidev); } - write_unlock_irqrestore(&VpcidevListLock, flags); + write_unlock_irqrestore(&vpcidev_list_lock, flags); if (!found) { LOGERR("**** FAILED to find vhba/vnic in the list\n"); @@ -1223,7 +1223,7 @@ static int virtpci_device_del(struct device *parentbus, * device_unregister after we release the lock; otherwise we * encounter "schedule while atomic" */ - write_lock_irqsave(&VpcidevListLock, flags); + write_lock_irqsave(&vpcidev_list_lock, flags); for (tmpvpcidev = vpcidev_list_head, prevvpcidev = NULL; tmpvpcidev;) { if (tmpvpcidev->devtype != devtype) DEL_CONTINUE; @@ -1275,7 +1275,7 @@ static int virtpci_device_del(struct device *parentbus, else tmpvpcidev = vpcidev_list_head; } - write_unlock_irqrestore(&VpcidevListLock, flags); + write_unlock_irqrestore(&vpcidev_list_lock, flags); if (!all && (count == 0)) { 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, str_pos += scnprintf(vbuf + str_pos, len - str_pos, "\n Virtual PCI devices\n"); - read_lock_irqsave(&VpcidevListLock, flags); + read_lock_irqsave(&vpcidev_list_lock, flags); tmpvpcidev = vpcidev_list_head; while (tmpvpcidev) { if (tmpvpcidev->devtype == VIRTHBA_TYPE) { @@ -1489,7 +1489,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf, tmpvpcidev->queueinfo.chan); 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"); bytes_read = simple_read_from_buffer(buf, len, offset, vbuf, str_pos);