mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 11:53:01 +00:00
staging: android: ashmem: Factor out compat code from uapi
Compat related code should not be exported to userspace directly. Factor out the compat related code back into an ashmem.h file. Change-Id: I90ae26a0045a5ff7d7af7e9caadf5d807270eaef Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
This commit is contained in:
parent
70d5129655
commit
9111247800
|
@ -34,6 +34,8 @@
|
|||
#include <linux/ashmem.h>
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
#include "ashmem.h"
|
||||
|
||||
#define ASHMEM_NAME_PREFIX "dev/ashmem/"
|
||||
#define ASHMEM_NAME_PREFIX_LEN (sizeof(ASHMEM_NAME_PREFIX) - 1)
|
||||
#define ASHMEM_FULL_NAME_LEN (ASHMEM_NAME_LEN + ASHMEM_NAME_PREFIX_LEN)
|
||||
|
|
25
drivers/staging/android/ashmem.h
Normal file
25
drivers/staging/android/ashmem.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ANDROID_ASHMEM_H
|
||||
#define _ANDROID_ASHMEM_H
|
||||
|
||||
#include <linux/compat.h>
|
||||
|
||||
/* support of 32bit userspace on 64bit platforms */
|
||||
#ifdef CONFIG_COMPAT
|
||||
#define COMPAT_ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, compat_size_t)
|
||||
#define COMPAT_ASHMEM_SET_PROT_MASK _IOW(__ASHMEMIOC, 5, unsigned int)
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <linux/limits.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/compat.h>
|
||||
|
||||
#define ASHMEM_NAME_LEN 256
|
||||
|
||||
|
@ -38,10 +37,4 @@ struct ashmem_pin {
|
|||
#define ASHMEM_CACHE_CLEAN_RANGE _IO(__ASHMEMIOC, 12)
|
||||
#define ASHMEM_CACHE_INV_RANGE _IO(__ASHMEMIOC, 13)
|
||||
|
||||
/* support of 32bit userspace on 64bit platforms */
|
||||
#ifdef CONFIG_COMPAT
|
||||
#define COMPAT_ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, compat_size_t)
|
||||
#define COMPAT_ASHMEM_SET_PROT_MASK _IOW(__ASHMEMIOC, 5, unsigned int)
|
||||
#endif
|
||||
|
||||
#endif /* _UAPI_LINUX_ASHMEM_H */
|
||||
|
|
Loading…
Reference in a new issue