Commit 9c2b85f4 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Felipe Balbi

usb: gadget: rndis: merge u_rndis.ko with usb_f_rndis.ko

The rndis function's users use only the new interface, so the two modules
can be merged.
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 31f89db1
...@@ -512,9 +512,6 @@ config USB_U_SERIAL ...@@ -512,9 +512,6 @@ config USB_U_SERIAL
config USB_U_ETHER config USB_U_ETHER
tristate tristate
config USB_U_RNDIS
tristate
config USB_F_SERIAL config USB_F_SERIAL
tristate tristate
...@@ -642,7 +639,6 @@ config USB_CONFIGFS_RNDIS ...@@ -642,7 +639,6 @@ config USB_CONFIGFS_RNDIS
depends on USB_CONFIGFS depends on USB_CONFIGFS
depends on NET depends on NET
select USB_U_ETHER select USB_U_ETHER
select USB_U_RNDIS
select USB_F_RNDIS select USB_F_RNDIS
help help
Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol, Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
...@@ -772,7 +768,6 @@ config USB_ETH ...@@ -772,7 +768,6 @@ config USB_ETH
depends on NET depends on NET
select USB_LIBCOMPOSITE select USB_LIBCOMPOSITE
select USB_U_ETHER select USB_U_ETHER
select USB_U_RNDIS
select USB_F_ECM select USB_F_ECM
select USB_F_SUBSET select USB_F_SUBSET
select CRC32 select CRC32
...@@ -905,7 +900,6 @@ config USB_FUNCTIONFS_RNDIS ...@@ -905,7 +900,6 @@ config USB_FUNCTIONFS_RNDIS
bool "Include configuration with RNDIS (Ethernet)" bool "Include configuration with RNDIS (Ethernet)"
depends on USB_FUNCTIONFS && NET depends on USB_FUNCTIONFS && NET
select USB_U_ETHER select USB_U_ETHER
select USB_U_RNDIS
select USB_F_RNDIS select USB_F_RNDIS
help help
Include a configuration with RNDIS function (Ethernet) and the Filesystem. Include a configuration with RNDIS function (Ethernet) and the Filesystem.
...@@ -1080,7 +1074,6 @@ config USB_G_MULTI ...@@ -1080,7 +1074,6 @@ config USB_G_MULTI
config USB_G_MULTI_RNDIS config USB_G_MULTI_RNDIS
bool "RNDIS + CDC Serial + Storage configuration" bool "RNDIS + CDC Serial + Storage configuration"
depends on USB_G_MULTI depends on USB_G_MULTI
select USB_U_RNDIS
select USB_F_RNDIS select USB_F_RNDIS
default y default y
help help
......
...@@ -47,8 +47,6 @@ obj-$(CONFIG_USB_F_SERIAL) += usb_f_serial.o ...@@ -47,8 +47,6 @@ obj-$(CONFIG_USB_F_SERIAL) += usb_f_serial.o
usb_f_obex-y := f_obex.o usb_f_obex-y := f_obex.o
obj-$(CONFIG_USB_F_OBEX) += usb_f_obex.o obj-$(CONFIG_USB_F_OBEX) += usb_f_obex.o
obj-$(CONFIG_USB_U_ETHER) += u_ether.o obj-$(CONFIG_USB_U_ETHER) += u_ether.o
u_rndis-y := rndis.o
obj-$(CONFIG_USB_U_RNDIS) += u_rndis.o
usb_f_ncm-y := f_ncm.o usb_f_ncm-y := f_ncm.o
obj-$(CONFIG_USB_F_NCM) += usb_f_ncm.o obj-$(CONFIG_USB_F_NCM) += usb_f_ncm.o
usb_f_ecm-y := f_ecm.o usb_f_ecm-y := f_ecm.o
...@@ -59,7 +57,7 @@ usb_f_eem-y := f_eem.o ...@@ -59,7 +57,7 @@ usb_f_eem-y := f_eem.o
obj-$(CONFIG_USB_F_EEM) += usb_f_eem.o obj-$(CONFIG_USB_F_EEM) += usb_f_eem.o
usb_f_ecm_subset-y := f_subset.o usb_f_ecm_subset-y := f_subset.o
obj-$(CONFIG_USB_F_SUBSET) += usb_f_ecm_subset.o obj-$(CONFIG_USB_F_SUBSET) += usb_f_ecm_subset.o
usb_f_rndis-y := f_rndis.o usb_f_rndis-y := f_rndis.o rndis.o
obj-$(CONFIG_USB_F_RNDIS) += usb_f_rndis.o obj-$(CONFIG_USB_F_RNDIS) += usb_f_rndis.o
usb_f_mass_storage-y := f_mass_storage.o storage_common.o usb_f_mass_storage-y := f_mass_storage.o storage_common.o
obj-$(CONFIG_USB_F_MASS_STORAGE)+= usb_f_mass_storage.o obj-$(CONFIG_USB_F_MASS_STORAGE)+= usb_f_mass_storage.o
......
...@@ -979,6 +979,26 @@ static struct usb_function *rndis_alloc(struct usb_function_instance *fi) ...@@ -979,6 +979,26 @@ static struct usb_function *rndis_alloc(struct usb_function_instance *fi)
return &rndis->port.func; return &rndis->port.func;
} }
DECLARE_USB_FUNCTION_INIT(rndis, rndis_alloc_inst, rndis_alloc); DECLARE_USB_FUNCTION(rndis, rndis_alloc_inst, rndis_alloc);
static int __init rndis_mod_init(void)
{
int ret;
ret = rndis_init();
if (ret)
return ret;
return usb_function_register(&rndisusb_func);
}
module_init(rndis_mod_init);
static void __exit rndis_mod_exit(void)
{
usb_function_unregister(&rndisusb_func);
rndis_exit();
}
module_exit(rndis_mod_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Brownell"); MODULE_AUTHOR("David Brownell");
...@@ -1142,7 +1142,7 @@ static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS]; ...@@ -1142,7 +1142,7 @@ static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS];
#endif /* CONFIG_USB_GADGET_DEBUG_FILES */ #endif /* CONFIG_USB_GADGET_DEBUG_FILES */
static int rndis_init(void) int rndis_init(void)
{ {
u8 i; u8 i;
...@@ -1174,9 +1174,8 @@ static int rndis_init(void) ...@@ -1174,9 +1174,8 @@ static int rndis_init(void)
return 0; return 0;
} }
module_init(rndis_init);
static void rndis_exit(void) void rndis_exit(void)
{ {
#ifdef CONFIG_USB_GADGET_DEBUG_FILES #ifdef CONFIG_USB_GADGET_DEBUG_FILES
u8 i; u8 i;
...@@ -1188,6 +1187,4 @@ static void rndis_exit(void) ...@@ -1188,6 +1187,4 @@ static void rndis_exit(void)
} }
#endif #endif
} }
module_exit(rndis_exit);
MODULE_LICENSE("GPL");
...@@ -36,6 +36,8 @@ struct f_rndis_opts { ...@@ -36,6 +36,8 @@ struct f_rndis_opts {
int refcnt; int refcnt;
}; };
int rndis_init(void);
void rndis_exit(void);
void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net); void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net);
#endif /* U_RNDIS_H */ #endif /* U_RNDIS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment