On Fri, Feb 2, 2018 at 2:56 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > so I would really prefer to speed up recompiles and just generally try > to avoid horrible header file inclusion by doing the same thing in > <linux/device.h>, adding just that > > struct dev_pin_info; > > declaration, and removing the <linux/pinctrl/devinfo.h> include. It turns out that some pinctl users seem to depend on this broken situation., with at least drivers/pinctrl/core.c drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c drivers/pinctrl/pinctrl-ocelot.c drivers/pinctrl/bcm/pinctrl-iproc-gpio.c expecting to magically get some of the pinctrl function declarations not through some pinctrl header file, but just from <linux/device.h>. Adding that include to <linux/pinctrl/pinctrl.h> would seem to make those happy and make 'allmodconfig' build for me. But I'm only testing x86-64. Can somebody test at least arm too? Stupid patch attached. I don't know how much this helps the insane dependency hell for <linux/pinctrl/devinfo.h>, but it's bound to help _some_. Comments? Linus
include/linux/device.h | 2 +- include/linux/pinctrl/pinctrl.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/device.h b/include/linux/device.h index f649fc0c2571..b093405ed525 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -20,7 +20,6 @@ #include <linux/compiler.h> #include <linux/types.h> #include <linux/mutex.h> -#include <linux/pinctrl/devinfo.h> #include <linux/pm.h> #include <linux/atomic.h> #include <linux/ratelimit.h> @@ -41,6 +40,7 @@ struct fwnode_handle; struct iommu_ops; struct iommu_group; struct iommu_fwspec; +struct dev_pin_info; struct bus_attribute { struct attribute attr; diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index 5e45385c5bdc..8f5dbb84547a 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h @@ -18,6 +18,7 @@ #include <linux/list.h> #include <linux/seq_file.h> #include <linux/pinctrl/pinctrl-state.h> +#include <linux/pinctrl/devinfo.h> struct device; struct pinctrl_dev;