Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e54ad58c authored by Suren Baghdasaryan's avatar Suren Baghdasaryan
Browse files

ANDROID: staging: android: ion: Fix build when CONFIG_ION_SYSTEM_HEAP=n



Fixes: 30b38df5 ("ANDROID: staging: android: ion: Expose total heap and pool sizes via sysfs")
When CONFIG_ION_SYSTEM_HEAP not set ion_page_pool_nr_pages symbol will not
be compiled. Fix this by providing an implementation for this configuration.

Bug: 138148041
Test: build with CONFIG_ION_SYSTEM_HEAP=n
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
Change-Id: I37ccdd4ecc97e9c7e10728834a56b422ac18c3c7
parent 8b312f95
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -343,7 +343,12 @@ struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned int order,
void ion_page_pool_destroy(struct ion_page_pool *pool);
struct page *ion_page_pool_alloc(struct ion_page_pool *pool);
void ion_page_pool_free(struct ion_page_pool *pool, struct page *page);

#ifdef CONFIG_ION_SYSTEM_HEAP
long ion_page_pool_nr_pages(void);
#else
static inline long ion_page_pool_nr_pages(void) { return 0; }
#endif

/** ion_page_pool_shrink - shrinks the size of the memory cached in the pool
 * @pool:		the pool