*参照元 [#r57782e0]
#backlinks

*説明 [#if1abdef]
-パス: [[linux-4.4.1/drivers/staging/android/ion/ion_heap.c]]

-FIXME: これは何?
--説明


**引数 [#i745aefd]
-struct ion_platform_heap *heap_data
--
--[[linux-4.4.1/ion_platform_heap]]


**返り値 [#b9707cad]
-struct ion_heap *
--
--[[linux-4.4.1/ion_heap]]


**参考 [#yc78f01b]


*実装 [#gb168dd4]
 struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data)
 {
         struct ion_heap *heap = NULL;
 
         switch (heap_data->type) {
-
--[[linux-4.4.1/ion_heap_type]]

         case ION_HEAP_TYPE_SYSTEM_CONTIG:
                 heap = ion_system_contig_heap_create(heap_data);
                 break;
         case ION_HEAP_TYPE_SYSTEM:
                 heap = ion_system_heap_create(heap_data);
                 break;
         case ION_HEAP_TYPE_CARVEOUT:
                 heap = ion_carveout_heap_create(heap_data);
                 break;
         case ION_HEAP_TYPE_CHUNK:
                 heap = ion_chunk_heap_create(heap_data);
                 break;
         case ION_HEAP_TYPE_DMA:
                 heap = ion_cma_heap_create(heap_data);
                 break;
         default:
                 pr_err("%s: Invalid heap type %d\n", __func__,
                        heap_data->type);
                 return ERR_PTR(-EINVAL);
         }
 
-
--[[linux-4.4.1/ion_system_contig_heap_create()]]
--[[linux-4.4.1/ion_system_heap_create()]]
--[[linux-4.4.1/ion_carveout_heap_create()]]
--[[linux-4.4.1/ion_chunk_heap_create()]]
--[[linux-4.4.1/ion_cma_heap_create()]]
--[[linux-4.4.1/pr_err()]]
--[[linux-4.4.1/ERR_PTR()]]

         if (IS_ERR_OR_NULL(heap)) {
                 pr_err("%s: error creating heap %s type %d base %lu size %zu\n",
                        __func__, heap_data->name, heap_data->type,
                        heap_data->base, heap_data->size);
                 return ERR_PTR(-EINVAL);
         }
 
-
--[[linux-4.4.1/IS_ERR_OR_NULL()]]

         heap->name = heap_data->name;
         heap->id = heap_data->id;
         return heap;
 }
 EXPORT_SYMBOL(ion_heap_create);
-
--[[linux-4.4.1/EXPORT_SYMBOL()]]


*コメント [#kfb7b8b3]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS