All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: netdev@vger.kernel.org
Cc: Karsten Keil <isdn@linux-pingi.de>,
	linux-usb@vger.kernel.org, tglx@linutronix.de,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH 2/4] isdn: hisax: hfc_usb: use usb_fill_int_urb()
Date: Wed, 20 Jun 2018 12:40:26 +0200	[thread overview]
Message-ID: <20180620104028.18283-3-bigeasy@linutronix.de> (raw)
In-Reply-To: <20180620104028.18283-1-bigeasy@linutronix.de>

Using usb_fill_int_urb() helps to find code which initializes an
URB. A grep for members of the struct (like ->complete) reveal lots
of other things, too.

The `interval' parameter is now set differently on HS and SS. The
argument is fed from bInterval so it should be the right thing to do.

Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/isdn/hisax/hfc_usb.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index 97ecb3073045..1d4cd01d4685 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -432,16 +432,12 @@ fill_isoc_urb(struct urb *urb, struct usb_device *dev, unsigned int pipe,
 {
 	int k;
 
-	urb->dev = dev;
-	urb->pipe = pipe;
-	urb->complete = complete;
+	usb_fill_int_urb(urb, dev, pipe, buf, packet_size * num_packets,
+			 complete, context, interval);
+
 	urb->number_of_packets = num_packets;
-	urb->transfer_buffer_length = packet_size * num_packets;
-	urb->context = context;
-	urb->transfer_buffer = buf;
 	urb->transfer_flags = URB_ISO_ASAP;
 	urb->actual_length = 0;
-	urb->interval = interval;
 	for (k = 0; k < num_packets; k++) {
 		urb->iso_frame_desc[k].offset = packet_size * k;
 		urb->iso_frame_desc[k].length = packet_size;
-- 
2.17.1

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: netdev@vger.kernel.org
Cc: Karsten Keil <isdn@linux-pingi.de>,
	linux-usb@vger.kernel.org, tglx@linutronix.de,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [2/4] isdn: hisax: hfc_usb: use usb_fill_int_urb()
Date: Wed, 20 Jun 2018 12:40:26 +0200	[thread overview]
Message-ID: <20180620104028.18283-3-bigeasy@linutronix.de> (raw)

Using usb_fill_int_urb() helps to find code which initializes an
URB. A grep for members of the struct (like ->complete) reveal lots
of other things, too.

The `interval' parameter is now set differently on HS and SS. The
argument is fed from bInterval so it should be the right thing to do.

Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/isdn/hisax/hfc_usb.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index 97ecb3073045..1d4cd01d4685 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -432,16 +432,12 @@ fill_isoc_urb(struct urb *urb, struct usb_device *dev, unsigned int pipe,
 {
 	int k;
 
-	urb->dev = dev;
-	urb->pipe = pipe;
-	urb->complete = complete;
+	usb_fill_int_urb(urb, dev, pipe, buf, packet_size * num_packets,
+			 complete, context, interval);
+
 	urb->number_of_packets = num_packets;
-	urb->transfer_buffer_length = packet_size * num_packets;
-	urb->context = context;
-	urb->transfer_buffer = buf;
 	urb->transfer_flags = URB_ISO_ASAP;
 	urb->actual_length = 0;
-	urb->interval = interval;
 	for (k = 0; k < num_packets; k++) {
 		urb->iso_frame_desc[k].offset = packet_size * k;
 		urb->iso_frame_desc[k].length = packet_size;

  parent reply	other threads:[~2018-06-20 10:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 10:40 ISDN: use irqsave() in URB completion + usb_fill_int_urb Sebastian Andrzej Siewior
2018-06-20 10:40 ` [PATCH 1/4] isdn: gigaset: use usb_fill_int_urb() Sebastian Andrzej Siewior
2018-06-20 10:40   ` [1/4] " Sebastian Andrzej Siewior
2018-06-20 10:40 ` Sebastian Andrzej Siewior [this message]
2018-06-20 10:40   ` [2/4] isdn: hisax: hfc_usb: " Sebastian Andrzej Siewior
2018-06-20 10:40 ` [PATCH 3/4] isdn: hisax: st5481_usb: " Sebastian Andrzej Siewior
2018-06-20 10:40   ` [3/4] " Sebastian Andrzej Siewior
2018-06-20 10:40 ` [PATCH 4/4] isdn: mISDN: use irqsave() in USB's complete callback Sebastian Andrzej Siewior
2018-06-20 10:40   ` [4/4] " Sebastian Andrzej Siewior
2018-06-22  4:54 ` ISDN: use irqsave() in URB completion + usb_fill_int_urb David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180620104028.18283-3-bigeasy@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=isdn@linux-pingi.de \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.