From 83210e59ee1527f229af6aef78c95b747bdcf9c4 Mon Sep 17 00:00:00 2001 From: Andrzej Pietrasiewicz Date: Fri, 20 Mar 2015 08:18:47 +0100 Subject: [PATCH] usb: gadget: rndis: use rndis_params instead of configNr 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 prepares the elimination of the said limit by converting all the functions which accept rndis config number to accept a pointer to the actual struct rndis_params. Consequently, rndis_register() returns a pointer to a corresponding struct rndis_params instance. The pointer is then always used by f_rndis.c instead of config number when it talks to rndis.c API. A nice side-effect of the changes is that many lines of code in rndis.c become shorter and fit in 80 columns. If a function prototype changes in rndis.h a style cleanup is made at the same time, otherwise checkpatch complains that the patch has style problems. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi --- Reading git-format-patch failed