summaryrefslogtreecommitdiff
path: root/drivers/staging/most
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2016-09-19 17:40:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-20 08:39:42 +0200
commit88d1878bcaa438297e3e5bb7376a6d8f5f5c38e5 (patch)
treef638b1b6c20c574bd95af2682d71f77f3e3fa7df /drivers/staging/most
parent3fbcb92b74581eaec224efe6972aab7359a5230b (diff)
staging: most: hdm-usb: rename channel related spinlock
To increase comprehension this patch renames the channel related spinlock with a more fitting name. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r--drivers/staging/most/hdm-usb/hdm_usb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 9474b43c0f5a..9deb28c4cc61 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -102,7 +102,7 @@ struct clear_hold_work {
* @link_stat: link status of hardware
* @description: device description
* @suffix: suffix for channel name
- * @anchor_list_lock: locks list access
+ * @channel_lock: synchronize channel access
* @padding_active: indicates channel uses padding
* @is_channel_healthy: health status table of each channel
* @busy_urbs: list of anchored items
@@ -122,7 +122,7 @@ struct most_dev {
u16 link_stat;
char description[MAX_STRING_LEN];
char suffix[MAX_NUM_ENDPOINTS][MAX_SUFFIX_LEN];
- spinlock_t anchor_list_lock[MAX_NUM_ENDPOINTS];
+ spinlock_t channel_lock[MAX_NUM_ENDPOINTS]; /* sync channel access */
bool padding_active[MAX_NUM_ENDPOINTS];
bool is_channel_healthy[MAX_NUM_ENDPOINTS];
struct clear_hold_work clear_work[MAX_NUM_ENDPOINTS];
@@ -270,7 +270,7 @@ static int hdm_poison_channel(struct most_interface *iface, int channel)
return -ECHRNG;
}
- lock = mdev->anchor_list_lock + channel;
+ lock = mdev->channel_lock + channel;
spin_lock_irqsave(lock, flags);
mdev->is_channel_healthy[channel] = false;
spin_unlock_irqrestore(lock, flags);
@@ -373,7 +373,7 @@ static void hdm_write_completion(struct urb *urb)
struct most_dev *mdev = to_mdev(mbo->ifp);
unsigned int channel = mbo->hdm_channel_id;
struct device *dev = &mdev->usb_device->dev;
- spinlock_t *lock = mdev->anchor_list_lock + channel; /* temp. lock */
+ spinlock_t *lock = mdev->channel_lock + channel;
unsigned long flags;
spin_lock_irqsave(lock, flags);
@@ -527,7 +527,7 @@ static void hdm_read_completion(struct urb *urb)
struct most_dev *mdev = to_mdev(mbo->ifp);
unsigned int channel = mbo->hdm_channel_id;
struct device *dev = &mdev->usb_device->dev;
- spinlock_t *lock = mdev->anchor_list_lock + channel; /* temp. lock */
+ spinlock_t *lock = mdev->channel_lock + channel;
unsigned long flags;
spin_lock_irqsave(lock, flags);
@@ -1261,7 +1261,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
tmp_cap->direction = MOST_CH_TX;
tmp_cap++;
init_usb_anchor(&mdev->busy_urbs[i]);
- spin_lock_init(&mdev->anchor_list_lock[i]);
+ spin_lock_init(&mdev->channel_lock[i]);
err = drci_wr_reg(usb_dev,
DRCI_REG_BASE + DRCI_COMMAND +
ep_desc->bEndpointAddress * 16,