Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: cs42l43: Tidy up header includes

Use more forward declarations, move header guards to cover other
includes, and rely less on including headers through other headers.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240129152557.3221212-2-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Charles Keepax and committed by
Lee Jones
8b9a1f5e efe4c790

+33 -16
+5 -1
drivers/mfd/cs42l43-i2c.c
··· 6 6 * Cirrus Logic International Semiconductor Ltd. 7 7 */ 8 8 9 + #include <linux/array_size.h> 9 10 #include <linux/err.h> 10 - #include <linux/errno.h> 11 11 #include <linux/i2c.h> 12 + #include <linux/mfd/cs42l43.h> 12 13 #include <linux/mfd/cs42l43-regs.h> 14 + #include <linux/mod_devicetable.h> 13 15 #include <linux/module.h> 16 + #include <linux/pm.h> 17 + #include <linux/regmap.h> 14 18 15 19 #include "cs42l43.h" 16 20
+5 -1
drivers/mfd/cs42l43-sdw.c
··· 6 6 * Cirrus Logic International Semiconductor Ltd. 7 7 */ 8 8 9 + #include <linux/array_size.h> 9 10 #include <linux/device.h> 10 11 #include <linux/err.h> 11 - #include <linux/errno.h> 12 + #include <linux/mfd/cs42l43.h> 12 13 #include <linux/mfd/cs42l43-regs.h> 14 + #include <linux/mod_devicetable.h> 13 15 #include <linux/module.h> 16 + #include <linux/pm.h> 17 + #include <linux/regmap.h> 14 18 #include <linux/soundwire/sdw.h> 15 19 #include <linux/soundwire/sdw_registers.h> 16 20 #include <linux/soundwire/sdw_type.h>
+7 -1
drivers/mfd/cs42l43.c
··· 6 6 * Cirrus Logic International Semiconductor Ltd. 7 7 */ 8 8 9 + #include <linux/array_size.h> 9 10 #include <linux/bitops.h> 10 11 #include <linux/build_bug.h> 11 12 #include <linux/delay.h> 13 + #include <linux/device.h> 12 14 #include <linux/err.h> 13 - #include <linux/errno.h> 14 15 #include <linux/firmware.h> 16 + #include <linux/gpio/consumer.h> 15 17 #include <linux/jiffies.h> 16 18 #include <linux/mfd/core.h> 19 + #include <linux/mfd/cs42l43.h> 17 20 #include <linux/mfd/cs42l43-regs.h> 18 21 #include <linux/module.h> 22 + #include <linux/pm.h> 19 23 #include <linux/pm_runtime.h> 24 + #include <linux/regmap.h> 20 25 #include <linux/soundwire/sdw.h> 26 + #include <linux/types.h> 21 27 22 28 #include "cs42l43.h" 23 29
+6 -4
drivers/mfd/cs42l43.h
··· 6 6 * Cirrus Logic International Semiconductor Ltd. 7 7 */ 8 8 9 - #include <linux/mfd/cs42l43.h> 10 - #include <linux/pm.h> 11 - #include <linux/regmap.h> 12 - 13 9 #ifndef CS42L43_CORE_INT_H 14 10 #define CS42L43_CORE_INT_H 15 11 16 12 #define CS42L43_N_DEFAULTS 176 13 + 14 + struct dev_pm_ops; 15 + struct device; 16 + struct reg_default; 17 + 18 + struct cs42l43; 17 19 18 20 extern const struct dev_pm_ops cs42l43_pm_ops; 19 21 extern const struct reg_default cs42l43_reg_default[CS42L43_N_DEFAULTS];
+10 -9
include/linux/mfd/cs42l43.h
··· 6 6 * Cirrus Logic International Semiconductor Ltd. 7 7 */ 8 8 9 - #include <linux/completion.h> 10 - #include <linux/device.h> 11 - #include <linux/gpio/consumer.h> 12 - #include <linux/mutex.h> 13 - #include <linux/regmap.h> 14 - #include <linux/regulator/consumer.h> 15 - #include <linux/soundwire/sdw.h> 16 - #include <linux/workqueue.h> 17 - 18 9 #ifndef CS42L43_CORE_EXT_H 19 10 #define CS42L43_CORE_EXT_H 20 11 12 + #include <linux/completion.h> 13 + #include <linux/mutex.h> 14 + #include <linux/regmap.h> 15 + #include <linux/regulator/consumer.h> 16 + #include <linux/workqueue.h> 17 + 21 18 #define CS42L43_N_SUPPLIES 3 19 + 20 + struct device; 21 + struct gpio_desc; 22 + struct sdw_slave; 22 23 23 24 enum cs42l43_irq_numbers { 24 25 CS42L43_PLL_LOST_LOCK,