adreno_compat.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2013-2015, 2017, 2019 The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef __ADRENO_COMPAT_H
  6. #define __ADRENO_COMPAT_H
  7. #ifdef CONFIG_COMPAT
  8. struct kgsl_device;
  9. struct kgsl_device_private;
  10. int adreno_getproperty_compat(struct kgsl_device *device,
  11. struct kgsl_device_getproperty *param);
  12. int adreno_setproperty_compat(struct kgsl_device_private *dev_priv,
  13. unsigned int type,
  14. void __user *value,
  15. unsigned int sizebytes);
  16. long adreno_compat_ioctl(struct kgsl_device_private *dev_priv,
  17. unsigned int cmd, unsigned long arg);
  18. #else
  19. static inline int adreno_getproperty_compat(struct kgsl_device *device,
  20. struct kgsl_device_getproperty *param)
  21. {
  22. return -EINVAL;
  23. }
  24. static inline int adreno_setproperty_compat(struct kgsl_device_private
  25. *dev_priv, unsigned int type,
  26. void __user *value, unsigned int sizebytes)
  27. {
  28. return -EINVAL;
  29. }
  30. static inline long adreno_compat_ioctl(struct kgsl_device_private *dev_priv,
  31. unsigned int cmd, unsigned long arg)
  32. {
  33. return -EINVAL;
  34. }
  35. #endif /* CONFIG_COMPAT */
  36. #endif /* __ADRENO_COMPAT_H */