From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-media@vger.kernel.org,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Rafael Lourenço de Lima Chehab" <chehabrafael@gmail.com>,
"Shuah Khan" <shuah@kernel.org>,
"Wolfram Sang" <wsa-dev@sang-engineering.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 3/3] [media] au0828-video: Move two assignments in au0828_init_isoc()
Date: Mon, 24 Oct 2016 23:01:31 +0200 [thread overview]
Message-ID: <1ab6b168-3c69-97c2-d02e-cd64b7fa222f@users.sourceforge.net> (raw)
In-Reply-To: <c6a37822-c0f9-1f1e-6ebe-a1c88c6d9d0a@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
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
next prev parent reply other threads:[~2016-10-24 21:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 20:58 [PATCH 0/3] [media] au0828-video: Fine-tuning for au0828_init_isoc() SF Markus Elfring
2016-10-24 20:59 ` [PATCH 1/3] [media] au0828-video: Use kcalloc() in au0828_init_isoc() SF Markus Elfring
2016-10-24 22:28 ` Andrey Utkin
2016-10-25 0:11 ` Mauro Carvalho Chehab
2016-10-25 5:51 ` Julia Lawall
2016-10-25 12:46 ` Andrey Utkin
2016-10-25 8:40 ` Dan Carpenter
2016-10-24 21:00 ` [PATCH 2/3] [media] au0828-video: Delete three error messages for a failed memory allocation SF Markus Elfring
2016-10-24 21:01 ` SF Markus Elfring [this message]
2016-10-25 9:06 ` [PATCH 3/3] [media] au0828-video: Move two assignments in au0828_init_isoc() Dan Carpenter
2016-11-03 12:41 ` Hans Verkuil
2016-11-03 19:56 ` SF Markus Elfring
2016-11-04 8:09 ` Hans Verkuil
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=1ab6b168-3c69-97c2-d02e-cd64b7fa222f@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=chehabrafael@gmail.com \
--cc=hans.verkuil@cisco.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=shuah@kernel.org \
--cc=wsa-dev@sang-engineering.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).