[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <33d8773f299fa6e448409625b4fb717f66f639e9.1745377493.git.xiaopei01@kylinos.cn>
Date: Wed, 23 Apr 2025 11:17:04 +0800
From: Pei Xiao <xiaopei01@...inos.cn>
To: xiaopei01@...inos.cn
Cc: andriy.shevchenko@...ux.intel.com,
john.g.garry@...cle.com,
linux-kernel@...r.kernel.org,
robh@...nel.org,
xiaopeitux@...mail.com,
xuwei5@...ilicon.com
Subject: [PATCH v3 1/2] bus: hisi_lpc: clean up included headers
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@...inos.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
Powered by blists - more mailing lists