]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - arch/um/drivers/mconsole_kern.h
Merge tag 'rpmsg-v4.7' of git://github.com/andersson/remoteproc
[mirror_ubuntu-zesty-kernel.git] / arch / um / drivers / mconsole_kern.h
CommitLineData
1da177e4
LT
1/*
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __MCONSOLE_KERN_H__
7#define __MCONSOLE_KERN_H__
8
37185b33 9#include <linux/list.h>
1da177e4
LT
10#include "mconsole.h"
11
12struct mconsole_entry {
13 struct list_head list;
14 struct mc_request request;
15};
16
d8d7c28e 17/* All these methods are called in process context. */
1da177e4
LT
18struct mc_device {
19 struct list_head list;
20 char *name;
f28169d2 21 int (*config)(char *, char **);
1da177e4 22 int (*get_config)(char *, char *, int, char **);
894be2a4 23 int (*id)(char **, int *, int *);
f28169d2 24 int (*remove)(int, char **);
1da177e4
LT
25};
26
27#define CONFIG_CHUNK(str, size, current, chunk, end) \
28do { \
29 current += strlen(chunk); \
30 if(current >= size) \
31 str = NULL; \
32 if(str != NULL){ \
33 strcpy(str, chunk); \
34 str += strlen(chunk); \
35 } \
36 if(end) \
37 current++; \
38} while(0)
39
40#ifdef CONFIG_MCONSOLE
41
42extern void mconsole_register_dev(struct mc_device *new);
43
44#else
45
46static inline void mconsole_register_dev(struct mc_device *new)
47{
48}
49
50#endif
51
52#endif