From patchwork Wed Jun 20 11:00:55 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: 10477003 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 C751A60383 for ; Wed, 20 Jun 2018 11:02:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B86AB28AD7 for ; Wed, 20 Jun 2018 11:02:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD08428B99; Wed, 20 Jun 2018 11:02:32 +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 6161328AD7 for ; Wed, 20 Jun 2018 11:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754011AbeFTLC2 (ORCPT ); Wed, 20 Jun 2018 07:02:28 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:59923 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587AbeFTLBi (ORCPT ); Wed, 20 Jun 2018 07:01:38 -0400 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1fVarm-0003m6-RJ; Wed, 20 Jun 2018 13:01:35 +0200 From: Sebastian Andrzej Siewior To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , linux-usb@vger.kernel.org, tglx@linutronix.de, Sebastian Andrzej Siewior , Ezequiel Garcia Subject: [PATCH 17/27] media: stk1160: use usb_fill_int_urb() Date: Wed, 20 Jun 2018 13:00:55 +0200 Message-Id: <20180620110105.19955-18-bigeasy@linutronix.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620110105.19955-1-bigeasy@linutronix.de> References: <20180620110105.19955-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: Ezequiel Garcia Cc: Mauro Carvalho Chehab Signed-off-by: Sebastian Andrzej Siewior --- drivers/media/usb/stk1160/stk1160-video.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/media/usb/stk1160/stk1160-video.c b/drivers/media/usb/stk1160/stk1160-video.c index 2811f612820f..2dd2cb9079d7 100644 --- a/drivers/media/usb/stk1160/stk1160-video.c +++ b/drivers/media/usb/stk1160/stk1160-video.c @@ -481,13 +481,10 @@ int stk1160_alloc_isoc(struct stk1160 *dev) /* * FIXME: Where can I get the endpoint? */ - urb->dev = dev->udev; - urb->pipe = usb_rcvisocpipe(dev->udev, STK1160_EP_VIDEO); - urb->transfer_buffer = dev->isoc_ctl.transfer_buffer[i]; - urb->transfer_buffer_length = sb_size; - urb->complete = stk1160_isoc_irq; - urb->context = dev; - urb->interval = 1; + usb_fill_int_urb(urb, dev->udev, + usb_rcvisocpipe(dev->udev, STK1160_EP_VIDEO), + dev->isoc_ctl.transfer_buffer[i], sb_size, + stk1160_isoc_irq, dev, 1); urb->start_frame = 0; urb->number_of_packets = max_packets; #ifndef CONFIG_DMA_NONCOHERENT