]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: usb-audio: void return type of snd_usb_endpoint_deactivate()
authorEldad Zack <eldad@fogrefinery.com>
Sun, 6 Oct 2013 20:31:10 +0000 (22:31 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 7 Oct 2013 09:00:03 +0000 (11:00 +0200)
The return value of snd_usb_endpoint_deactivate() is not used,
make the function have no return value.
Update the documentation to reflect what the function is actually
doing.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c
sound/usb/endpoint.h

index e84732c874cb4148bffe5731960059b48d2456cf..26856601422bb7ab097658b93468752a375cb12c 100644 (file)
@@ -946,28 +946,23 @@ void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep)
  *
  * @ep: the endpoint to deactivate
  *
- * If the endpoint is not currently in use, this functions will select the
- * alternate interface setting 0 for the interface of this endpoint.
+ * If the endpoint is not currently in use, this functions will
+ * deactivate its associated URBs.
  *
  * In case of any active users, this functions does nothing.
- *
- * Returns an error if usb_set_interface() failed, 0 in all other
- * cases.
  */
-int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep)
+void snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep)
 {
        if (!ep)
-               return -EINVAL;
+               return;
 
        if (ep->use_count != 0)
-               return 0;
+               return;
 
        deactivate_urbs(ep, true);
        wait_clear_urbs(ep);
 
        clear_bit(EP_FLAG_ACTIVATED, &ep->flags);
-
-       return 0;
 }
 
 /**
index 3bd02f0d226cfea16a9cf2672d2c141d0e26ff1a..1c7e8ee48abc12e3e61cbda6491f20bdb9628ce5 100644 (file)
@@ -22,7 +22,7 @@ int  snd_usb_endpoint_start(struct snd_usb_endpoint *ep, bool can_sleep);
 void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep);
 void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep);
 int  snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
-int  snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
+void snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
 void snd_usb_endpoint_free(struct list_head *head);
 
 int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep);