blob: 55de74cfae98d5f567fbc5d471923558233af26f [file] [log] [blame]
Shrenuj Bansala419c792016-10-20 14:05:11 -07001/* Copyright (c) 2013-2015, 2017, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13#ifndef __ADRENO_COMPAT_H
14#define __ADRENO_COMPAT_H
15
16#ifdef CONFIG_COMPAT
17#include <linux/compat.h>
18#include "kgsl.h"
19#include "kgsl_device.h"
20
21int adreno_getproperty_compat(struct kgsl_device *device,
22 unsigned int type,
23 void __user *value,
24 size_t sizebytes);
25
26int adreno_setproperty_compat(struct kgsl_device_private *dev_priv,
27 unsigned int type,
28 void __user *value,
29 unsigned int sizebytes);
30
31long adreno_compat_ioctl(struct kgsl_device_private *dev_priv,
32 unsigned int cmd, unsigned long arg);
33
34#else
35
36static inline int adreno_getproperty_compat(struct kgsl_device *device,
37 unsigned int type,
38 void __user *value, size_t sizebytes)
39{
40 return -EINVAL;
41}
42
43static inline int adreno_setproperty_compat(struct kgsl_device_private
44 *dev_priv, unsigned int type,
45 void __user *value, unsigned int sizebytes)
46{
47 return -EINVAL;
48}
49
50static inline long adreno_compat_ioctl(struct kgsl_device_private *dev_priv,
51 unsigned int cmd, unsigned long arg)
52{
53 return -EINVAL;
54}
55
56#endif /* CONFIG_COMPAT */
57#endif /* __ADRENO_COMPAT_H */