[PATCH v2 08/15] spi: Clean up headers

From: Andy Shevchenko
Date: Mon Jul 10 2023 - 11:50:05 EST


There is a few things done:
- include only the headers we are direct user of
- when pointer is in use, provide a forward declaration
- add missing headers
- group generic headers and subsystem headers
- sort each group alphabetically

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
include/linux/spi/spi.h | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 2026eae97329..c9479badf38c 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -6,27 +6,41 @@
#ifndef __LINUX_SPI_H
#define __LINUX_SPI_H

-#include <linux/acpi.h>
#include <linux/bits.h>
#include <linux/completion.h>
+#include <linux/container_of.h>
#include <linux/device.h>
-#include <linux/gpio/consumer.h>
+#include <linux/export.h>
#include <linux/kthread.h>
+#include <linux/limits.h>
+#include <linux/list.h>
+#include <linux/minmax.h>
#include <linux/mod_devicetable.h>
+#include <linux/mutex.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
+#include <linux/smp.h>
+#include <linux/spinlock_types.h>
+#include <linux/string.h>
+#include <linux/types.h>
#include <linux/u64_stats_sync.h>

+#include <asm/byteorder.h>
+
#include <uapi/linux/spi/spi.h>

+struct acpi_device;
struct dma_chan;
-struct software_node;
+struct gpio_desc;
struct ptp_system_timestamp;
+struct software_node;
+
struct spi_controller;
-struct spi_transfer;
struct spi_controller_mem_ops;
struct spi_controller_mem_caps;
+struct spi_device_id;
struct spi_message;
+struct spi_transfer;

/*
* INTERFACES between SPI master-side drivers and SPI slave protocol handlers,
--
2.40.0.1.gaa8946217a0b