swiotlb: Make linux/swiotlb.h standalone includible

This header file uses the enum dma_data_direction and struct page types
without explicitly including the corresponding header files. This makes
it rely on the includer to have included the proper headers before.

To fix this, include linux/dma-direction.h and forward-declare struct
page. The swiotlb_free() function is also annotated __init, therefore
requires linux/init.h to be included as well.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
Thierry Reding 2015-07-01 14:17:58 +02:00 committed by Konrad Rzeszutek Wilk
parent 973abd30a1
commit 386744425e
1 changed files with 3 additions and 0 deletions

View File

@ -1,10 +1,13 @@
#ifndef __LINUX_SWIOTLB_H
#define __LINUX_SWIOTLB_H
#include <linux/dma-direction.h>
#include <linux/init.h>
#include <linux/types.h>
struct device;
struct dma_attrs;
struct page;
struct scatterlist;
extern int swiotlb_force;