]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: gadget: renesas_usbhs: add usbhs_pipe_name()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 11 Oct 2011 05:04:23 +0000 (22:04 -0700)
committerFelipe Balbi <balbi@ti.com>
Thu, 13 Oct 2011 17:41:43 +0000 (20:41 +0300)
pipe name is usefull function for mod_xxx

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/renesas_usbhs/pipe.c
drivers/usb/renesas_usbhs/pipe.h

index 4235a2ecebf9c7348315ba54e43b0bf5a8a6d6c4..7636f2353b9de57e5438506abf396545631202f5 100644 (file)
@@ -39,6 +39,11 @@ static char *usbhsp_pipe_name[] = {
        [USB_ENDPOINT_XFER_ISOC]        = "ISO",
 };
 
+char *usbhs_pipe_name(struct usbhs_pipe *pipe)
+{
+       return usbhsp_pipe_name[usbhs_pipe_type(pipe)];
+}
+
 /*
  *             DCPCTR/PIPEnCTR functions
  */
@@ -592,7 +597,7 @@ struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv,
 
        dev_dbg(dev, "enable pipe %d : %s (%s)\n",
                usbhs_pipe_number(pipe),
-               usbhsp_pipe_name[endpoint_type],
+               usbhs_pipe_name(pipe),
                usbhs_pipe_is_dir_in(pipe) ? "in" : "out");
 
        /*
index aff8bfa207d311befd9b791423e6259c4d948972..37018351f47c7ad453e088394811a3c26fcacf5b 100644 (file)
@@ -73,6 +73,7 @@ struct usbhs_pipe_info {
 /*
  * pipe control
  */
+char *usbhs_pipe_name(struct usbhs_pipe *pipe);
 struct usbhs_pipe
 *usbhs_pipe_malloc(struct usbhs_priv *priv, int endpoint_type, int dir_in);
 int usbhs_pipe_probe(struct usbhs_priv *priv);