From: Karsten Wiese <fzu@wemgehoertderstaat.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH] usbmidi.c: Call usb_autopm functions from rawmidi open/close callbacks
Date: Tue, 18 Mar 2008 15:05:46 +0100 [thread overview]
Message-ID: <200803181505.46464.fzu@wemgehoertderstaat.de> (raw)
Lets "usb auto suspend" work for devices that set their
usb_driver::supports_autosuspend to 1.
Has no effect for other devices.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
---
sound/usb/usbmidi.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index 6c616c7..842486f 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -860,11 +860,14 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream)
}
substream->runtime->private_data = port;
port->state = STATE_UNKNOWN;
+ usb_autopm_get_interface(umidi->iface);
return 0;
}
static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream)
{
+ struct snd_usb_midi* umidi = substream->rmidi->private_data;
+ usb_autopm_put_interface(umidi->iface);
return 0;
}
--
1.5.3.3
-------------------------------------------------------
next reply other threads:[~2008-03-18 14:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 14:05 Karsten Wiese [this message]
2008-03-18 14:16 ` [PATCH] usbmidi.c: Call usb_autopm functions from rawmidi open/close callbacks Clemens Ladisch
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=200803181505.46464.fzu@wemgehoertderstaat.de \
--to=fzu@wemgehoertderstaat.de \
--cc=alsa-devel@alsa-project.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