Skip to content

Commit

Permalink
device.h: cleanup users outside of linux/include (C files)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Paul Gortmaker committed Mar 11, 2012
1 parent dcd6c92 commit 51990e8
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/base/power/clock_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/pm.h>
#include <linux/pm_clock.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/base/power/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/pm_clock.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/base/power/opp.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/cpufreq.h>
#include <linux/device.h>
#include <linux/list.h>
#include <linux/rculist.h>
#include <linux/rcupdate.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/base/regmap/regcache-lzo.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include <linux/slab.h>
#include <linux/device.h>
#include <linux/lzo.h>

#include "internal.h"
Expand Down
1 change: 1 addition & 0 deletions drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include <linux/slab.h>
#include <linux/device.h>
#include <linux/debugfs.h>
#include <linux/rbtree.h>
#include <linux/seq_file.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <linux/slab.h>
#include <linux/export.h>
#include <linux/device.h>
#include <trace/events/regmap.h>
#include <linux/bsearch.h>
#include <linux/sort.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/base/regmap/regmap-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/mutex.h>
#include <linux/debugfs.h>
#include <linux/uaccess.h>
#include <linux/device.h>

#include "internal.h"

Expand Down
1 change: 1 addition & 0 deletions drivers/base/regmap/regmap-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include <linux/export.h>
#include <linux/device.h>
#include <linux/regmap.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* published by the Free Software Foundation.
*/

#include <linux/device.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/mutex.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/edac/edac_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/edac.h>
#include <linux/atomic.h>
#include <linux/device.h>
#include <asm/edac.h>

int edac_op_state = EDAC_OPSTATE_INVAL;
Expand Down
1 change: 1 addition & 0 deletions drivers/edac/mce_amd_inj.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include <linux/kobject.h>
#include <linux/device.h>
#include <linux/edac.h>
#include <linux/module.h>
#include <asm/mce.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/mfd/wm8994-regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/mfd/wm8994/core.h>
#include <linux/mfd/wm8994/registers.h>
#include <linux/regmap.h>
#include <linux/device.h>

#include "wm8994.h"

Expand Down
1 change: 1 addition & 0 deletions drivers/power/apm_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

#include <linux/module.h>
#include <linux/device.h>
#include <linux/power_supply.h>
#include <linux/apm-emulation.h>

Expand Down
4 changes: 4 additions & 0 deletions drivers/power/power_supply.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
* You may use this code as per GPL version 2
*/

struct device;
struct device_type;
struct power_supply;

#ifdef CONFIG_SYSFS

extern void power_supply_init_attrs(struct device_type *dev_type);
Expand Down
1 change: 1 addition & 0 deletions drivers/power/power_supply_leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/power_supply.h>
#include <linux/slab.h>

Expand Down
1 change: 1 addition & 0 deletions drivers/power/power_supply_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

#include <linux/ctype.h>
#include <linux/device.h>
#include <linux/power_supply.h>
#include <linux/slab.h>
#include <linux/stat.h>
Expand Down
1 change: 1 addition & 0 deletions net/rfkill/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/rfkill.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/device.h>
#include <linux/miscdevice.h>
#include <linux/wait.h>
#include <linux/poll.h>
Expand Down
1 change: 1 addition & 0 deletions sound/core/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/file.h>
#include <linux/slab.h>
#include <linux/time.h>
Expand Down
1 change: 1 addition & 0 deletions sound/core/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/module.h>
#include <linux/time.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <sound/core.h>
#include <sound/minors.h>
#include <sound/pcm.h>
Expand Down
1 change: 1 addition & 0 deletions sound/core/seq/seq.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
#include <sound/core.h>
#include <sound/initval.h>

Expand Down
1 change: 1 addition & 0 deletions sound/core/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/string.h>
#include <sound/core.h>
Expand Down

0 comments on commit 51990e8

Please sign in to comment.