diff options
author | Pavel Skripkin <paskripkin@gmail.com> | 2021-06-03 19:38:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-04 01:05:06 +0300 |
commit | bce130e7f392ddde8cfcb09927808ebd5f9c8669 (patch) | |
tree | ee0df0fd63b911a89401defd7317a62fae7b853a | |
parent | 4189777ca84f3f576767119a005f810c53f39995 (diff) | |
download | linux-bce130e7f392ddde8cfcb09927808ebd5f9c8669.tar.xz |
net: caif: added cfserl_release function
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>
-rw-r--r-- | include/net/caif/cfserl.h | 1 | ||||
-rw-r--r-- | net/caif/cfserl.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/net/caif/cfserl.h b/include/net/caif/cfserl.h index 14a55e03bb3c..67cce8757175 100644 --- a/include/net/caif/cfserl.h +++ b/include/net/caif/cfserl.h @@ -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 diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c index e11725a4bb0e..40cd57ad0a0f 100644 --- a/net/caif/cfserl.c +++ b/net/caif/cfserl.c @@ -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); |