Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d24c888 authored by Grant Likely's avatar Grant Likely
Browse files

of: Rework linux/of.h and asm/prom.h include ordering



In preparation to prune things out of the Sparc, PowerPC and Microblaze
asm/prom.h files, change the #include statements to ensure that
even if asm/prom.h is included first, linux/of.h gets to determine the
order in which files are processed.

This patch adds a #include <linux/of.h> to each of the prom.h files
*above* the multi-include protection macros to ensure that linux/of.h
can define things before prom.h gets processed.

At the end of the merge the cross dependencies between the files should
be gone and a sane #include scheme can be restored.

Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Acked-by: default avatarMichal Simek <monstr@monstr.eu>
Acked-by: default avatarStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
parent 4bdf0bb7
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@
 * 2 of the License, or (at your option) any later version.
 */

#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */

#ifndef _ASM_MICROBLAZE_PROM_H
#define _ASM_MICROBLAZE_PROM_H
#ifdef __KERNEL__
@@ -305,12 +307,6 @@ extern int of_irq_to_resource(struct device_node *dev, int index,
 */
extern void __iomem *of_iomap(struct device_node *device, int index);

/*
 * NB: This is here while we transition from using asm/prom.h
 * to linux/of.h
 */
#include <linux/of.h>

#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ASM_MICROBLAZE_PROM_H */
+1 −6
Original line number Diff line number Diff line
#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
#ifndef _POWERPC_PROM_H
#define _POWERPC_PROM_H
#ifdef __KERNEL__
@@ -349,11 +350,5 @@ extern int of_irq_to_resource(struct device_node *dev, int index,
 */
extern void __iomem *of_iomap(struct device_node *device, int index);

/*
 * NB:  This is here while we transition from using asm/prom.h
 * to linux/of.h
 */
#include <linux/of.h>

#endif /* __KERNEL__ */
#endif /* _POWERPC_PROM_H */
+1 −6
Original line number Diff line number Diff line
#include <linux/of.h>	/* linux/of.h gets to determine #include ordering */
#ifndef _SPARC_PROM_H
#define _SPARC_PROM_H
#ifdef __KERNEL__
@@ -108,12 +109,6 @@ static inline void irq_dispose_mapping(unsigned int virq)
{
}

/*
 * NB:  This is here while we transition from using asm/prom.h
 * to linux/of.h
 */
#include <linux/of.h>

extern struct device_node *of_console_device;
extern char *of_console_path;
extern char *of_console_options;