Skip to content

Commit 51990e8

Browse files
author
Paul Gortmaker
committed
device.h: cleanup users outside of linux/include (C files)
For files that are actively using linux/device.h, make sure that they call it out. This will allow us to clean up some of the implicit uses of linux/device.h within include/* without introducing build regressions. Yes, this was created by "cheating" -- i.e. the headers were cleaned up, and then the fallout was found and fixed, and then the two commits were reordered. This ensures we don't introduce build regressions into the git history. Signed-off-by: Paul Gortmaker <[email protected]>
1 parent dcd6c92 commit 51990e8

21 files changed

+24
-0
lines changed

drivers/base/power/clock_ops.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <linux/init.h>
1010
#include <linux/kernel.h>
11+
#include <linux/device.h>
1112
#include <linux/io.h>
1213
#include <linux/pm.h>
1314
#include <linux/pm_clock.h>

drivers/base/power/common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <linux/init.h>
1010
#include <linux/kernel.h>
11+
#include <linux/device.h>
1112
#include <linux/export.h>
1213
#include <linux/slab.h>
1314
#include <linux/pm_clock.h>

drivers/base/power/opp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/init.h>
1818
#include <linux/slab.h>
1919
#include <linux/cpufreq.h>
20+
#include <linux/device.h>
2021
#include <linux/list.h>
2122
#include <linux/rculist.h>
2223
#include <linux/rcupdate.h>

drivers/base/regmap/regcache-lzo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <linux/slab.h>
14+
#include <linux/device.h>
1415
#include <linux/lzo.h>
1516

1617
#include "internal.h"

drivers/base/regmap/regcache-rbtree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <linux/slab.h>
14+
#include <linux/device.h>
1415
#include <linux/debugfs.h>
1516
#include <linux/rbtree.h>
1617
#include <linux/seq_file.h>

drivers/base/regmap/regcache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include <linux/slab.h>
1414
#include <linux/export.h>
15+
#include <linux/device.h>
1516
#include <trace/events/regmap.h>
1617
#include <linux/bsearch.h>
1718
#include <linux/sort.h>

drivers/base/regmap/regmap-debugfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/mutex.h>
1616
#include <linux/debugfs.h>
1717
#include <linux/uaccess.h>
18+
#include <linux/device.h>
1819

1920
#include "internal.h"
2021

drivers/base/regmap/regmap-irq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <linux/export.h>
14+
#include <linux/device.h>
1415
#include <linux/regmap.h>
1516
#include <linux/irq.h>
1617
#include <linux/interrupt.h>

drivers/base/regmap/regmap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* published by the Free Software Foundation.
1111
*/
1212

13+
#include <linux/device.h>
1314
#include <linux/slab.h>
1415
#include <linux/module.h>
1516
#include <linux/mutex.h>

drivers/edac/edac_stub.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/module.h>
1616
#include <linux/edac.h>
1717
#include <linux/atomic.h>
18+
#include <linux/device.h>
1819
#include <asm/edac.h>
1920

2021
int edac_op_state = EDAC_OPSTATE_INVAL;

drivers/edac/mce_amd_inj.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <linux/kobject.h>
14+
#include <linux/device.h>
1415
#include <linux/edac.h>
1516
#include <linux/module.h>
1617
#include <asm/mce.h>

drivers/mfd/wm8994-regmap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/mfd/wm8994/core.h>
1616
#include <linux/mfd/wm8994/registers.h>
1717
#include <linux/regmap.h>
18+
#include <linux/device.h>
1819

1920
#include "wm8994.h"
2021

drivers/power/apm_power.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
#include <linux/module.h>
13+
#include <linux/device.h>
1314
#include <linux/power_supply.h>
1415
#include <linux/apm-emulation.h>
1516

drivers/power/power_supply.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
* You may use this code as per GPL version 2
1111
*/
1212

13+
struct device;
14+
struct device_type;
15+
struct power_supply;
16+
1317
#ifdef CONFIG_SYSFS
1418

1519
extern void power_supply_init_attrs(struct device_type *dev_type);

drivers/power/power_supply_leds.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <linux/kernel.h>
14+
#include <linux/device.h>
1415
#include <linux/power_supply.h>
1516
#include <linux/slab.h>
1617

drivers/power/power_supply_sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313

1414
#include <linux/ctype.h>
15+
#include <linux/device.h>
1516
#include <linux/power_supply.h>
1617
#include <linux/slab.h>
1718
#include <linux/stat.h>

net/rfkill/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/rfkill.h>
3030
#include <linux/sched.h>
3131
#include <linux/spinlock.h>
32+
#include <linux/device.h>
3233
#include <linux/miscdevice.h>
3334
#include <linux/wait.h>
3435
#include <linux/poll.h>

sound/core/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/init.h>
2323
#include <linux/sched.h>
2424
#include <linux/module.h>
25+
#include <linux/device.h>
2526
#include <linux/file.h>
2627
#include <linux/slab.h>
2728
#include <linux/time.h>

sound/core/pcm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <linux/module.h>
2525
#include <linux/time.h>
2626
#include <linux/mutex.h>
27+
#include <linux/device.h>
2728
#include <sound/core.h>
2829
#include <sound/minors.h>
2930
#include <sound/pcm.h>

sound/core/seq/seq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include <linux/init.h>
2323
#include <linux/module.h>
24+
#include <linux/device.h>
2425
#include <sound/core.h>
2526
#include <sound/initval.h>
2627

sound/core/timer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <linux/slab.h>
2525
#include <linux/time.h>
2626
#include <linux/mutex.h>
27+
#include <linux/device.h>
2728
#include <linux/module.h>
2829
#include <linux/string.h>
2930
#include <sound/core.h>

0 commit comments

Comments
 (0)