Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965653AbcJXVBs (ORCPT ); Mon, 24 Oct 2016 17:01:48 -0400 Received: from mout.web.de ([212.227.15.4]:57377 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964839AbcJXVBo (ORCPT ); Mon, 24 Oct 2016 17:01:44 -0400 Subject: [PATCH 3/3] [media] au0828-video: Move two assignments in au0828_init_isoc() To: linux-media@vger.kernel.org, Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab , =?UTF-8?Q?Rafael_Louren=c3=a7o_de_Lima_Chehab?= , Shuah Khan , Wolfram Sang References: Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <1ab6b168-3c69-97c2-d02e-cd64b7fa222f@users.sourceforge.net> Date: Mon, 24 Oct 2016 23:01:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:2YhOV1ZO6CJ1Uuky0llNMlNC1YT5ll90s7q2Lrbs1lMHU+XZgq4 3GZU071bCl53zv+5l/BCZ0ijy2GGkkuCXinG/sjIqkUcuUxW3Q+xX5YCLSmzwTWvVJ6V0Wp Bvp/591kT0A2qGZ2033ASSZQDtwvj1DoghwI4tZt470/GRlABm18tjRgwfa/EeV5J1Aoe0H NWuuNvUarG+/aEh4tENHQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:FARBTe8JanI=:qwoIjt5mseGguQUU/eYecU RZxblGdiGs9HOXQ9RBj4nG8oh4WGeLCGbJSJxQkZkp+qn1PLzUt1Png9fuJlL1QFtS4/D4nf1 wB8XDk0Zd0yf42VsWDO82K+fhq6FzoPEpgSP9o71jVittIftIgyIqS3h6c3TgJZ4p9nxMpk4l tBlY2+NE+wcsUPKlPDSOq8NUgJtQ1DuSNWtlYK/aPtkGYWVb7Dt9/tPt+fUVSv13kuaVwn1Ur LteI4OIpk+d6URJ1azj0gbdxTjeW8WiCS4RJ5wKZEc52rMAWSSAwjB8/yQHZ1918TNcU6vgq0 64A0URBXRYEeH3L8B6FW0M6W7TmjglC8e+5DhKQTBTBL4q8hgWxvXZ3FQRkmEwMMsfJ9Lbbry c5fgCu5GIUeBYAH++jAKxrYPBcYhgXTS2qG97BGJPEZwN8cRet5F2io4NbIReitm8hjZ1sm/0 ShDPX/uKF+1W5xkECnxHl3soB0y9XtCe1yYYUcjERW40T1E6qOeUGkth3t3KcOSy64xQANTBB Q0ekk6848Bypx0iNOxoKtcwNONiHDgKfARZy1cy26/N3SdVNpOPipjxlJ//rJGygcThYMpM+1 fTmw44xQDmMLg/OrVcbcvIwABpBvuSvKiH8DuD/msRayRFciuE4pRYCY7ugJK9oBmX8g5rf7z Jet8uvd6P8d71pAFxh3JJlz/hRRjBIiEm0x0xFWRtAR6+PUgw9IR9beDqm3bIWSw9BmORiqyK wfSegJzveI7KOSCIYCxVJVo2hckaL8etq9rMSfaOBxQiLZMuD+n5gw9OzawMhG3omeet0qpTl SFZNmpm Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1531 Lines: 44 From: Markus Elfring Date: Mon, 24 Oct 2016 22:44:02 +0200 Move the assignment for the data structure members "isoc_copy" and "num_bufs" behind the source code for memory allocations by this function. Signed-off-by: Markus Elfring --- drivers/media/usb/au0828/au0828-video.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index b5c88a7..5ebda64 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c @@ -218,9 +218,6 @@ static int au0828_init_isoc(struct au0828_dev *dev, int max_packets, int rc; au0828_isocdbg("au0828: called au0828_prepare_isoc\n"); - - dev->isoc_ctl.isoc_copy = isoc_copy; - dev->isoc_ctl.num_bufs = num_bufs; dev->isoc_ctl.urb = kcalloc(num_bufs, sizeof(*dev->isoc_ctl.urb), GFP_KERNEL); @@ -240,6 +237,7 @@ static int au0828_init_isoc(struct au0828_dev *dev, int max_packets, dev->isoc_ctl.buf = NULL; sb_size = max_packets * dev->isoc_ctl.max_pkt_size; + dev->isoc_ctl.num_bufs = num_bufs; /* allocate urbs and transfer buffers */ for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { @@ -276,6 +274,7 @@ static int au0828_init_isoc(struct au0828_dev *dev, int max_packets, k += dev->isoc_ctl.max_pkt_size; } } + dev->isoc_ctl.isoc_copy = isoc_copy; /* submit urbs and enables IRQ */ for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { -- 2.10.1