]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: caif: added cfserl_release function
authorPavel Skripkin <paskripkin@gmail.com>
Thu, 3 Jun 2021 16:38:12 +0000 (19:38 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jun 2021 22:05:06 +0000 (15:05 -0700)
Added cfserl_release() function.

Cc: stable@vger.kernel.org
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/caif/cfserl.h
net/caif/cfserl.c

index 14a55e03bb3ce8395381fc8fceb8ed770f674baa..67cce8757175a2651b065af6e5d32f7cb63b5214 100644 (file)
@@ -9,4 +9,5 @@
 #include <net/caif/caif_layer.h>
 
 struct cflayer *cfserl_create(int instance, bool use_stx);
+void cfserl_release(struct cflayer *layer);
 #endif
index e11725a4bb0edb8c01d985accd885fe453f9b12d..40cd57ad0a0f4f51e2ab5d51d1629aee739f79a7 100644 (file)
@@ -31,6 +31,11 @@ static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt);
 static void cfserl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
                           int phyid);
 
+void cfserl_release(struct cflayer *layer)
+{
+       kfree(layer);
+}
+
 struct cflayer *cfserl_create(int instance, bool use_stx)
 {
        struct cfserl *this = kzalloc(sizeof(struct cfserl), GFP_ATOMIC);