<div>Hello,</div><div><br></div><div>I have been through many kernel header files and have found that kernel header </div><div>files at many places don&#39;t include other header files which they have</div><div>dependency upon.</div>
<div><br></div><div>For example:</div><div>&lt;linux/amba/bus.h&gt; uses struct device and struct resource and it doesn&#39;t</div><div>include &lt;linux/device.h&gt; and &lt;linux/resource.h&gt; header files.</div><div><br>
</div><div>Now, whenever i try to include bus.h, i have to include device.h and resource.h.</div><div><br></div><div>Is this correct approach?</div><div><br></div><div>Again, if i include device.h and resource.h, they must be included before bus.h.</div>
<div>Now this will disturb the alphabetical ordering of including header files</div><div>sometimes. (not in this example)</div><div><br></div><div>Any idea behind this philosophy.</div><div><br></div><div><br></div><div>regards,</div>
<div>viresh kumar</div><div>ST Microelectronics</div><div>India.</div>