Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/vmcp: split vmcp header file and move to uapi

Split the vmcp header file and move the device driver internal
structure to the C file, and move the ioctl definitions to the uapi
directory.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
ef267938 3f429842

+17 -15
+10 -1
drivers/s390/char/vmcp.c
··· 25 25 #include <asm/compat.h> 26 26 #include <asm/cpcmd.h> 27 27 #include <asm/debug.h> 28 - #include "vmcp.h" 28 + #include <asm/vmcp.h> 29 + 30 + struct vmcp_session { 31 + char *response; 32 + unsigned int bufsize; 33 + unsigned int cma_alloc : 1; 34 + int resp_size; 35 + int resp_code; 36 + struct mutex mutex; 37 + }; 29 38 30 39 static debug_info_t *vmcp_debug; 31 40
+7 -14
drivers/s390/char/vmcp.h arch/s390/include/uapi/asm/vmcp.h
··· 12 12 * The idea of this driver is based on cpint from Neale Ferguson 13 13 */ 14 14 15 + #ifndef _UAPI_ASM_VMCP_H 16 + #define _UAPI_ASM_VMCP_H 17 + 15 18 #include <linux/ioctl.h> 16 - #include <linux/mutex.h> 17 19 18 - #define VMCP_GETCODE _IOR(0x10, 1, int) 19 - #define VMCP_SETBUF _IOW(0x10, 2, int) 20 - #define VMCP_GETSIZE _IOR(0x10, 3, int) 20 + #define VMCP_GETCODE _IOR(0x10, 1, int) 21 + #define VMCP_SETBUF _IOW(0x10, 2, int) 22 + #define VMCP_GETSIZE _IOR(0x10, 3, int) 21 23 22 - struct vmcp_session { 23 - char *response; 24 - unsigned int bufsize; 25 - unsigned int cma_alloc : 1; 26 - int resp_size; 27 - int resp_code; 28 - /* As we use copy_from/to_user, which might * 29 - * sleep and cannot use a spinlock */ 30 - struct mutex mutex; 31 - }; 24 + #endif /* _UAPI_ASM_VMCP_H */