Commit 17b3e921 authored by Thierry Reding's avatar Thierry Reding Committed by Stefan Bader

swiotlb: Make linux/swiotlb.h standalone includible

BugLink: https://bugs.launchpad.net/bugs/1836668

[ Upstream commit 38674442 ]

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: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 27f5f051
#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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment