summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/u_rndis.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2015-02-06 13:43:30 +0100
committerFelipe Balbi <balbi@ti.com>2015-05-07 13:47:17 -0500
commitd6d22922d9070b660e3dce0a87a94f0b581e803e (patch)
tree74765c687bf8f1c5a963e117d350cbc2c6bdb85b /drivers/usb/gadget/function/u_rndis.h
parent6122b151c7799673794927031a884df0f2355922 (diff)
usb: gadget: rndis: remove the limit of available rndis connections
RNDIS function has a limitation on the number of allowed instances. So far it has been RNDIS_MAX_CONFIGS, which happens to be one. In order to eliminate this kind of arbitrary limitation we should not preallocate a predefined (RNDIS_MAX_CONFIGS) array of struct rndis_params instances but instead allow allocating them on demand. This patch allocates struct rndis_params on demand in rndis_register(). Coversly, the structure is free()'d in rndis_deregister(). If CONFIG_USB_GADGET_DEBUG_FILES is set, the proc files are created which is the same behaviour as before, but the moment of creation is delayed until struct rndis_params is actually allocated. rnids_init() and rndis_exit() have nothing to do, so they are eliminated. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_rndis.h')
-rw-r--r--drivers/usb/gadget/function/u_rndis.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/gadget/function/u_rndis.h b/drivers/usb/gadget/function/u_rndis.h
index e902aa42a297..4eafd5050545 100644
--- a/drivers/usb/gadget/function/u_rndis.h
+++ b/drivers/usb/gadget/function/u_rndis.h
@@ -39,8 +39,6 @@ struct f_rndis_opts {
int refcnt;
};
-int rndis_init(void);
-void rndis_exit(void);
void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net);
#endif /* U_RNDIS_H */