]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: renesas_usbhs: move macros from mod.c to the mod.h
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tue, 25 Jun 2019 05:38:47 +0000 (14:38 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jun 2019 02:33:08 +0000 (10:33 +0800)
In the future, since other source code of this driver will use these
macros, this patch moves it to the header file.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/renesas_usbhs/mod.c
drivers/usb/renesas_usbhs/mod.h

index 540472abb23a55572b18e8e51177f78660234403..984bb2fff8b8f06d2a869f9972599fd27fb90067 100644 (file)
 #include "common.h"
 #include "mod.h"
 
-#define usbhs_priv_to_modinfo(priv) (&priv->mod_info)
-#define usbhs_mod_info_call(priv, func, param...)      \
-({                                             \
-       struct usbhs_mod_info *info;            \
-       info = usbhs_priv_to_modinfo(priv);     \
-       !info->func ? 0 :                       \
-        info->func(param);                     \
-})
-
 /*
  *             autonomy
  *
index 7117729dce7bba6391930abdca189219f46562e8..6678e8103bb1ae379e8a4836d3d9dbdeaccac8e1 100644 (file)
@@ -129,6 +129,15 @@ void usbhs_irq_callback_update(struct usbhs_priv *priv, struct usbhs_mod *mod);
                 mod->func(param);                      \
        })
 
+#define usbhs_priv_to_modinfo(priv) (&priv->mod_info)
+#define usbhs_mod_info_call(priv, func, param...)      \
+({                                                     \
+       struct usbhs_mod_info *info;                    \
+       info = usbhs_priv_to_modinfo(priv);             \
+       !info->func ? 0 :                               \
+        info->func(param);                             \
+})
+
 /*
  * host / gadget control
  */