mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
ion: msm: Fix several errors in the MSM ION kernel header
ION clients that reside in the kernel may need information that is present in the UAPI header, such as flags to specify memory attributes, or IDs to allocate from different heaps, so include the UAPI header in the kernel space header. Also, ensure that drivers that use this header can still compile even when CONFIG_ION_MSM_HEAPS is not set. Change-Id: If030a58ce62b73b66b337b6dfc6a607bbc0ce193 Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
7a21e4007b
commit
02c55808f3
1 changed files with 16 additions and 3 deletions
|
|
@ -3,9 +3,22 @@
|
|||
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _MSM_ION_KERNEL_H
|
||||
#define _MSM_ION_KERNEL_H
|
||||
#ifndef _MSM_ION_OF_H
|
||||
#define _MSM_ION_OF_H
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <uapi/linux/msm_ion.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_ION_MSM_HEAPS)
|
||||
|
||||
struct device *msm_ion_heap_device_by_id(int heap_id);
|
||||
|
||||
#endif /* _MSM_ION_H */
|
||||
#else
|
||||
|
||||
static inline struct device *msm_ion_heap_device_by_id(int heap_id)
|
||||
{
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ION_MSM_HEAPS */
|
||||
#endif /* _MSM_ION_OF_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue