From patchwork Wed Jun 20 10:40:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 10476891 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3F87560532 for ; Wed, 20 Jun 2018 10:42:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 317D528E09 for ; Wed, 20 Jun 2018 10:42:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2605628E1C; Wed, 20 Jun 2018 10:42:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9C4328E09 for ; Wed, 20 Jun 2018 10:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754161AbeFTKmY (ORCPT ); Wed, 20 Jun 2018 06:42:24 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:59830 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753970AbeFTKmG (ORCPT ); Wed, 20 Jun 2018 06:42:06 -0400 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1fVaYu-0003Tg-9W; Wed, 20 Jun 2018 12:42:04 +0200 From: Sebastian Andrzej Siewior To: netdev@vger.kernel.org Cc: Karsten Keil , linux-usb@vger.kernel.org, tglx@linutronix.de, Sebastian Andrzej Siewior Subject: [PATCH 3/4] isdn: hisax: st5481_usb: use usb_fill_int_urb() Date: Wed, 20 Jun 2018 12:40:27 +0200 Message-Id: <20180620104028.18283-4-bigeasy@linutronix.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620104028.18283-1-bigeasy@linutronix.de> References: <20180620104028.18283-1-bigeasy@linutronix.de> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Cc: Karsten Keil Cc: netdev@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- drivers/isdn/hisax/st5481_usb.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c index 1cb9930d5e24..f207fda691c7 100644 --- a/drivers/isdn/hisax/st5481_usb.c +++ b/drivers/isdn/hisax/st5481_usb.c @@ -408,15 +408,10 @@ fill_isoc_urb(struct urb *urb, struct usb_device *dev, { int k; - urb->dev = dev; - urb->pipe = pipe; - urb->interval = 1; - urb->transfer_buffer = buf; + usb_fill_int_urb(urb, dev, pipe, buf, num_packets * packet_size, + complete, context, 1); + urb->number_of_packets = num_packets; - urb->transfer_buffer_length = num_packets * packet_size; - urb->actual_length = 0; - urb->complete = complete; - urb->context = context; urb->transfer_flags = URB_ISO_ASAP; for (k = 0; k < num_packets; k++) { urb->iso_frame_desc[k].offset = packet_size * k;