Skip to content

Commit 4405979

Browse files
Christoph Hellwiggregkh
authored andcommitted
kfifo: don't include dma-mapping.h in kfifo.h
Nothing in kfifo.h directly needs dma-mapping.h, only two macros use DMA_MAPPING_ERROR when actually instantiated. Drop the dma-mapping.h include to reduce include bloat. Add an explicity <linux/io.h> include to drivers/mailbox/omap-mailbox.c as that file uses __raw_readl and __raw_writel through a complicated include chain involving <linux/dma-mapping.h> Fixes: d52b761 ("kfifo: add kfifo_dma_out_prepare_mapped()") Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ec8c17e commit 4405979

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

drivers/mailbox/omap-mailbox.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/slab.h>
1616
#include <linux/kfifo.h>
1717
#include <linux/err.h>
18+
#include <linux/io.h>
1819
#include <linux/module.h>
1920
#include <linux/of.h>
2021
#include <linux/platform_device.h>

include/linux/kfifo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
*/
3838

3939
#include <linux/array_size.h>
40-
#include <linux/dma-mapping.h>
4140
#include <linux/spinlock.h>
4241
#include <linux/stddef.h>
4342
#include <linux/types.h>

samples/kfifo/dma-example.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/kfifo.h>
1010
#include <linux/module.h>
1111
#include <linux/scatterlist.h>
12+
#include <linux/dma-mapping.h>
1213

1314
/*
1415
* This module shows how to handle fifo dma operations.

0 commit comments

Comments
 (0)