2

当我尝试编译一个时,我得到了这个错误:

In file included from arch/arm/mach-msm/board-htcleo.c:81:0:
include/linux/ion.h:192:27: error: field 'permission_type' has incomplete type

我怎么解决这个问题?我的代码如下:

struct ion_cp_heap_pdata {
    enum ion_permission_type permission_type;
    unsigned int align;
    ion_phys_addr_t secure_base; /* Base addr used when heap is shared */
    size_t secure_size; /* Size used for securing heap when heap is shared*/
    int reusable;
    int mem_is_fmem;
    enum ion_fixed_position fixed_position;
    int iommu_map_all;
    int iommu_2x_map_domain;
    ion_virt_addr_t *virt_addr;
    int (*request_region)(void *);
    int (*release_region)(void *);
    void *(*setup_region)(void);
};
4

3 回答 3

0

您需要enum ion_permission_type在声明之前定义permission_type

enum ion_permission_type
{
    /* Enumeration values here */
};
于 2013-08-07T14:45:27.883 回答
0

它无法找到 type 的定义enum ion_permission_type,因此如下定义。

enum ion_permission_type { /*define your named integer constants here...*/ };
于 2013-08-07T14:52:21.343 回答
0

它应该在 kernel/arch/arm/mach-msm/include/mach/ion.h 中定义为值

enum ion_permission_type {
    IPT_TYPE_MM_CARVEOUT = 0,
    IPT_TYPE_MFC_SHAREDMEM = 1,
    IPT_TYPE_MDP_WRITEBACK = 2,
};
于 2013-11-02T07:53:24.980 回答