Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next
[sfrench/cifs-2.6.git] / arch / um / drivers / slip_common.h
index 2ae76d8f1be1ee594a74d54ea9a64c0f068803d9..d3798b5caf7f864f2b5418b082b65058c7ed0dbe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_SLIP_COMMON_H
 #define __UM_SLIP_COMMON_H
 
@@ -88,12 +89,13 @@ struct slip_proto {
        int esc;
 };
 
-#define SLIP_PROTO_INIT { \
-       .ibuf   = { '\0' }, \
-       .obuf   = { '\0' }, \
-        .more  = 0, \
-       .pos    = 0, \
-       .esc    = 0 \
+static inline void slip_proto_init(struct slip_proto * slip)
+{
+       memset(slip->ibuf, 0, sizeof(slip->ibuf));
+       memset(slip->obuf, 0, sizeof(slip->obuf));
+       slip->more = 0;
+       slip->pos = 0;
+       slip->esc = 0;
 }
 
 extern int slip_proto_read(int fd, void *buf, int len,