Skip to content

Commit ef175b2

Browse files
committed
of: Stop circularly including of_device.h and of_platform.h
The DT of_device.h and of_platform.h headers date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. The headers also include platform_device.h and of.h. The result was lots of drivers relied on these implicit includes. Now the entire tree has been fixed over the last couple of cycles to explicitly include the necessary headers instead of relying on of_device.h and/or of_platform.h implicit includes, so the implicit and circular includes can finally be removed. Signed-off-by: Rob Herring <[email protected]>
1 parent 527eb67 commit ef175b2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

include/linux/of_device.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
#ifndef _LINUX_OF_DEVICE_H
33
#define _LINUX_OF_DEVICE_H
44

5-
#include <linux/platform_device.h>
6-
#include <linux/of_platform.h> /* temporary until merge */
7-
8-
#include <linux/of.h>
5+
#include <linux/device/driver.h>
96

107
struct device;
118
struct of_device_id;

include/linux/of_platform.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
*/
88

99
#include <linux/mod_devicetable.h>
10-
#include <linux/of_device.h>
11-
#include <linux/platform_device.h>
1210

1311
struct device;
12+
struct device_node;
1413
struct of_device_id;
14+
struct platform_device;
1515

1616
/**
1717
* struct of_dev_auxdata - lookup table entry for device names & platform_data

0 commit comments

Comments
 (0)