linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Greg KH <greg@kroah.com>, Takashi Iwai <tiwai@suse.de>
Cc: Daniel Mack <daniel@caiaq.de>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linus <torvalds@linux-foundation.org>
Subject: Re: linux-next: manual merge of the usb tree with the sound tree
Date: Fri, 21 May 2010 10:39:40 +1000	[thread overview]
Message-ID: <20100521103940.927764a0.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20100430055914.GA30801@buzzloop.caiaq.de>

Hi Greg, Takashi,

On Fri, 30 Apr 2010 07:59:14 +0200 Daniel Mack <daniel@caiaq.de> wrote:
>
> On Fri, Apr 30, 2010 at 03:51:34PM +1000, Stephen Rothwell wrote:
> > Today's linux-next merge of the usb tree got a conflict in
> > sound/usb/usbaudio.c between commit
> > e5779998bf8b70e48a6cc208c8b61b33bd6117ea ("ALSA: usb-audio: refactor
> > code") from the sound tree and commit
> > 3cc96f50329227fbf34de2459491901b6ee1c98c ("USB: rename usb_buffer_alloc()
> > and usb_buffer_free() users") from the usb tree.
> > 
> > The former moved the relevant code from usbaudio.c to urb.c, so I applied
> > the changes from the latter to that (see below).
> 
> Oops, yes. Ironically, these are both my patches.
> Thanks for fixing this up, Stephen.

The sound tree has now been merged int Linus', so this patch needs to be
applied to the usb tree before it is merged into Linus'.   This patch can
be applied to Linus' tree right now, as usb_free_coherent() already
exists there.

Here is the patch again:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 30 Apr 2010 14:44:54 +1000
Subject: [PATCH] sound: fixup for usb_buffer_alloc/free rename

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 sound/usb/urb.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/usb/urb.c b/sound/usb/urb.c
index 5570a2b..de607d4 100644
--- a/sound/usb/urb.c
+++ b/sound/usb/urb.c
@@ -101,7 +101,7 @@ static void release_urb_ctx(struct snd_urb_ctx *u)
 {
 	if (u->urb) {
 		if (u->buffer_size)
-			usb_buffer_free(u->subs->dev, u->buffer_size,
+			usb_free_coherent(u->subs->dev, u->buffer_size,
 					u->urb->transfer_buffer,
 					u->urb->transfer_dma);
 		usb_free_urb(u->urb);
@@ -154,7 +154,7 @@ void snd_usb_release_substream_urbs(struct snd_usb_substream *subs, int force)
 		release_urb_ctx(&subs->dataurb[i]);
 	for (i = 0; i < SYNC_URBS; i++)
 		release_urb_ctx(&subs->syncurb[i]);
-	usb_buffer_free(subs->dev, SYNC_URBS * 4,
+	usb_free_coherent(subs->dev, SYNC_URBS * 4,
 			subs->syncbuf, subs->sync_dma);
 	subs->syncbuf = NULL;
 	subs->nurbs = 0;
@@ -308,8 +308,8 @@ int snd_usb_init_substream_urbs(struct snd_usb_substream *subs,
 		if (!u->urb)
 			goto out_of_memory;
 		u->urb->transfer_buffer =
-			usb_buffer_alloc(subs->dev, u->buffer_size, GFP_KERNEL,
-					 &u->urb->transfer_dma);
+			usb_alloc_coherent(subs->dev, u->buffer_size,
+					   GFP_KERNEL, &u->urb->transfer_dma);
 		if (!u->urb->transfer_buffer)
 			goto out_of_memory;
 		u->urb->pipe = subs->datapipe;
@@ -321,7 +321,7 @@ int snd_usb_init_substream_urbs(struct snd_usb_substream *subs,
 
 	if (subs->syncpipe) {
 		/* allocate and initialize sync urbs */
-		subs->syncbuf = usb_buffer_alloc(subs->dev, SYNC_URBS * 4,
+		subs->syncbuf = usb_alloc_coherent(subs->dev, SYNC_URBS * 4,
 						 GFP_KERNEL, &subs->sync_dma);
 		if (!subs->syncbuf)
 			goto out_of_memory;
-- 
1.7.1


-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

  reply	other threads:[~2010-05-21  0:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-30  5:51 linux-next: manual merge of the usb tree with the sound tree Stephen Rothwell
2010-04-30  5:59 ` Daniel Mack
2010-05-21  0:39   ` Stephen Rothwell [this message]
2010-05-21  5:45     ` Takashi Iwai
2010-05-21  6:19       ` Takashi Iwai

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=20100521103940.927764a0.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=daniel@caiaq.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=torvalds@linux-foundation.org \
    /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).