ANDROID: dma-buf: heaps: Minor cleanup of dmabuf_page_pool includes

Remove the unused freezer, slab, device, and kref includes.
Move shrinker include to implementation file.
Fix dmabuf_page_pool documentation.

Fixes: 060e38dce1 ("ANDROID: dma-buf: heaps: replace mutex lock with spinlock")
Fixes: cc46bc6803 ("ANDROID: dma-buf: heaps: Add a shrinker controlled page pool")
Change-Id: Ie9ee58a02740c7833e60aed8a491b88d14c366e3
Signed-off-by: T.J. Mercier <tjmercier@google.com>
This commit is contained in:
T.J. Mercier
2022-11-14 19:45:09 +00:00
parent 00ec310ec8
commit e6c4deb4db
2 changed files with 6 additions and 8 deletions

View File

@@ -8,12 +8,13 @@
* Copyright (C) 2011 Google, Inc.
*/
#include <linux/freezer.h>
#include "page_pool.h"
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/shrinker.h>
#include <linux/spinlock.h>
#include <linux/swap.h>
#include <linux/sched/signal.h>
#include "page_pool.h"
static LIST_HEAD(pool_list);
static DEFINE_MUTEX(pool_list_lock);

View File

@@ -10,11 +10,8 @@
#ifndef _DMABUF_PAGE_POOL_H
#define _DMABUF_PAGE_POOL_H
#include <linux/device.h>
#include <linux/kref.h>
#include <linux/mm_types.h>
#include <linux/spinlock.h>
#include <linux/shrinker.h>
#include <linux/spinlock_types.h>
#include <linux/types.h>
/* page types we track in the pool */
@@ -29,7 +26,7 @@ enum {
* struct dmabuf_page_pool - pagepool struct
* @count[]: array of number of pages of that type in the pool
* @items[]: array of list of pages of the specific type
* @mutex: lock protecting this struct and especially the count
* @lock: lock protecting this struct and especially the count
* item list
* @gfp_mask: gfp_mask to use from alloc
* @order: order of pages in the pool