]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: gadget: renesas_usbhs: remove unneeded parameter from usbhs_mod_is_host()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 11 Oct 2011 05:02:45 +0000 (22:02 -0700)
committerFelipe Balbi <balbi@ti.com>
Thu, 13 Oct 2011 17:41:40 +0000 (20:41 +0300)
it was possible to get usbhs_mod from usbhs_priv.
this patch remove unneeded parameter.

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

index ab1203098931cc43e9ab7f1899fbe61c5800b115..0340fb945f5b5a702dcc5e127028fea180d56aea 100644 (file)
@@ -93,8 +93,9 @@ struct usbhs_mod *usbhs_mod_get(struct usbhs_priv *priv, int id)
        return ret;
 }
 
-int usbhs_mod_is_host(struct usbhs_priv *priv, struct usbhs_mod *mod)
+int usbhs_mod_is_host(struct usbhs_priv *priv)
 {
+       struct usbhs_mod *mod = usbhs_mod_get_current(priv);
        struct usbhs_mod_info *info = usbhs_priv_to_modinfo(priv);
 
        if (!mod)
index 93edb1f29eb044efc5c604241b54d7d1111141e1..0e2c5b695820838b8dbc0b9cdad325656d81ec3a 100644 (file)
@@ -88,7 +88,7 @@ struct usbhs_mod_info {
 struct usbhs_mod *usbhs_mod_get(struct usbhs_priv *priv, int id);
 struct usbhs_mod *usbhs_mod_get_current(struct usbhs_priv *priv);
 void usbhs_mod_register(struct usbhs_priv *priv, struct usbhs_mod *usb, int id);
-int usbhs_mod_is_host(struct usbhs_priv *priv, struct usbhs_mod *mod);
+int usbhs_mod_is_host(struct usbhs_priv *priv);
 int usbhs_mod_change(struct usbhs_priv *priv, int id);
 int usbhs_mod_probe(struct usbhs_priv *priv);
 void usbhs_mod_remove(struct usbhs_priv *priv);
index 6aaa4364994ecf49a741b69720f5883d4b68d760..ff97a8e4fcda977ed85dd8ed665373768dbbd85f 100644 (file)
@@ -545,9 +545,8 @@ struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv,
                                     int dir_in)
 {
        struct device *dev = usbhs_priv_to_dev(priv);
-       struct usbhs_mod *mod = usbhs_mod_get_current(priv);
        struct usbhs_pipe *pipe;
-       int is_host = usbhs_mod_is_host(priv, mod);
+       int is_host = usbhs_mod_is_host(priv);
        int ret;
        u16 pipecfg, pipebuf;