aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2008-12-06 21:32:46 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 16:52:32 -0500
commit88a1e909da60cd3adf159bc337ede09d4ac93e3e (patch)
treec52bf444ee78686a049f67526267b85fd22beeb4 /drivers/staging
parent8cc59061f22370a60764b04c51f4cc5a01270760 (diff)
Staging: usbip: switch to list_for_each_entry()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/usbip/stub_rx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c
index 2a2cc0f051c..2eb61372fe0 100644
--- a/drivers/staging/usbip/stub_rx.c
+++ b/drivers/staging/usbip/stub_rx.c
@@ -234,8 +234,6 @@ static void tweak_special_requests(struct urb *urb)
234static int stub_recv_cmd_unlink(struct stub_device *sdev, 234static int stub_recv_cmd_unlink(struct stub_device *sdev,
235 struct usbip_header *pdu) 235 struct usbip_header *pdu)
236{ 236{
237 struct list_head *listhead = &sdev->priv_init;
238 struct list_head *ptr;
239 unsigned long flags; 237 unsigned long flags;
240 238
241 struct stub_priv *priv; 239 struct stub_priv *priv;
@@ -243,8 +241,7 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev,
243 241
244 spin_lock_irqsave(&sdev->priv_lock, flags); 242 spin_lock_irqsave(&sdev->priv_lock, flags);
245 243
246 for (ptr = listhead->next; ptr != listhead; ptr = ptr->next) { 244 list_for_each_entry(priv, &sdev->priv_init, list) {
247 priv = list_entry(ptr, struct stub_priv, list);
248 if (priv->seqnum == pdu->u.cmd_unlink.seqnum) { 245 if (priv->seqnum == pdu->u.cmd_unlink.seqnum) {
249 int ret; 246 int ret;
250 247