Revise header inclusions to improve code organization and build hygiene:
1. Remove unnecessary headers:
- console.h (no console related functions)
- of.h (OF specific code handled by of_platform.h)
- pci.h (no PCI dependencies)
- slab.h (no memory allocation helpers used)
2. Add required headers:
- bits.h for bit manipulation macros
- err.h for error handling helpers
- ioport.h for I/O resource management
- property.h for device property interfaces
- spinlock.h for locking primitives
- types.h for explicit type definitions
- asm/byteorder.h for endianness handling
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
changes in v3: according to Andy Shevchenko's suggestion.
changes in v2: fix build error
---
drivers/bus/hisi_lpc.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c
index 53dd1573e323..4911afdac316 100644
--- a/drivers/bus/hisi_lpc.c
+++ b/drivers/bus/hisi_lpc.c
@@ -7,17 +7,22 @@
*/
#include <linux/acpi.h>
-#include <linux/console.h>
+#include <linux/bits.h>
#include <linux/delay.h>
+#include <linux/err.h>
#include <linux/io.h>
+#include <linux/ioport.h>
#include <linux/logic_pio.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of.h>
#include <linux/of_platform.h>
-#include <linux/pci.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/serial_8250.h>
-#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/types.h>
+
+#include <asm/byteorder.h>
#define DRV_NAME "hisi-lpc"
--
2.25.1