]> git.baikalelectronics.ru Git - kernel.git/commit
device.h: audit and cleanup users in main include dir
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 30 Jan 2012 16:46:54 +0000 (11:46 -0500)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 16 Mar 2012 14:38:24 +0000 (10:38 -0400)
commit8470412ce09e36d18c966e1b1f06f44e1fc3a05c
tree8f39f20515a924d392cf9a72db0918fda07a34c7
parent9ea552154105be4fb2ea9e0025f78f87bcaf61d2
device.h: audit and cleanup users in main include dir

The <linux/device.h> header includes a lot of stuff, and
it in turn gets a lot of use just for the basic "struct device"
which appears so often.

Clean up the users as follows:

1) For those headers only needing "struct device" as a pointer
in fcn args, replace the include with exactly that.

2) For headers not really using anything from device.h, simply
delete the include altogether.

3) For headers relying on getting device.h implicitly before
being included themselves, now explicitly include device.h

4) For files in which doing #1 or #2 uncovers an implicit
dependency on some other header, fix by explicitly adding
the required header(s).

Any C files that were implicitly relying on device.h to be
present have already been dealt with in advance.

Total removals from #1 and #2: 51.  Total additions coming
from #3: 9.  Total other implicit dependencies from #4: 7.

As of 3.3-rc1, there were 110, so a net removal of 42 gives
about a 38% reduction in device.h presence in include/*

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
53 files changed:
include/linux/amba/pl022.h
include/linux/atmdev.h
include/linux/attribute_container.h
include/linux/c2port.h
include/linux/cdrom.h
include/linux/cpu.h
include/linux/cpufreq.h
include/linux/crash_dump.h
include/linux/dma-buf.h
include/linux/edac.h
include/linux/fb.h
include/linux/firewire.h
include/linux/hwmon-sysfs.h
include/linux/hwmon.h
include/linux/hwspinlock.h
include/linux/ide.h
include/linux/ipmi.h
include/linux/ipmi_smi.h
include/linux/jz4740-adc.h
include/linux/maple.h
include/linux/mfd/abx500.h
include/linux/mfd/abx500/ab5500.h
include/linux/mfd/abx500/ab8500.h
include/linux/mfd/pm8xxx/pm8921.h
include/linux/mfd/stmpe.h
include/linux/mfd/tc3589x.h
include/linux/mlx4/driver.h
include/linux/mmc/card.h
include/linux/mmc/core.h
include/linux/mmc/host.h
include/linux/netdevice.h
include/linux/of_device.h
include/linux/opp.h
include/linux/phy.h
include/linux/pm_domain.h
include/linux/power_supply.h
include/linux/regmap.h
include/linux/regulator/consumer.h
include/linux/rfkill.h
include/linux/rio_drv.h
include/linux/serial_pnx8xxx.h
include/linux/spi/mmc_spi.h
include/linux/wimax/debug.h
include/media/media-device.h
include/media/v4l2-ctrls.h
include/media/v4l2-ioctl.h
include/net/mac80211.h
include/scsi/scsi_device.h
include/sound/core.h
include/sound/soc-dapm.h
include/trace/events/regmap.h
include/trace/events/rpm.h
include/trace/events/writeback.h