aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 16:56:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 16:56:39 -0400
commitd3ec4844d449cf7af9e749f73ba2052fb7b72fc2 (patch)
treec515913e85f7e50878c83da2a88bc5a7269d087c /drivers
parent0003230e8200699860f0b10af524dc47bf8aecad (diff)
parentdf2e301fee3c2c2a87592151397ad7699bb14c37 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/ac.c2
-rw-r--r--drivers/acpi/battery.c2
-rw-r--r--drivers/acpi/sbs.c2
-rw-r--r--drivers/bcma/driver_chipcommon.c2
-rw-r--r--drivers/bcma/driver_chipcommon_pmu.c2
-rw-r--r--drivers/bcma/driver_pci.c2
-rw-r--r--drivers/char/bsr.c2
-rw-r--r--drivers/char/hw_random/core.c2
-rw-r--r--drivers/char/xilinx_hwicap/xilinx_hwicap.c2
-rw-r--r--drivers/dma/mv_xor.c5
-rw-r--r--drivers/edac/cell_edac.c2
-rw-r--r--drivers/edac/mpc85xx_edac.c12
-rw-r--r--drivers/gpio/gpio-ab8500.c1
-rw-r--r--drivers/gpio/gpio-bt8xx.c2
-rw-r--r--drivers/gpio/gpio-ep93xx.c2
-rw-r--r--drivers/gpio/gpio-u300.c8
-rw-r--r--drivers/gpu/drm/nouveau/nv50_graph.c1
-rw-r--r--drivers/gpu/drm/sis/sis_drv.h4
-rw-r--r--drivers/hwmon/gl520sm.c2
-rw-r--r--drivers/i2c/Kconfig2
-rw-r--r--drivers/i2c/busses/i2c-highlander.c2
-rw-r--r--drivers/i2c/busses/i2c-omap.c4
-rw-r--r--drivers/ide/palm_bk3710.c2
-rw-r--r--drivers/ide/tx4939ide.c4
-rw-r--r--drivers/input/serio/libps2.c2
-rw-r--r--drivers/input/serio/sa1111ps2.c6
-rw-r--r--drivers/isdn/i4l/isdn_bsdcomp.c2
-rw-r--r--drivers/media/rc/ite-cir.c1
-rw-r--r--drivers/media/video/davinci/vpif.c2
-rw-r--r--drivers/media/video/m5mols/m5mols_capture.c1
-rw-r--r--drivers/media/video/omap/omap_vout.c2
-rw-r--r--drivers/media/video/omap24xxcam.c5
-rw-r--r--drivers/media/video/videobuf2-memops.c1
-rw-r--r--drivers/message/i2o/iop.c8
-rw-r--r--drivers/mfd/tc6387xb.c2
-rw-r--r--drivers/misc/atmel-ssc.c2
-rw-r--r--drivers/misc/atmel_pwm.c2
-rw-r--r--drivers/mmc/host/dw_mmc.c2
-rw-r--r--drivers/mmc/host/vub300.c4
-rw-r--r--drivers/mtd/devices/sst25l.c4
-rw-r--r--drivers/mtd/maps/bfin-async-flash.c2
-rw-r--r--drivers/mtd/maps/ixp2000.c11
-rw-r--r--drivers/mtd/maps/pxa2xx-flash.c2
-rw-r--r--drivers/mtd/nand/atmel_nand.c4
-rw-r--r--drivers/mtd/nand/bcm_umi_nand.c2
-rw-r--r--drivers/mtd/nand/mpc5121_nfc.c2
-rw-r--r--drivers/net/b44.c2
-rw-r--r--drivers/net/bcm63xx_enet.c8
-rw-r--r--drivers/net/bsd_comp.c2
-rw-r--r--drivers/net/can/softing/softing_main.c2
-rw-r--r--drivers/net/davinci_emac.c6
-rw-r--r--drivers/net/eexpress.c2
-rw-r--r--drivers/net/ethoc.c2
-rw-r--r--drivers/net/fec_mpc52xx.c7
-rw-r--r--drivers/net/fs_enet/mii-bitbang.c4
-rw-r--r--drivers/net/fs_enet/mii-fec.c2
-rw-r--r--drivers/net/gianfar_ptp.c2
-rw-r--r--drivers/net/ibm_newemac/core.c2
-rw-r--r--drivers/net/irda/toim3232-sir.c2
-rw-r--r--drivers/net/macb.c2
-rw-r--r--drivers/net/mv643xx_eth.c2
-rw-r--r--drivers/net/natsemi.c4
-rw-r--r--drivers/net/pxa168_eth.c2
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/s2io.h4
-rw-r--r--drivers/net/sb1250-mac.c2
-rw-r--r--drivers/net/sungem.c3
-rw-r--r--drivers/net/wan/lmc/lmc_var.h2
-rw-r--r--drivers/net/wireless/ath/ath5k/ahb.c1
-rw-r--r--drivers/net/wireless/b43/debugfs.c2
-rw-r--r--drivers/net/wireless/b43/dma.c2
-rw-r--r--drivers/net/wireless/b43/leds.c2
-rw-r--r--drivers/net/wireless/b43/lo.c2
-rw-r--r--drivers/net/wireless/b43/main.c2
-rw-r--r--drivers/net/wireless/b43/main.h2
-rw-r--r--drivers/net/wireless/b43/pcmcia.c2
-rw-r--r--drivers/net/wireless/b43/phy_a.c2
-rw-r--r--drivers/net/wireless/b43/phy_common.c2
-rw-r--r--drivers/net/wireless/b43/phy_g.c2
-rw-r--r--drivers/net/wireless/b43/phy_lp.c2
-rw-r--r--drivers/net/wireless/b43/phy_n.c2
-rw-r--r--drivers/net/wireless/b43/pio.c2
-rw-r--r--drivers/net/wireless/b43/radio_2055.c2
-rw-r--r--drivers/net/wireless/b43/rfkill.c2
-rw-r--r--drivers/net/wireless/b43/sdio.c2
-rw-r--r--drivers/net/wireless/b43/sysfs.c2
-rw-r--r--drivers/net/wireless/b43/tables.c2
-rw-r--r--drivers/net/wireless/b43/tables_lpphy.c2
-rw-r--r--drivers/net/wireless/b43/tables_nphy.c2
-rw-r--r--drivers/net/wireless/b43/wa.c2
-rw-r--r--drivers/net/wireless/b43/xmit.c2
-rw-r--r--drivers/net/wireless/b43legacy/debugfs.c2
-rw-r--r--drivers/net/wireless/b43legacy/dma.c2
-rw-r--r--drivers/net/wireless/b43legacy/ilt.c2
-rw-r--r--drivers/net/wireless/b43legacy/leds.c2
-rw-r--r--drivers/net/wireless/b43legacy/main.c2
-rw-r--r--drivers/net/wireless/b43legacy/main.h2
-rw-r--r--drivers/net/wireless/b43legacy/phy.c2
-rw-r--r--drivers/net/wireless/b43legacy/phy.h2
-rw-r--r--drivers/net/wireless/b43legacy/pio.c2
-rw-r--r--drivers/net/wireless/b43legacy/radio.c2
-rw-r--r--drivers/net/wireless/b43legacy/radio.h2
-rw-r--r--drivers/net/wireless/b43legacy/rfkill.c2
-rw-r--r--drivers/net/wireless/b43legacy/sysfs.c2
-rw-r--r--drivers/net/wireless/b43legacy/xmit.c2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-commands.h4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h4
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192ce/reg.h4
-rw-r--r--drivers/parport/parport_ax88796.c2
-rw-r--r--drivers/pci/hotplug/shpchp_sysfs.c21
-rw-r--r--drivers/pci/pcie/aspm.c2
-rw-r--r--drivers/pcmcia/at91_cf.c7
-rw-r--r--drivers/pcmcia/electra_cf.c4
-rw-r--r--drivers/pcmcia/rsrc_iodyn.c6
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c6
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c10
-rw-r--r--drivers/pnp/pnpbios/rsparser.c12
-rw-r--r--drivers/power/ds2782_battery.c4
-rw-r--r--drivers/rtc/rtc-at32ap700x.c2
-rw-r--r--drivers/rtc/rtc-cmos.c6
-rw-r--r--drivers/rtc/rtc-ds1286.c2
-rw-r--r--drivers/rtc/rtc-ds1511.c2
-rw-r--r--drivers/rtc/rtc-ds1742.c2
-rw-r--r--drivers/rtc/rtc-m48t35.c2
-rw-r--r--drivers/rtc/rtc-m48t59.c2
-rw-r--r--drivers/rtc/rtc-mrst.c5
-rw-r--r--drivers/rtc/rtc-puv3.c5
-rw-r--r--drivers/rtc/rtc-s3c.c5
-rw-r--r--drivers/scsi/device_handler/scsi_dh_rdac.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_hw.h8
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c4
-rw-r--r--drivers/ssb/b43_pci_bridge.c2
-rw-r--r--drivers/ssb/driver_chipcommon.c2
-rw-r--r--drivers/ssb/driver_chipcommon_pmu.c2
-rw-r--r--drivers/ssb/driver_extif.c2
-rw-r--r--drivers/ssb/driver_gige.c2
-rw-r--r--drivers/ssb/driver_mipscore.c2
-rw-r--r--drivers/ssb/driver_pcicore.c2
-rw-r--r--drivers/ssb/embedded.c2
-rw-r--r--drivers/ssb/main.c2
-rw-r--r--drivers/ssb/pci.c2
-rw-r--r--drivers/ssb/pcihost_wrapper.c2
-rw-r--r--drivers/ssb/pcmcia.c2
-rw-r--r--drivers/ssb/scan.c2
-rw-r--r--drivers/ssb/sdio.c2
-rw-r--r--drivers/ssb/sprom.c2
-rw-r--r--drivers/staging/ath6kl/os/linux/include/ar6000_drv.h1
-rw-r--r--drivers/staging/bcm/headers.h7
-rw-r--r--drivers/staging/brcm80211/brcmfmac/dhd_sdio.c1
-rw-r--r--drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h1
-rw-r--r--drivers/staging/brcm80211/brcmfmac/wl_iw.c9
-rw-r--r--drivers/staging/hv/hv_mouse.c1
-rw-r--r--drivers/staging/hv/tools/hv_kvp_daemon.c1
-rw-r--r--drivers/staging/nvec/nvec.c1
-rw-r--r--drivers/staging/rtl8712/drv_types.h1
-rw-r--r--drivers/staging/rtl8712/osdep_service.h1
-rw-r--r--drivers/staging/sep/sep_driver.c1
-rw-r--r--drivers/staging/usbip/userspace/src/utils.h1
-rw-r--r--drivers/target/tcm_fc/tfc_cmd.c1
-rw-r--r--drivers/target/tcm_fc/tfc_conf.c1
-rw-r--r--drivers/target/tcm_fc/tfc_io.c1
-rw-r--r--drivers/target/tcm_fc/tfc_sess.c2
-rw-r--r--drivers/tty/serial/8250_pci.c2
-rw-r--r--drivers/tty/serial/bfin_5xx.c5
-rw-r--r--drivers/tty/serial/imx.c5
-rw-r--r--drivers/tty/serial/m32r_sio.c2
-rw-r--r--drivers/tty/serial/omap-serial.c6
-rw-r--r--drivers/tty/serial/pxa.c2
-rw-r--r--drivers/tty/serial/sunsu.c2
-rw-r--r--drivers/tty/serial/vt8500_serial.c3
-rw-r--r--drivers/uio/uio_pdrv.c2
-rw-r--r--drivers/uio/uio_pdrv_genirq.c2
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c2
-rw-r--r--drivers/usb/gadget/fsl_udc_core.c6
-rw-r--r--drivers/usb/gadget/pxa27x_udc.h4
-rw-r--r--drivers/usb/host/ehci-ath79.c2
-rw-r--r--drivers/usb/host/ehci-cns3xxx.c2
-rw-r--r--drivers/usb/host/ehci-fsl.c2
-rw-r--r--drivers/usb/host/ehci-grlib.c2
-rw-r--r--drivers/usb/host/ehci-ixp4xx.c2
-rw-r--r--drivers/usb/host/ehci-octeon.c2
-rw-r--r--drivers/usb/host/ehci-pmcmsp.c10
-rw-r--r--drivers/usb/host/ehci-ppc-of.c2
-rw-r--r--drivers/usb/host/ehci-w90x900.c2
-rw-r--r--drivers/usb/host/ehci-xilinx-of.c2
-rw-r--r--drivers/usb/host/fhci-hcd.c2
-rw-r--r--drivers/usb/host/ohci-ath79.c4
-rw-r--r--drivers/usb/host/ohci-cns3xxx.c2
-rw-r--r--drivers/usb/host/ohci-da8xx.c2
-rw-r--r--drivers/usb/host/ohci-octeon.c2
-rw-r--r--drivers/usb/host/ohci-ppc-of.c2
-rw-r--r--drivers/usb/host/ohci-ppc-soc.c2
-rw-r--r--drivers/usb/host/ohci-sa1111.c2
-rw-r--r--drivers/usb/host/ohci-sm501.c11
-rw-r--r--drivers/usb/host/ohci-ssb.c2
-rw-r--r--drivers/usb/host/ohci-tmio.c6
-rw-r--r--drivers/usb/host/oxu210hp-hcd.c2
-rw-r--r--drivers/usb/host/uhci-grlib.c2
-rw-r--r--drivers/usb/host/whci/init.c2
-rw-r--r--drivers/usb/misc/ftdi-elan.c28
-rw-r--r--drivers/usb/musb/musb_core.c2
-rw-r--r--drivers/usb/otg/isp1301_omap.c4
-rw-r--r--drivers/usb/otg/otg_fsm.c1
-rw-r--r--drivers/usb/otg/twl4030-usb.c2
-rw-r--r--drivers/uwb/uwbd.c2
-rw-r--r--drivers/uwb/whc-rc.c2
-rw-r--r--drivers/video/atmel_lcdfb.c4
-rw-r--r--drivers/video/aty/atyfb_base.c7
-rw-r--r--drivers/video/au1100fb.c2
-rw-r--r--drivers/video/cobalt_lcdfb.c2
-rw-r--r--drivers/video/controlfb.c4
-rw-r--r--drivers/video/ep93xx-fb.c4
-rw-r--r--drivers/video/i810/i810.h2
-rw-r--r--drivers/video/mb862xx/mb862xxfbdrv.c4
-rw-r--r--drivers/video/msm/mdp.c3
-rw-r--r--drivers/video/msm/msm_fb.c7
-rw-r--r--drivers/video/nuc900fb.c2
-rw-r--r--drivers/video/platinumfb.c5
-rw-r--r--drivers/video/pxa168fb.c2
-rw-r--r--drivers/video/udlfb.c1
-rw-r--r--drivers/video/via/viafbdev.c4
221 files changed, 317 insertions, 364 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 58c3f74bd84c..6512b20aeccd 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -89,7 +89,7 @@ struct acpi_ac {
89 unsigned long long state; 89 unsigned long long state;
90}; 90};
91 91
92#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger); 92#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger)
93 93
94#ifdef CONFIG_ACPI_PROCFS_POWER 94#ifdef CONFIG_ACPI_PROCFS_POWER
95static const struct file_operations acpi_ac_fops = { 95static const struct file_operations acpi_ac_fops = {
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index fcc13ac0aa18..2c661353e8f2 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -132,7 +132,7 @@ struct acpi_battery {
132 unsigned long flags; 132 unsigned long flags;
133}; 133};
134 134
135#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat); 135#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat)
136 136
137inline int acpi_battery_present(struct acpi_battery *battery) 137inline int acpi_battery_present(struct acpi_battery *battery)
138{ 138{
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 51ae3794ec7f..50658ff887d9 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -112,7 +112,7 @@ struct acpi_battery {
112 u8 have_sysfs_alarm:1; 112 u8 have_sysfs_alarm:1;
113}; 113};
114 114
115#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat); 115#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat)
116 116
117struct acpi_sbs { 117struct acpi_sbs {
118 struct power_supply charger; 118 struct power_supply charger;
diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c
index fb543024df2f..851e05bc948a 100644
--- a/drivers/bcma/driver_chipcommon.c
+++ b/drivers/bcma/driver_chipcommon.c
@@ -3,7 +3,7 @@
3 * ChipCommon core driver 3 * ChipCommon core driver
4 * 4 *
5 * Copyright 2005, Broadcom Corporation 5 * Copyright 2005, Broadcom Corporation
6 * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de> 6 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
9 */ 9 */
diff --git a/drivers/bcma/driver_chipcommon_pmu.c b/drivers/bcma/driver_chipcommon_pmu.c
index dd5846bef029..fcc63db0ce75 100644
--- a/drivers/bcma/driver_chipcommon_pmu.c
+++ b/drivers/bcma/driver_chipcommon_pmu.c
@@ -2,7 +2,7 @@
2 * Broadcom specific AMBA 2 * Broadcom specific AMBA
3 * ChipCommon Power Management Unit driver 3 * ChipCommon Power Management Unit driver
4 * 4 *
5 * Copyright 2009, Michael Buesch <mb@bu3sch.de> 5 * Copyright 2009, Michael Buesch <m@bues.ch>
6 * Copyright 2007, Broadcom Corporation 6 * Copyright 2007, Broadcom Corporation
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
index 745d26491291..25f3ddf33823 100644
--- a/drivers/bcma/driver_pci.c
+++ b/drivers/bcma/driver_pci.c
@@ -3,7 +3,7 @@
3 * PCI Core 3 * PCI Core
4 * 4 *
5 * Copyright 2005, Broadcom Corporation 5 * Copyright 2005, Broadcom Corporation
6 * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de> 6 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
9 */ 9 */
diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c
index cf39bc08ce08..0c688232aab3 100644
--- a/drivers/char/bsr.c
+++ b/drivers/char/bsr.c
@@ -212,7 +212,7 @@ static int bsr_add_node(struct device_node *bn)
212 212
213 cur->bsr_minor = i + total_bsr_devs; 213 cur->bsr_minor = i + total_bsr_devs;
214 cur->bsr_addr = res.start; 214 cur->bsr_addr = res.start;
215 cur->bsr_len = res.end - res.start + 1; 215 cur->bsr_len = resource_size(&res);
216 cur->bsr_bytes = bsr_bytes[i]; 216 cur->bsr_bytes = bsr_bytes[i];
217 cur->bsr_stride = bsr_stride[i]; 217 cur->bsr_stride = bsr_stride[i];
218 cur->bsr_dev = MKDEV(bsr_major, i + total_bsr_devs); 218 cur->bsr_dev = MKDEV(bsr_major, i + total_bsr_devs);
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 2016aad85203..1bafb40ec8a2 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -19,7 +19,7 @@
19 Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com> 19 Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
20 20
21 Added generic RNG API 21 Added generic RNG API
22 Copyright 2006 Michael Buesch <mbuesch@freenet.de> 22 Copyright 2006 Michael Buesch <m@bues.ch>
23 Copyright 2005 (c) MontaVista Software, Inc. 23 Copyright 2005 (c) MontaVista Software, Inc.
24 24
25 Please read Documentation/hw_random.txt for details on use. 25 Please read Documentation/hw_random.txt for details on use.
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
index 39ccdeada791..e90e1c74fd4c 100644
--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
@@ -621,7 +621,7 @@ static int __devinit hwicap_setup(struct device *dev, int id,
621 621
622 drvdata->mem_start = regs_res->start; 622 drvdata->mem_start = regs_res->start;
623 drvdata->mem_end = regs_res->end; 623 drvdata->mem_end = regs_res->end;
624 drvdata->mem_size = regs_res->end - regs_res->start + 1; 624 drvdata->mem_size = resource_size(regs_res);
625 625
626 if (!request_mem_region(drvdata->mem_start, 626 if (!request_mem_region(drvdata->mem_start,
627 drvdata->mem_size, DRIVER_NAME)) { 627 drvdata->mem_size, DRIVER_NAME)) {
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 954e334e01bb..06f9f27dbe7c 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1304,8 +1304,7 @@ static int mv_xor_shared_probe(struct platform_device *pdev)
1304 if (!res) 1304 if (!res)
1305 return -ENODEV; 1305 return -ENODEV;
1306 1306
1307 msp->xor_base = devm_ioremap(&pdev->dev, res->start, 1307 msp->xor_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
1308 res->end - res->start + 1);
1309 if (!msp->xor_base) 1308 if (!msp->xor_base)
1310 return -EBUSY; 1309 return -EBUSY;
1311 1310
@@ -1314,7 +1313,7 @@ static int mv_xor_shared_probe(struct platform_device *pdev)
1314 return -ENODEV; 1313 return -ENODEV;
1315 1314
1316 msp->xor_high_base = devm_ioremap(&pdev->dev, res->start, 1315 msp->xor_high_base = devm_ioremap(&pdev->dev, res->start,
1317 res->end - res->start + 1); 1316 resource_size(res));
1318 if (!msp->xor_high_base) 1317 if (!msp->xor_high_base)
1319 return -EBUSY; 1318 return -EBUSY;
1320 1319
diff --git a/drivers/edac/cell_edac.c b/drivers/edac/cell_edac.c
index db1df59ae2b6..9a6a274e6925 100644
--- a/drivers/edac/cell_edac.c
+++ b/drivers/edac/cell_edac.c
@@ -140,7 +140,7 @@ static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci)
140 if (of_node_to_nid(np) != priv->node) 140 if (of_node_to_nid(np) != priv->node)
141 continue; 141 continue;
142 csrow->first_page = r.start >> PAGE_SHIFT; 142 csrow->first_page = r.start >> PAGE_SHIFT;
143 csrow->nr_pages = (r.end - r.start + 1) >> PAGE_SHIFT; 143 csrow->nr_pages = resource_size(&r) >> PAGE_SHIFT;
144 csrow->last_page = csrow->first_page + csrow->nr_pages - 1; 144 csrow->last_page = csrow->first_page + csrow->nr_pages - 1;
145 csrow->mtype = MEM_XDR; 145 csrow->mtype = MEM_XDR;
146 csrow->edac_mode = EDAC_SECDED; 146 csrow->edac_mode = EDAC_SECDED;
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 38ab8e2cd7f4..11e1a5dad96f 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -538,15 +538,15 @@ static int __devinit mpc85xx_l2_err_probe(struct platform_device *op)
538 /* we only need the error registers */ 538 /* we only need the error registers */
539 r.start += 0xe00; 539 r.start += 0xe00;
540 540
541 if (!devm_request_mem_region(&op->dev, r.start, 541 if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
542 r.end - r.start + 1, pdata->name)) { 542 pdata->name)) {
543 printk(KERN_ERR "%s: Error while requesting mem region\n", 543 printk(KERN_ERR "%s: Error while requesting mem region\n",
544 __func__); 544 __func__);
545 res = -EBUSY; 545 res = -EBUSY;
546 goto err; 546 goto err;
547 } 547 }
548 548
549 pdata->l2_vbase = devm_ioremap(&op->dev, r.start, r.end - r.start + 1); 549 pdata->l2_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
550 if (!pdata->l2_vbase) { 550 if (!pdata->l2_vbase) {
551 printk(KERN_ERR "%s: Unable to setup L2 err regs\n", __func__); 551 printk(KERN_ERR "%s: Unable to setup L2 err regs\n", __func__);
552 res = -ENOMEM; 552 res = -ENOMEM;
@@ -987,15 +987,15 @@ static int __devinit mpc85xx_mc_err_probe(struct platform_device *op)
987 goto err; 987 goto err;
988 } 988 }
989 989
990 if (!devm_request_mem_region(&op->dev, r.start, 990 if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
991 r.end - r.start + 1, pdata->name)) { 991 pdata->name)) {
992 printk(KERN_ERR "%s: Error while requesting mem region\n", 992 printk(KERN_ERR "%s: Error while requesting mem region\n",
993 __func__); 993 __func__);
994 res = -EBUSY; 994 res = -EBUSY;
995 goto err; 995 goto err;
996 } 996 }
997 997
998 pdata->mc_vbase = devm_ioremap(&op->dev, r.start, r.end - r.start + 1); 998 pdata->mc_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
999 if (!pdata->mc_vbase) { 999 if (!pdata->mc_vbase) {
1000 printk(KERN_ERR "%s: Unable to setup MC err regs\n", __func__); 1000 printk(KERN_ERR "%s: Unable to setup MC err regs\n", __func__);
1001 res = -ENOMEM; 1001 res = -ENOMEM;
diff --git a/drivers/gpio/gpio-ab8500.c b/drivers/gpio/gpio-ab8500.c
index 970053c89ff7..ed795e64eea7 100644
--- a/drivers/gpio/gpio-ab8500.c
+++ b/drivers/gpio/gpio-ab8500.c
@@ -15,7 +15,6 @@
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/slab.h>
19#include <linux/gpio.h> 18#include <linux/gpio.h>
20#include <linux/irq.h> 19#include <linux/irq.h>
21#include <linux/interrupt.h> 20#include <linux/interrupt.h>
diff --git a/drivers/gpio/gpio-bt8xx.c b/drivers/gpio/gpio-bt8xx.c
index aa4f09ad3ced..ec57936aef62 100644
--- a/drivers/gpio/gpio-bt8xx.c
+++ b/drivers/gpio/gpio-bt8xx.c
@@ -2,7 +2,7 @@
2 2
3 bt8xx GPIO abuser 3 bt8xx GPIO abuser
4 4
5 Copyright (C) 2008 Michael Buesch <mb@bu3sch.de> 5 Copyright (C) 2008 Michael Buesch <m@bues.ch>
6 6
7 Please do _only_ contact the people listed _above_ with issues related to this driver. 7 Please do _only_ contact the people listed _above_ with issues related to this driver.
8 All the other people listed below are not related to this driver. Their names 8 All the other people listed below are not related to this driver. Their names
diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index 3bfd3417ab11..72fb9c665320 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Generic EP93xx GPIO handling 2 * Generic EP93xx GPIO handling
3 * 3 *
4 * Copyright (c) 2008 Ryan Mallon <ryan@bluewatersys.com> 4 * Copyright (c) 2008 Ryan Mallon
5 * Copyright (c) 2011 H Hartley Sweeten <hsweeten@visionengravers.com> 5 * Copyright (c) 2011 H Hartley Sweeten <hsweeten@visionengravers.com>
6 * 6 *
7 * Based on code originally from: 7 * Based on code originally from:
diff --git a/drivers/gpio/gpio-u300.c b/drivers/gpio/gpio-u300.c
index fd2dfeeefdf3..53e8255cb0ba 100644
--- a/drivers/gpio/gpio-u300.c
+++ b/drivers/gpio/gpio-u300.c
@@ -578,8 +578,8 @@ static int __init gpio_probe(struct platform_device *pdev)
578 if (!memres) 578 if (!memres)
579 goto err_no_resource; 579 goto err_no_resource;
580 580
581 if (request_mem_region(memres->start, memres->end - memres->start, "GPIO Controller") 581 if (!request_mem_region(memres->start, resource_size(memres),
582 == NULL) { 582 "GPIO Controller")) {
583 err = -ENODEV; 583 err = -ENODEV;
584 goto err_no_ioregion; 584 goto err_no_ioregion;
585 } 585 }
@@ -637,7 +637,7 @@ static int __init gpio_probe(struct platform_device *pdev)
637 free_irq(gpio_ports[i].irq, &gpio_ports[i]); 637 free_irq(gpio_ports[i].irq, &gpio_ports[i]);
638 iounmap(virtbase); 638 iounmap(virtbase);
639 err_no_ioremap: 639 err_no_ioremap:
640 release_mem_region(memres->start, memres->end - memres->start); 640 release_mem_region(memres->start, resource_size(memres));
641 err_no_ioregion: 641 err_no_ioregion:
642 err_no_resource: 642 err_no_resource:
643 clk_disable(clk); 643 clk_disable(clk);
@@ -657,7 +657,7 @@ static int __exit gpio_remove(struct platform_device *pdev)
657 for (i = 0 ; i < U300_GPIO_NUM_PORTS; i++) 657 for (i = 0 ; i < U300_GPIO_NUM_PORTS; i++)
658 free_irq(gpio_ports[i].irq, &gpio_ports[i]); 658 free_irq(gpio_ports[i].irq, &gpio_ports[i]);
659 iounmap(virtbase); 659 iounmap(virtbase);
660 release_mem_region(memres->start, memres->end - memres->start); 660 release_mem_region(memres->start, resource_size(memres));
661 clk_disable(clk); 661 clk_disable(clk);
662 clk_put(clk); 662 clk_put(clk);
663 return 0; 663 return 0;
diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c
index e25cbb46789a..40680f2b4231 100644
--- a/drivers/gpu/drm/nouveau/nv50_graph.c
+++ b/drivers/gpu/drm/nouveau/nv50_graph.c
@@ -31,7 +31,6 @@
31#include "nouveau_grctx.h" 31#include "nouveau_grctx.h"
32#include "nouveau_dma.h" 32#include "nouveau_dma.h"
33#include "nouveau_vm.h" 33#include "nouveau_vm.h"
34#include "nouveau_ramht.h"
35#include "nv50_evo.h" 34#include "nv50_evo.h"
36 35
37struct nv50_graph_engine { 36struct nv50_graph_engine {
diff --git a/drivers/gpu/drm/sis/sis_drv.h b/drivers/gpu/drm/sis/sis_drv.h
index ef940bad63f7..194303c177ad 100644
--- a/drivers/gpu/drm/sis/sis_drv.h
+++ b/drivers/gpu/drm/sis/sis_drv.h
@@ -48,8 +48,8 @@ enum sis_family {
48 48
49 49
50#define SIS_BASE (dev_priv->mmio) 50#define SIS_BASE (dev_priv->mmio)
51#define SIS_READ(reg) DRM_READ32(SIS_BASE, reg); 51#define SIS_READ(reg) DRM_READ32(SIS_BASE, reg)
52#define SIS_WRITE(reg, val) DRM_WRITE32(SIS_BASE, reg, val); 52#define SIS_WRITE(reg, val) DRM_WRITE32(SIS_BASE, reg, val)
53 53
54typedef struct drm_sis_private { 54typedef struct drm_sis_private {
55 drm_local_map_t *mmio; 55 drm_local_map_t *mmio;
diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c
index ec588026f0a9..131ea8625f08 100644
--- a/drivers/hwmon/gl520sm.c
+++ b/drivers/hwmon/gl520sm.c
@@ -273,7 +273,7 @@ static SENSOR_DEVICE_ATTR(in4_max, S_IRUGO | S_IWUSR,
273 273
274#define DIV_FROM_REG(val) (1 << (val)) 274#define DIV_FROM_REG(val) (1 << (val))
275#define FAN_FROM_REG(val,div) ((val)==0 ? 0 : (480000/((val) << (div)))) 275#define FAN_FROM_REG(val,div) ((val)==0 ? 0 : (480000/((val) << (div))))
276#define FAN_TO_REG(val,div) ((val)<=0?0:SENSORS_LIMIT((480000 + ((val) << ((div)-1))) / ((val) << (div)), 1, 255)); 276#define FAN_TO_REG(val,div) ((val)<=0?0:SENSORS_LIMIT((480000 + ((val) << ((div)-1))) / ((val) << (div)), 1, 255))
277 277
278static ssize_t get_fan_input(struct device *dev, struct device_attribute *attr, 278static ssize_t get_fan_input(struct device *dev, struct device_attribute *attr,
279 char *buf) 279 char *buf)
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 30f06e956bfb..5f13c62e64b4 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -7,7 +7,7 @@ menuconfig I2C
7 depends on HAS_IOMEM 7 depends on HAS_IOMEM
8 select RT_MUTEXES 8 select RT_MUTEXES
9 ---help--- 9 ---help---
10 I2C (pronounce: I-square-C) is a slow serial bus protocol used in 10 I2C (pronounce: I-squared-C) is a slow serial bus protocol used in
11 many micro controller applications and developed by Philips. SMBus, 11 many micro controller applications and developed by Philips. SMBus,
12 or System Management Bus is a subset of the I2C protocol. More 12 or System Management Bus is a subset of the I2C protocol. More
13 information is contained in the directory <file:Documentation/i2c/>, 13 information is contained in the directory <file:Documentation/i2c/>,
diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
index 3df1bc80f37a..3876a2478bd7 100644
--- a/drivers/i2c/busses/i2c-highlander.c
+++ b/drivers/i2c/busses/i2c-highlander.c
@@ -227,7 +227,7 @@ static int highlander_i2c_read(struct highlander_i2c_dev *dev)
227 227
228 /* 228 /*
229 * The R0P7780LC0011RL FPGA needs a significant delay between 229 * The R0P7780LC0011RL FPGA needs a significant delay between
230 * data read cycles, otherwise the transciever gets confused and 230 * data read cycles, otherwise the transceiver gets confused and
231 * garbage is returned when the read is subsequently aborted. 231 * garbage is returned when the read is subsequently aborted.
232 * 232 *
233 * It is not sufficient to wait for BBSY. 233 * It is not sufficient to wait for BBSY.
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 58a58c7eaa17..1a766cf74f6b 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -204,7 +204,7 @@ struct omap_i2c_dev {
204 u16 errata; 204 u16 errata;
205}; 205};
206 206
207const static u8 reg_map[] = { 207static const u8 reg_map[] = {
208 [OMAP_I2C_REV_REG] = 0x00, 208 [OMAP_I2C_REV_REG] = 0x00,
209 [OMAP_I2C_IE_REG] = 0x01, 209 [OMAP_I2C_IE_REG] = 0x01,
210 [OMAP_I2C_STAT_REG] = 0x02, 210 [OMAP_I2C_STAT_REG] = 0x02,
@@ -225,7 +225,7 @@ const static u8 reg_map[] = {
225 [OMAP_I2C_BUFSTAT_REG] = 0x10, 225 [OMAP_I2C_BUFSTAT_REG] = 0x10,
226}; 226};
227 227
228const static u8 omap4_reg_map[] = { 228static const u8 omap4_reg_map[] = {
229 [OMAP_I2C_REV_REG] = 0x04, 229 [OMAP_I2C_REV_REG] = 0x04,
230 [OMAP_I2C_IE_REG] = 0x2c, 230 [OMAP_I2C_IE_REG] = 0x2c,
231 [OMAP_I2C_STAT_REG] = 0x28, 231 [OMAP_I2C_STAT_REG] = 0x28,
diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
index 9e8f4e1b0cc9..712c7904d03e 100644
--- a/drivers/ide/palm_bk3710.c
+++ b/drivers/ide/palm_bk3710.c
@@ -342,7 +342,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
342 return -ENODEV; 342 return -ENODEV;
343 } 343 }
344 344
345 mem_size = mem->end - mem->start + 1; 345 mem_size = resource_size(mem);
346 if (request_mem_region(mem->start, mem_size, "palm_bk3710") == NULL) { 346 if (request_mem_region(mem->start, mem_size, "palm_bk3710") == NULL) {
347 printk(KERN_ERR "failed to request memory region\n"); 347 printk(KERN_ERR "failed to request memory region\n");
348 return -EBUSY; 348 return -EBUSY;
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index bed3e39aac96..71c231954972 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -551,10 +551,10 @@ static int __init tx4939ide_probe(struct platform_device *pdev)
551 return -ENODEV; 551 return -ENODEV;
552 552
553 if (!devm_request_mem_region(&pdev->dev, res->start, 553 if (!devm_request_mem_region(&pdev->dev, res->start,
554 res->end - res->start + 1, "tx4938ide")) 554 resource_size(res), "tx4938ide"))
555 return -EBUSY; 555 return -EBUSY;
556 mapbase = (unsigned long)devm_ioremap(&pdev->dev, res->start, 556 mapbase = (unsigned long)devm_ioremap(&pdev->dev, res->start,
557 res->end - res->start + 1); 557 resource_size(res));
558 if (!mapbase) 558 if (!mapbase)
559 return -EBUSY; 559 return -EBUSY;
560 memset(&hw, 0, sizeof(hw)); 560 memset(&hw, 0, sizeof(hw));
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c
index 980af94ba9c8..07a8363f3c5c 100644
--- a/drivers/input/serio/libps2.c
+++ b/drivers/input/serio/libps2.c
@@ -210,7 +210,7 @@ int __ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command)
210 /* 210 /*
211 * Some devices (Synaptics) peform the reset before 211 * Some devices (Synaptics) peform the reset before
212 * ACKing the reset command, and so it can take a long 212 * ACKing the reset command, and so it can take a long
213 * time before the ACK arrrives. 213 * time before the ACK arrives.
214 */ 214 */
215 if (ps2_sendbyte(ps2dev, command & 0xff, 215 if (ps2_sendbyte(ps2dev, command & 0xff,
216 command == PS2_CMD_RESET_BAT ? 1000 : 200)) 216 command == PS2_CMD_RESET_BAT ? 1000 : 200))
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c
index d55874e5d1c2..44fc8b4bcd81 100644
--- a/drivers/input/serio/sa1111ps2.c
+++ b/drivers/input/serio/sa1111ps2.c
@@ -300,8 +300,7 @@ static int __devinit ps2_probe(struct sa1111_dev *dev)
300 300
301 out: 301 out:
302 sa1111_disable_device(ps2if->dev); 302 sa1111_disable_device(ps2if->dev);
303 release_mem_region(dev->res.start, 303 release_mem_region(dev->res.start, resource_size(&dev->res));
304 dev->res.end - dev->res.start + 1);
305 free: 304 free:
306 sa1111_set_drvdata(dev, NULL); 305 sa1111_set_drvdata(dev, NULL);
307 kfree(ps2if); 306 kfree(ps2if);
@@ -317,8 +316,7 @@ static int __devexit ps2_remove(struct sa1111_dev *dev)
317 struct ps2if *ps2if = sa1111_get_drvdata(dev); 316 struct ps2if *ps2if = sa1111_get_drvdata(dev);
318 317
319 serio_unregister_port(ps2if->io); 318 serio_unregister_port(ps2if->io);
320 release_mem_region(dev->res.start, 319 release_mem_region(dev->res.start, resource_size(&dev->res));
321 dev->res.end - dev->res.start + 1);
322 sa1111_set_drvdata(dev, NULL); 320 sa1111_set_drvdata(dev, NULL);
323 321
324 kfree(ps2if); 322 kfree(ps2if);
diff --git a/drivers/isdn/i4l/isdn_bsdcomp.c b/drivers/isdn/i4l/isdn_bsdcomp.c
index 02d9918705dd..aa0b6a6f5ef4 100644
--- a/drivers/isdn/i4l/isdn_bsdcomp.c
+++ b/drivers/isdn/i4l/isdn_bsdcomp.c
@@ -155,7 +155,7 @@ struct bsd_db {
155#define LAST 255 155#define LAST 255
156 156
157#define MAXCODE(b) ((1 << (b)) - 1) 157#define MAXCODE(b) ((1 << (b)) - 1)
158#define BADCODEM1 MAXCODE(MAX_BSD_BITS); 158#define BADCODEM1 MAXCODE(MAX_BSD_BITS)
159 159
160#define BSD_HASH(prefix,suffix,hshift) ((((unsigned long)(suffix))<<(hshift)) \ 160#define BSD_HASH(prefix,suffix,hshift) ((((unsigned long)(suffix))<<(hshift)) \
161 ^ (unsigned long)(prefix)) 161 ^ (unsigned long)(prefix))
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index ecd3d0280768..d20168fe4c40 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -42,7 +42,6 @@
42#include <linux/bitops.h> 42#include <linux/bitops.h>
43#include <media/rc-core.h> 43#include <media/rc-core.h>
44#include <linux/pci_ids.h> 44#include <linux/pci_ids.h>
45#include <linux/delay.h>
46 45
47#include "ite-cir.h" 46#include "ite-cir.h"
48 47
diff --git a/drivers/media/video/davinci/vpif.c b/drivers/media/video/davinci/vpif.c
index 9f3bfc1eb240..af9680273ff9 100644
--- a/drivers/media/video/davinci/vpif.c
+++ b/drivers/media/video/davinci/vpif.c
@@ -422,7 +422,7 @@ static int __init vpif_probe(struct platform_device *pdev)
422 if (!res) 422 if (!res)
423 return -ENOENT; 423 return -ENOENT;
424 424
425 res_len = res->end - res->start + 1; 425 res_len = resource_size(res);
426 426
427 res = request_mem_region(res->start, res_len, res->name); 427 res = request_mem_region(res->start, res_len, res->name);
428 if (!res) 428 if (!res)
diff --git a/drivers/media/video/m5mols/m5mols_capture.c b/drivers/media/video/m5mols/m5mols_capture.c
index d9471928369d..a45d8f098e02 100644
--- a/drivers/media/video/m5mols/m5mols_capture.c
+++ b/drivers/media/video/m5mols/m5mols_capture.c
@@ -22,7 +22,6 @@
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23#include <linux/regulator/consumer.h> 23#include <linux/regulator/consumer.h>
24#include <linux/videodev2.h> 24#include <linux/videodev2.h>
25#include <linux/version.h>
26#include <media/v4l2-ctrls.h> 25#include <media/v4l2-ctrls.h>
27#include <media/v4l2-device.h> 26#include <media/v4l2-device.h>
28#include <media/v4l2-subdev.h> 27#include <media/v4l2-subdev.h>
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
index 4d07c5844402..a647894d3a71 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -129,7 +129,7 @@ module_param(debug, bool, S_IRUGO);
129MODULE_PARM_DESC(debug, "Debug level (0-1)"); 129MODULE_PARM_DESC(debug, "Debug level (0-1)");
130 130
131/* list of image formats supported by OMAP2 video pipelines */ 131/* list of image formats supported by OMAP2 video pipelines */
132const static struct v4l2_fmtdesc omap_formats[] = { 132static const struct v4l2_fmtdesc omap_formats[] = {
133 { 133 {
134 /* Note: V4L2 defines RGB565 as: 134 /* Note: V4L2 defines RGB565 as:
135 * 135 *
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
index f6626e87dbc5..69b60ba5dd7a 100644
--- a/drivers/media/video/omap24xxcam.c
+++ b/drivers/media/video/omap24xxcam.c
@@ -1768,14 +1768,13 @@ static int __devinit omap24xxcam_probe(struct platform_device *pdev)
1768 dev_err(cam->dev, "no mem resource?\n"); 1768 dev_err(cam->dev, "no mem resource?\n");
1769 goto err; 1769 goto err;
1770 } 1770 }
1771 if (!request_mem_region(mem->start, (mem->end - mem->start) + 1, 1771 if (!request_mem_region(mem->start, resource_size(mem), pdev->name)) {
1772 pdev->name)) {
1773 dev_err(cam->dev, 1772 dev_err(cam->dev,
1774 "cannot reserve camera register I/O region\n"); 1773 "cannot reserve camera register I/O region\n");
1775 goto err; 1774 goto err;
1776 } 1775 }
1777 cam->mmio_base_phys = mem->start; 1776 cam->mmio_base_phys = mem->start;
1778 cam->mmio_size = (mem->end - mem->start) + 1; 1777 cam->mmio_size = resource_size(mem);
1779 1778
1780 /* map the region */ 1779 /* map the region */
1781 cam->mmio_base = (unsigned long) 1780 cam->mmio_base = (unsigned long)
diff --git a/drivers/media/video/videobuf2-memops.c b/drivers/media/video/videobuf2-memops.c
index 5370a3a7ee25..b03c3aea5bea 100644
--- a/drivers/media/video/videobuf2-memops.c
+++ b/drivers/media/video/videobuf2-memops.c
@@ -18,7 +18,6 @@
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/sched.h> 19#include <linux/sched.h>
20#include <linux/file.h> 20#include <linux/file.h>
21#include <linux/slab.h>
22 21
23#include <media/videobuf2-core.h> 22#include <media/videobuf2-core.h>
24#include <media/videobuf2-memops.h> 23#include <media/videobuf2-memops.h>
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c
index 090d2a3a6548..a8c08f332da0 100644
--- a/drivers/message/i2o/iop.c
+++ b/drivers/message/i2o/iop.c
@@ -681,11 +681,11 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
681 if (root && allocate_resource(root, res, sb->desired_mem_size, sb->desired_mem_size, sb->desired_mem_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */ 681 if (root && allocate_resource(root, res, sb->desired_mem_size, sb->desired_mem_size, sb->desired_mem_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */
682 NULL, NULL) >= 0) { 682 NULL, NULL) >= 0) {
683 c->mem_alloc = 1; 683 c->mem_alloc = 1;
684 sb->current_mem_size = 1 + res->end - res->start; 684 sb->current_mem_size = resource_size(res);
685 sb->current_mem_base = res->start; 685 sb->current_mem_base = res->start;
686 osm_info("%s: allocated %llu bytes of PCI memory at " 686 osm_info("%s: allocated %llu bytes of PCI memory at "
687 "0x%016llX.\n", c->name, 687 "0x%016llX.\n", c->name,
688 (unsigned long long)(1 + res->end - res->start), 688 (unsigned long long)resource_size(res),
689 (unsigned long long)res->start); 689 (unsigned long long)res->start);
690 } 690 }
691 } 691 }
@@ -703,11 +703,11 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
703 if (root && allocate_resource(root, res, sb->desired_io_size, sb->desired_io_size, sb->desired_io_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */ 703 if (root && allocate_resource(root, res, sb->desired_io_size, sb->desired_io_size, sb->desired_io_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */
704 NULL, NULL) >= 0) { 704 NULL, NULL) >= 0) {
705 c->io_alloc = 1; 705 c->io_alloc = 1;
706 sb->current_io_size = 1 + res->end - res->start; 706 sb->current_io_size = resource_size(res);
707 sb->current_mem_base = res->start; 707 sb->current_mem_base = res->start;
708 osm_info("%s: allocated %llu bytes of PCI I/O at " 708 osm_info("%s: allocated %llu bytes of PCI I/O at "
709 "0x%016llX.\n", c->name, 709 "0x%016llX.\n", c->name,
710 (unsigned long long)(1 + res->end - res->start), 710 (unsigned long long)resource_size(res),
711 (unsigned long long)res->start); 711 (unsigned long long)res->start);
712 } 712 }
713 } 713 }
diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c
index ad715bf49cac..71bc835324d8 100644
--- a/drivers/mfd/tc6387xb.c
+++ b/drivers/mfd/tc6387xb.c
@@ -177,7 +177,7 @@ static int __devinit tc6387xb_probe(struct platform_device *dev)
177 if (ret) 177 if (ret)
178 goto err_resource; 178 goto err_resource;
179 179
180 tc6387xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1); 180 tc6387xb->scr = ioremap(rscr->start, resource_size(rscr));
181 if (!tc6387xb->scr) { 181 if (!tc6387xb->scr) {
182 ret = -ENOMEM; 182 ret = -ENOMEM;
183 goto err_ioremap; 183 goto err_ioremap;
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index 4afffe610f99..769a4e8e10dc 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -95,7 +95,7 @@ static int __init ssc_probe(struct platform_device *pdev)
95 } 95 }
96 96
97 ssc->pdev = pdev; 97 ssc->pdev = pdev;
98 ssc->regs = ioremap(regs->start, regs->end - regs->start + 1); 98 ssc->regs = ioremap(regs->start, resource_size(regs));
99 if (!ssc->regs) { 99 if (!ssc->regs) {
100 dev_dbg(&pdev->dev, "ioremap failed\n"); 100 dev_dbg(&pdev->dev, "ioremap failed\n");
101 retval = -EINVAL; 101 retval = -EINVAL;
diff --git a/drivers/misc/atmel_pwm.c b/drivers/misc/atmel_pwm.c
index 0f3fb4f03bdf..28f5aaa19d4a 100644
--- a/drivers/misc/atmel_pwm.c
+++ b/drivers/misc/atmel_pwm.c
@@ -329,7 +329,7 @@ static int __init pwm_probe(struct platform_device *pdev)
329 p->pdev = pdev; 329 p->pdev = pdev;
330 p->mask = *mp; 330 p->mask = *mp;
331 p->irq = irq; 331 p->irq = irq;
332 p->base = ioremap(r->start, r->end - r->start + 1); 332 p->base = ioremap(r->start, resource_size(r));
333 if (!p->base) 333 if (!p->base)
334 goto fail; 334 goto fail;
335 p->clk = clk_get(&pdev->dev, "pwm_clk"); 335 p->clk = clk_get(&pdev->dev, "pwm_clk");
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 0c839d3338db..77f0b6b1681d 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1825,7 +1825,7 @@ static int dw_mci_probe(struct platform_device *pdev)
1825 INIT_LIST_HEAD(&host->queue); 1825 INIT_LIST_HEAD(&host->queue);
1826 1826
1827 ret = -ENOMEM; 1827 ret = -ENOMEM;
1828 host->regs = ioremap(regs->start, regs->end - regs->start + 1); 1828 host->regs = ioremap(regs->start, resource_size(regs));
1829 if (!host->regs) 1829 if (!host->regs)
1830 goto err_freehost; 1830 goto err_freehost;
1831 1831
diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index d4455ffbefd8..e8f6e65183d7 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -1625,8 +1625,8 @@ static void __vub300_command_response(struct vub300_mmc_host *vub300,
1625 cmd->error = respretval; 1625 cmd->error = respretval;
1626 } else if (cmd->error) { 1626 } else if (cmd->error) {
1627 /* 1627 /*
1628 * the error occured sending the command 1628 * the error occurred sending the command
1629 * or recieving the response 1629 * or receiving the response
1630 */ 1630 */
1631 } else if (vub300->command_out_urb->status) { 1631 } else if (vub300->command_out_urb->status) {
1632 vub300->usb_transport_fail = vub300->command_out_urb->status; 1632 vub300->usb_transport_fail = vub300->command_out_urb->status;
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 1e2c430aaad2..83e80c65d6e7 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -5,7 +5,7 @@
5 * 5 *
6 * Copyright © 2009 Bluewater Systems Ltd 6 * Copyright © 2009 Bluewater Systems Ltd
7 * Author: Andre Renaud <andre@bluewatersys.com> 7 * Author: Andre Renaud <andre@bluewatersys.com>
8 * Author: Ryan Mallon <ryan@bluewatersys.com> 8 * Author: Ryan Mallon
9 * 9 *
10 * Based on m25p80.c 10 * Based on m25p80.c
11 * 11 *
@@ -498,5 +498,5 @@ module_exit(sst25l_exit);
498 498
499MODULE_DESCRIPTION("MTD SPI driver for SST25L Flash chips"); 499MODULE_DESCRIPTION("MTD SPI driver for SST25L Flash chips");
500MODULE_AUTHOR("Andre Renaud <andre@bluewatersys.com>, " 500MODULE_AUTHOR("Andre Renaud <andre@bluewatersys.com>, "
501 "Ryan Mallon <ryan@bluewatersys.com>"); 501 "Ryan Mallon");
502MODULE_LICENSE("GPL"); 502MODULE_LICENSE("GPL");
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c
index d4297a97e100..67815eed2f00 100644
--- a/drivers/mtd/maps/bfin-async-flash.c
+++ b/drivers/mtd/maps/bfin-async-flash.c
@@ -142,7 +142,7 @@ static int __devinit bfin_flash_probe(struct platform_device *pdev)
142 state->map.write = bfin_flash_write; 142 state->map.write = bfin_flash_write;
143 state->map.copy_to = bfin_flash_copy_to; 143 state->map.copy_to = bfin_flash_copy_to;
144 state->map.bankwidth = pdata->width; 144 state->map.bankwidth = pdata->width;
145 state->map.size = memory->end - memory->start + 1; 145 state->map.size = resource_size(memory);
146 state->map.virt = (void __iomem *)memory->start; 146 state->map.virt = (void __iomem *)memory->start;
147 state->map.phys = memory->start; 147 state->map.phys = memory->start;
148 state->map.map_priv_1 = (unsigned long)state; 148 state->map.map_priv_1 = (unsigned long)state;
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c
index c00b9175ba9e..1594a802631d 100644
--- a/drivers/mtd/maps/ixp2000.c
+++ b/drivers/mtd/maps/ixp2000.c
@@ -155,7 +155,7 @@ static int ixp2000_flash_probe(struct platform_device *dev)
155 if (!plat) 155 if (!plat)
156 return -ENODEV; 156 return -ENODEV;
157 157
158 window_size = dev->resource->end - dev->resource->start + 1; 158 window_size = resource_size(dev->resource);
159 dev_info(&dev->dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n", 159 dev_info(&dev->dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n",
160 ixp_data->nr_banks, ((u32)window_size >> 20)); 160 ixp_data->nr_banks, ((u32)window_size >> 20));
161 161
@@ -194,16 +194,17 @@ static int ixp2000_flash_probe(struct platform_device *dev)
194 info->map.copy_to = ixp2000_flash_copy_to; 194 info->map.copy_to = ixp2000_flash_copy_to;
195 195
196 info->res = request_mem_region(dev->resource->start, 196 info->res = request_mem_region(dev->resource->start,
197 dev->resource->end - dev->resource->start + 1, 197 resource_size(dev->resource),
198 dev_name(&dev->dev)); 198 dev_name(&dev->dev));
199 if (!info->res) { 199 if (!info->res) {
200 dev_err(&dev->dev, "Could not reserve memory region\n"); 200 dev_err(&dev->dev, "Could not reserve memory region\n");
201 err = -ENOMEM; 201 err = -ENOMEM;
202 goto Error; 202 goto Error;
203 } 203 }
204 204
205 info->map.map_priv_1 = (unsigned long) ioremap(dev->resource->start, 205 info->map.map_priv_1 =
206 dev->resource->end - dev->resource->start + 1); 206 (unsigned long)ioremap(dev->resource->start,
207 resource_size(dev->resource));
207 if (!info->map.map_priv_1) { 208 if (!info->map.map_priv_1) {
208 dev_err(&dev->dev, "Failed to ioremap flash region\n"); 209 dev_err(&dev->dev, "Failed to ioremap flash region\n");
209 err = -EIO; 210 err = -EIO;
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index f59d62f74d44..7ae137d4b998 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -70,7 +70,7 @@ static int __devinit pxa2xx_flash_probe(struct platform_device *pdev)
70 info->map.name = (char *) flash->name; 70 info->map.name = (char *) flash->name;
71 info->map.bankwidth = flash->width; 71 info->map.bankwidth = flash->width;
72 info->map.phys = res->start; 72 info->map.phys = res->start;
73 info->map.size = res->end - res->start + 1; 73 info->map.size = resource_size(res);
74 info->parts = flash->parts; 74 info->parts = flash->parts;
75 info->nr_parts = flash->nr_parts; 75 info->nr_parts = flash->nr_parts;
76 76
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 1b90fd56bef1..55da20ccc7a8 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -514,7 +514,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
514 514
515 host->io_phys = (dma_addr_t)mem->start; 515 host->io_phys = (dma_addr_t)mem->start;
516 516
517 host->io_base = ioremap(mem->start, mem->end - mem->start + 1); 517 host->io_base = ioremap(mem->start, resource_size(mem));
518 if (host->io_base == NULL) { 518 if (host->io_base == NULL) {
519 printk(KERN_ERR "atmel_nand: ioremap failed\n"); 519 printk(KERN_ERR "atmel_nand: ioremap failed\n");
520 res = -EIO; 520 res = -EIO;
@@ -548,7 +548,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
548 if (no_ecc) 548 if (no_ecc)
549 nand_chip->ecc.mode = NAND_ECC_NONE; 549 nand_chip->ecc.mode = NAND_ECC_NONE;
550 if (hard_ecc && regs) { 550 if (hard_ecc && regs) {
551 host->ecc = ioremap(regs->start, regs->end - regs->start + 1); 551 host->ecc = ioremap(regs->start, resource_size(regs));
552 if (host->ecc == NULL) { 552 if (host->ecc == NULL) {
553 printk(KERN_ERR "atmel_nand: ioremap failed\n"); 553 printk(KERN_ERR "atmel_nand: ioremap failed\n");
554 res = -EIO; 554 res = -EIO;
diff --git a/drivers/mtd/nand/bcm_umi_nand.c b/drivers/mtd/nand/bcm_umi_nand.c
index 9ec280738a9a..8c569e454dc5 100644
--- a/drivers/mtd/nand/bcm_umi_nand.c
+++ b/drivers/mtd/nand/bcm_umi_nand.c
@@ -380,7 +380,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev)
380 return -ENXIO; 380 return -ENXIO;
381 381
382 /* map physical address */ 382 /* map physical address */
383 bcm_umi_io_base = ioremap(r->start, r->end - r->start + 1); 383 bcm_umi_io_base = ioremap(r->start, resource_size(r));
384 384
385 if (!bcm_umi_io_base) { 385 if (!bcm_umi_io_base) {
386 printk(KERN_ERR "ioremap to access BCM UMI NAND chip failed\n"); 386 printk(KERN_ERR "ioremap to access BCM UMI NAND chip failed\n");
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c
index 2f7c930872f9..eb1fbac63eb6 100644
--- a/drivers/mtd/nand/mpc5121_nfc.c
+++ b/drivers/mtd/nand/mpc5121_nfc.c
@@ -713,7 +713,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op)
713 } 713 }
714 714
715 regs_paddr = res.start; 715 regs_paddr = res.start;
716 regs_size = res.end - res.start + 1; 716 regs_size = resource_size(&res);
717 717
718 if (!devm_request_mem_region(dev, regs_paddr, regs_size, DRV_NAME)) { 718 if (!devm_request_mem_region(dev, regs_paddr, regs_size, DRV_NAME)) {
719 dev_err(dev, "Error requesting memory region!\n"); 719 dev_err(dev, "Error requesting memory region!\n");
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 6c4ef966ca58..41ea84e3f69c 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -5,7 +5,7 @@
5 * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) 5 * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
6 * Copyright (C) 2006 Felix Fietkau (nbd@openwrt.org) 6 * Copyright (C) 2006 Felix Fietkau (nbd@openwrt.org)
7 * Copyright (C) 2006 Broadcom Corporation. 7 * Copyright (C) 2006 Broadcom Corporation.
8 * Copyright (C) 2007 Michael Buesch <mb@bu3sch.de> 8 * Copyright (C) 2007 Michael Buesch <m@bues.ch>
9 * 9 *
10 * Distribute under GPL. 10 * Distribute under GPL.
11 */ 11 */
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
index 4753bb9731f5..1d9b9858067c 100644
--- a/drivers/net/bcm63xx_enet.c
+++ b/drivers/net/bcm63xx_enet.c
@@ -1647,7 +1647,7 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev)
1647 if (ret) 1647 if (ret)
1648 goto out; 1648 goto out;
1649 1649
1650 iomem_size = res_mem->end - res_mem->start + 1; 1650 iomem_size = resource_size(res_mem);
1651 if (!request_mem_region(res_mem->start, iomem_size, "bcm63xx_enet")) { 1651 if (!request_mem_region(res_mem->start, iomem_size, "bcm63xx_enet")) {
1652 ret = -EBUSY; 1652 ret = -EBUSY;
1653 goto out; 1653 goto out;
@@ -1862,7 +1862,7 @@ static int __devexit bcm_enet_remove(struct platform_device *pdev)
1862 /* release device resources */ 1862 /* release device resources */
1863 iounmap(priv->base); 1863 iounmap(priv->base);
1864 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1864 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1865 release_mem_region(res->start, res->end - res->start + 1); 1865 release_mem_region(res->start, resource_size(res));
1866 1866
1867 /* disable hw block clocks */ 1867 /* disable hw block clocks */
1868 if (priv->phy_clk) { 1868 if (priv->phy_clk) {
@@ -1898,7 +1898,7 @@ static int __devinit bcm_enet_shared_probe(struct platform_device *pdev)
1898 if (!res) 1898 if (!res)
1899 return -ENODEV; 1899 return -ENODEV;
1900 1900
1901 iomem_size = res->end - res->start + 1; 1901 iomem_size = resource_size(res);
1902 if (!request_mem_region(res->start, iomem_size, "bcm63xx_enet_dma")) 1902 if (!request_mem_region(res->start, iomem_size, "bcm63xx_enet_dma"))
1903 return -EBUSY; 1903 return -EBUSY;
1904 1904
@@ -1916,7 +1916,7 @@ static int __devexit bcm_enet_shared_remove(struct platform_device *pdev)
1916 1916
1917 iounmap(bcm_enet_shared_base); 1917 iounmap(bcm_enet_shared_base);
1918 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1918 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1919 release_mem_region(res->start, res->end - res->start + 1); 1919 release_mem_region(res->start, resource_size(res));
1920 return 0; 1920 return 0;
1921} 1921}
1922 1922
diff --git a/drivers/net/bsd_comp.c b/drivers/net/bsd_comp.c
index 6e99d80ec409..a9b759add187 100644
--- a/drivers/net/bsd_comp.c
+++ b/drivers/net/bsd_comp.c
@@ -201,7 +201,7 @@ extern void ppp_unregister_compressor (struct compressor *cp);
201#define LAST 255 201#define LAST 255
202 202
203#define MAXCODE(b) ((1 << (b)) - 1) 203#define MAXCODE(b) ((1 << (b)) - 1)
204#define BADCODEM1 MAXCODE(MAX_BSD_BITS); 204#define BADCODEM1 MAXCODE(MAX_BSD_BITS)
205 205
206#define BSD_HASH(prefix,suffix,hshift) ((((unsigned long)(suffix))<<(hshift)) \ 206#define BSD_HASH(prefix,suffix,hshift) ((((unsigned long)(suffix))<<(hshift)) \
207 ^ (unsigned long)(prefix)) 207 ^ (unsigned long)(prefix))
diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c
index a79925e72d66..09a8b86cf1ac 100644
--- a/drivers/net/can/softing/softing_main.c
+++ b/drivers/net/can/softing/softing_main.c
@@ -799,7 +799,7 @@ static __devinit int softing_pdev_probe(struct platform_device *pdev)
799 if (!pres) 799 if (!pres)
800 goto platform_resource_failed; 800 goto platform_resource_failed;
801 card->dpram_phys = pres->start; 801 card->dpram_phys = pres->start;
802 card->dpram_size = pres->end - pres->start + 1; 802 card->dpram_size = resource_size(pres);
803 card->dpram = ioremap_nocache(card->dpram_phys, card->dpram_size); 803 card->dpram = ioremap_nocache(card->dpram_phys, card->dpram_size);
804 if (!card->dpram) { 804 if (!card->dpram) {
805 dev_alert(&card->pdev->dev, "dpram ioremap failed\n"); 805 dev_alert(&card->pdev->dev, "dpram ioremap failed\n");
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index acef7e96c9fd..3f451e4d8361 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -1822,7 +1822,7 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)
1822 } 1822 }
1823 1823
1824 priv->emac_base_phys = res->start + pdata->ctrl_reg_offset; 1824 priv->emac_base_phys = res->start + pdata->ctrl_reg_offset;
1825 size = res->end - res->start + 1; 1825 size = resource_size(res);
1826 if (!request_mem_region(res->start, size, ndev->name)) { 1826 if (!request_mem_region(res->start, size, ndev->name)) {
1827 dev_err(&pdev->dev, "failed request_mem_region() for regs\n"); 1827 dev_err(&pdev->dev, "failed request_mem_region() for regs\n");
1828 rc = -ENXIO; 1828 rc = -ENXIO;
@@ -1927,7 +1927,7 @@ no_irq_res:
1927 cpdma_ctlr_destroy(priv->dma); 1927 cpdma_ctlr_destroy(priv->dma);
1928no_dma: 1928no_dma:
1929 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1929 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1930 release_mem_region(res->start, res->end - res->start + 1); 1930 release_mem_region(res->start, resource_size(res));
1931 iounmap(priv->remap_addr); 1931 iounmap(priv->remap_addr);
1932 1932
1933probe_quit: 1933probe_quit:
@@ -1961,7 +1961,7 @@ static int __devexit davinci_emac_remove(struct platform_device *pdev)
1961 cpdma_chan_destroy(priv->rxchan); 1961 cpdma_chan_destroy(priv->rxchan);
1962 cpdma_ctlr_destroy(priv->dma); 1962 cpdma_ctlr_destroy(priv->dma);
1963 1963
1964 release_mem_region(res->start, res->end - res->start + 1); 1964 release_mem_region(res->start, resource_size(res));
1965 1965
1966 unregister_netdev(ndev); 1966 unregister_netdev(ndev);
1967 iounmap(priv->remap_addr); 1967 iounmap(priv->remap_addr);
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index 48ee51bb9e50..a19228563efd 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -365,7 +365,7 @@ static int __init do_express_probe(struct net_device *dev)
365 dev->irq = mca_irqmap[(pos1>>4)&0x7]; 365 dev->irq = mca_irqmap[(pos1>>4)&0x7];
366 366
367 /* 367 /*
368 * XXX: Transciever selection is done 368 * XXX: Transceiver selection is done
369 * differently on the MCA version. 369 * differently on the MCA version.
370 * How to get it to select something 370 * How to get it to select something
371 * other than external/AUI is currently 371 * other than external/AUI is currently
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index 0da6295d9da6..8abbe1d82826 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -968,7 +968,7 @@ static int __devinit ethoc_probe(struct platform_device *pdev)
968 priv = netdev_priv(netdev); 968 priv = netdev_priv(netdev);
969 priv->netdev = netdev; 969 priv->netdev = netdev;
970 priv->dma_alloc = 0; 970 priv->dma_alloc = 0;
971 priv->io_region_size = mmio->end - mmio->start + 1; 971 priv->io_region_size = resource_size(mmio);
972 972
973 priv->iobase = devm_ioremap_nocache(&pdev->dev, netdev->base_addr, 973 priv->iobase = devm_ioremap_nocache(&pdev->dev, netdev->base_addr,
974 resource_size(mmio)); 974 resource_size(mmio));
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index 381bdea97d5f..cb4416e591f1 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -871,10 +871,11 @@ static int __devinit mpc52xx_fec_probe(struct platform_device *op)
871 "Error while parsing device node resource\n" ); 871 "Error while parsing device node resource\n" );
872 goto err_netdev; 872 goto err_netdev;
873 } 873 }
874 if ((mem.end - mem.start + 1) < sizeof(struct mpc52xx_fec)) { 874 if (resource_size(&mem) < sizeof(struct mpc52xx_fec)) {
875 printk(KERN_ERR DRIVER_NAME 875 printk(KERN_ERR DRIVER_NAME
876 " - invalid resource size (%lx < %x), check mpc52xx_devices.c\n", 876 " - invalid resource size (%lx < %x), check mpc52xx_devices.c\n",
877 (unsigned long)(mem.end - mem.start + 1), sizeof(struct mpc52xx_fec)); 877 (unsigned long)resource_size(&mem),
878 sizeof(struct mpc52xx_fec));
878 rv = -EINVAL; 879 rv = -EINVAL;
879 goto err_netdev; 880 goto err_netdev;
880 } 881 }
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c
index ad2975440719..b09270b5d0a5 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -120,7 +120,7 @@ static int __devinit fs_mii_bitbang_init(struct mii_bus *bus,
120 if (ret) 120 if (ret)
121 return ret; 121 return ret;
122 122
123 if (res.end - res.start < 13) 123 if (resource_size(&res) <= 13)
124 return -ENODEV; 124 return -ENODEV;
125 125
126 /* This should really encode the pin number as well, but all 126 /* This should really encode the pin number as well, but all
@@ -139,7 +139,7 @@ static int __devinit fs_mii_bitbang_init(struct mii_bus *bus,
139 return -ENODEV; 139 return -ENODEV;
140 mdc_pin = *data; 140 mdc_pin = *data;
141 141
142 bitbang->dir = ioremap(res.start, res.end - res.start + 1); 142 bitbang->dir = ioremap(res.start, resource_size(&res));
143 if (!bitbang->dir) 143 if (!bitbang->dir)
144 return -ENOMEM; 144 return -ENOMEM;
145 145
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c
index 6a2e150e75bb..e0e9d6c35d83 100644
--- a/drivers/net/fs_enet/mii-fec.c
+++ b/drivers/net/fs_enet/mii-fec.c
@@ -136,7 +136,7 @@ static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev)
136 136
137 snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start); 137 snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
138 138
139 fec->fecp = ioremap(res.start, res.end - res.start + 1); 139 fec->fecp = ioremap(res.start, resource_size(&res));
140 if (!fec->fecp) 140 if (!fec->fecp)
141 goto out_fec; 141 goto out_fec;
142 142
diff --git a/drivers/net/gianfar_ptp.c b/drivers/net/gianfar_ptp.c
index d8e175382d1d..1c97861596f0 100644
--- a/drivers/net/gianfar_ptp.c
+++ b/drivers/net/gianfar_ptp.c
@@ -491,7 +491,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)
491 spin_lock_init(&etsects->lock); 491 spin_lock_init(&etsects->lock);
492 492
493 etsects->regs = ioremap(etsects->rsrc->start, 493 etsects->regs = ioremap(etsects->rsrc->start,
494 1 + etsects->rsrc->end - etsects->rsrc->start); 494 resource_size(etsects->rsrc));
495 if (!etsects->regs) { 495 if (!etsects->regs) {
496 pr_err("ioremap ptp registers failed\n"); 496 pr_err("ioremap ptp registers failed\n");
497 goto no_ioremap; 497 goto no_ioremap;
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index 079450fe5e96..725399ea0690 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -2770,7 +2770,7 @@ static int __devinit emac_probe(struct platform_device *ofdev)
2770 } 2770 }
2771 // TODO : request_mem_region 2771 // TODO : request_mem_region
2772 dev->emacp = ioremap(dev->rsrc_regs.start, 2772 dev->emacp = ioremap(dev->rsrc_regs.start,
2773 dev->rsrc_regs.end - dev->rsrc_regs.start + 1); 2773 resource_size(&dev->rsrc_regs));
2774 if (dev->emacp == NULL) { 2774 if (dev->emacp == NULL) {
2775 printk(KERN_ERR "%s: Can't map device registers!\n", 2775 printk(KERN_ERR "%s: Can't map device registers!\n",
2776 np->full_name); 2776 np->full_name);
diff --git a/drivers/net/irda/toim3232-sir.c b/drivers/net/irda/toim3232-sir.c
index 99e1ec02a011..19ad4606b799 100644
--- a/drivers/net/irda/toim3232-sir.c
+++ b/drivers/net/irda/toim3232-sir.c
@@ -78,7 +78,7 @@
78 * Target hardware: IRWave IR320ST-2 78 * Target hardware: IRWave IR320ST-2
79 * 79 *
80 * The IRWave IR320ST-2 is a simple dongle based on the Vishay/Temic 80 * The IRWave IR320ST-2 is a simple dongle based on the Vishay/Temic
81 * TOIM3232 SIR Endec and the Vishay/Temic TFDS4500 SIR IRDA transciever. 81 * TOIM3232 SIR Endec and the Vishay/Temic TFDS4500 SIR IRDA transceiver.
82 * It uses a hex inverter and some discrete components to buffer and 82 * It uses a hex inverter and some discrete components to buffer and
83 * line convert the RS232 down to 5V. 83 * line convert the RS232 down to 5V.
84 * 84 *
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index dcf6011b136c..0fcdc25699d8 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -1172,7 +1172,7 @@ static int __init macb_probe(struct platform_device *pdev)
1172 clk_enable(bp->hclk); 1172 clk_enable(bp->hclk);
1173#endif 1173#endif
1174 1174
1175 bp->regs = ioremap(regs->start, regs->end - regs->start + 1); 1175 bp->regs = ioremap(regs->start, resource_size(regs));
1176 if (!bp->regs) { 1176 if (!bp->regs) {
1177 dev_err(&pdev->dev, "failed to map registers, aborting.\n"); 1177 dev_err(&pdev->dev, "failed to map registers, aborting.\n");
1178 err = -ENOMEM; 1178 err = -ENOMEM;
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 77dc6abe1867..259699983ca5 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -2597,7 +2597,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
2597 if (msp == NULL) 2597 if (msp == NULL)
2598 goto out; 2598 goto out;
2599 2599
2600 msp->base = ioremap(res->start, res->end - res->start + 1); 2600 msp->base = ioremap(res->start, resource_size(res));
2601 if (msp->base == NULL) 2601 if (msp->base == NULL)
2602 goto out_free; 2602 goto out_free;
2603 2603
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 60f46bc2bf64..2962cc695ce3 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -1382,7 +1382,7 @@ static int find_mii(struct net_device *dev)
1382/* WCSR bits [0:4] [9:10] */ 1382/* WCSR bits [0:4] [9:10] */
1383#define WCSR_RESET_SAVE 0x61f 1383#define WCSR_RESET_SAVE 0x61f
1384/* RFCR bits [20] [22] [27:31] */ 1384/* RFCR bits [20] [22] [27:31] */
1385#define RFCR_RESET_SAVE 0xf8500000; 1385#define RFCR_RESET_SAVE 0xf8500000
1386 1386
1387static void natsemi_reset(struct net_device *dev) 1387static void natsemi_reset(struct net_device *dev)
1388{ 1388{
@@ -2920,7 +2920,7 @@ static int netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
2920 2920
2921 /* 2921 /*
2922 * If we're ignoring the PHY then autoneg and the internal 2922 * If we're ignoring the PHY then autoneg and the internal
2923 * transciever are really not going to work so don't let the 2923 * transceiver are really not going to work so don't let the
2924 * user select them. 2924 * user select them.
2925 */ 2925 */
2926 if (np->ignore_phy && (ecmd->autoneg == AUTONEG_ENABLE || 2926 if (np->ignore_phy && (ecmd->autoneg == AUTONEG_ENABLE ||
diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
index c1bb05be7a7c..1a3033d8e7ed 100644
--- a/drivers/net/pxa168_eth.c
+++ b/drivers/net/pxa168_eth.c
@@ -1505,7 +1505,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)
1505 err = -ENODEV; 1505 err = -ENODEV;
1506 goto err_netdev; 1506 goto err_netdev;
1507 } 1507 }
1508 pep->base = ioremap(res->start, res->end - res->start + 1); 1508 pep->base = ioremap(res->start, resource_size(res));
1509 if (pep->base == NULL) { 1509 if (pep->base == NULL) {
1510 err = -ENOMEM; 1510 err = -ENOMEM;
1511 goto err_netdev; 1511 goto err_netdev;
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 4e2d1448093c..7d9c650f395e 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -694,7 +694,7 @@ struct rtl8169_private {
694 size_t size; 694 size_t size;
695 } phy_action; 695 } phy_action;
696 } *rtl_fw; 696 } *rtl_fw;
697#define RTL_FIRMWARE_UNKNOWN ERR_PTR(-EAGAIN); 697#define RTL_FIRMWARE_UNKNOWN ERR_PTR(-EAGAIN)
698}; 698};
699 699
700MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); 700MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index ae3c8e79b32f..d5596926a1ef 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -967,8 +967,8 @@ struct s2io_nic {
967 u8 serial_num[VPD_STRING_LEN]; 967 u8 serial_num[VPD_STRING_LEN];
968}; 968};
969 969
970#define RESET_ERROR 1; 970#define RESET_ERROR 1
971#define CMD_ERROR 2; 971#define CMD_ERROR 2
972 972
973/* OS related system calls */ 973/* OS related system calls */
974#ifndef readq 974#ifndef readq
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index 68d50429ddf3..ea65f7ec360a 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -2597,7 +2597,7 @@ static int __devinit sbmac_probe(struct platform_device *pldev)
2597 2597
2598 res = platform_get_resource(pldev, IORESOURCE_MEM, 0); 2598 res = platform_get_resource(pldev, IORESOURCE_MEM, 0);
2599 BUG_ON(!res); 2599 BUG_ON(!res);
2600 sbm_base = ioremap_nocache(res->start, res->end - res->start + 1); 2600 sbm_base = ioremap_nocache(res->start, resource_size(res));
2601 if (!sbm_base) { 2601 if (!sbm_base) {
2602 printk(KERN_ERR "%s: unable to map device registers\n", 2602 printk(KERN_ERR "%s: unable to map device registers\n",
2603 dev_name(&pldev->dev)); 2603 dev_name(&pldev->dev));
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index ade35dde5b51..be745ae8f4e3 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -46,15 +46,14 @@
46#include <asm/byteorder.h> 46#include <asm/byteorder.h>
47#include <asm/uaccess.h> 47#include <asm/uaccess.h>
48#include <asm/irq.h> 48#include <asm/irq.h>
49#include <asm/prom.h>
49 50
50#ifdef CONFIG_SPARC 51#ifdef CONFIG_SPARC
51#include <asm/idprom.h> 52#include <asm/idprom.h>
52#include <asm/prom.h>
53#endif 53#endif
54 54
55#ifdef CONFIG_PPC_PMAC 55#ifdef CONFIG_PPC_PMAC
56#include <asm/pci-bridge.h> 56#include <asm/pci-bridge.h>
57#include <asm/prom.h>
58#include <asm/machdep.h> 57#include <asm/machdep.h>
59#include <asm/pmac_feature.h> 58#include <asm/pmac_feature.h>
60#endif 59#endif
diff --git a/drivers/net/wan/lmc/lmc_var.h b/drivers/net/wan/lmc/lmc_var.h
index 01ad45218d19..a1d202d8ad67 100644
--- a/drivers/net/wan/lmc/lmc_var.h
+++ b/drivers/net/wan/lmc/lmc_var.h
@@ -380,7 +380,7 @@ struct lmc___softc {
380/* CSR6 settings */ 380/* CSR6 settings */
381#define OPERATION_MODE 0x00000200 /* Full Duplex */ 381#define OPERATION_MODE 0x00000200 /* Full Duplex */
382#define PROMISC_MODE 0x00000040 /* Promiscuous Mode */ 382#define PROMISC_MODE 0x00000040 /* Promiscuous Mode */
383#define RECIEVE_ALL 0x40000000 /* Receive All */ 383#define RECEIVE_ALL 0x40000000 /* Receive All */
384#define PASS_BAD_FRAMES 0x00000008 /* Pass Bad Frames */ 384#define PASS_BAD_FRAMES 0x00000008 /* Pass Bad Frames */
385 385
386/* Dec control registers CSR6 as well */ 386/* Dec control registers CSR6 as well */
diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c
index 9f69a4c9a3f3..a2a167363dbf 100644
--- a/drivers/net/wireless/ath/ath5k/ahb.c
+++ b/drivers/net/wireless/ath/ath5k/ahb.c
@@ -24,7 +24,6 @@
24#include "debug.h" 24#include "debug.h"
25#include "base.h" 25#include "base.h"
26#include "reg.h" 26#include "reg.h"
27#include "debug.h"
28 27
29/* return bus cachesize in 4B word units */ 28/* return bus cachesize in 4B word units */
30static void ath5k_ahb_read_cachesize(struct ath_common *common, int *csz) 29static void ath5k_ahb_read_cachesize(struct ath_common *common, int *csz)
diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c
index 59f59fa40334..e751fdee89b2 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -4,7 +4,7 @@
4 4
5 debugfs driver debugging code 5 debugfs driver debugging code
6 6
7 Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 0953ce1ac1b0..83cba22ac6e8 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -4,7 +4,7 @@
4 4
5 DMA ringbuffer and descriptor allocation/management 5 DMA ringbuffer and descriptor allocation/management
6 6
7 Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2005, 2006 Michael Buesch <m@bues.ch>
8 8
9 Some code in this file is derived from the b44.c driver 9 Some code in this file is derived from the b44.c driver
10 Copyright (C) 2002 David S. Miller 10 Copyright (C) 2002 David S. Miller
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c
index b56ed41fc1bd..a38c1c6446ad 100644
--- a/drivers/net/wireless/b43/leds.c
+++ b/drivers/net/wireless/b43/leds.c
@@ -5,7 +5,7 @@
5 5
6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
7 Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it> 7 Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it>
8 Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de> 8 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
9 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org> 9 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
10 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 10 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
11 11
diff --git a/drivers/net/wireless/b43/lo.c b/drivers/net/wireless/b43/lo.c
index a3dc8bb8ca95..4c82d582a524 100644
--- a/drivers/net/wireless/b43/lo.c
+++ b/drivers/net/wireless/b43/lo.c
@@ -6,7 +6,7 @@
6 6
7 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 7 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
8 Copyright (c) 2005, 2006 Stefano Brivio <stefano.brivio@polimi.it> 8 Copyright (c) 2005, 2006 Stefano Brivio <stefano.brivio@polimi.it>
9 Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de> 9 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
10 Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org> 10 Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org>
11 Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch> 11 Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch>
12 12
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 73fbf0358f96..032d46674f6b 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4,7 +4,7 @@
4 4
5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de> 5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>
6 Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it> 6 Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it>
7 Copyright (c) 2005-2009 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2005-2009 Michael Buesch <m@bues.ch>
8 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org> 8 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
9 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 10
diff --git a/drivers/net/wireless/b43/main.h b/drivers/net/wireless/b43/main.h
index e4ebce9be592..8c684cd33529 100644
--- a/drivers/net/wireless/b43/main.h
+++ b/drivers/net/wireless/b43/main.h
@@ -4,7 +4,7 @@
4 4
5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
6 Stefano Brivio <stefano.brivio@polimi.it> 6 Stefano Brivio <stefano.brivio@polimi.it>
7 Michael Buesch <mb@bu3sch.de> 7 Michael Buesch <m@bues.ch>
8 Danny van Dyk <kugelfang@gentoo.org> 8 Danny van Dyk <kugelfang@gentoo.org>
9 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 10
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index 2c8461dcf1b0..12b6b4067a39 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -2,7 +2,7 @@
2 2
3 Broadcom B43 wireless driver 3 Broadcom B43 wireless driver
4 4
5 Copyright (c) 2007 Michael Buesch <mb@bu3sch.de> 5 Copyright (c) 2007 Michael Buesch <m@bues.ch>
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
index 73ace5552bad..a6c38104693d 100644
--- a/drivers/net/wireless/b43/phy_a.c
+++ b/drivers/net/wireless/b43/phy_a.c
@@ -5,7 +5,7 @@
5 5
6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
7 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it> 7 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
8 Copyright (c) 2005-2008 Michael Buesch <mb@bu3sch.de> 8 Copyright (c) 2005-2008 Michael Buesch <m@bues.ch>
9 Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org> 9 Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org>
10 Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch> 10 Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch>
11 11
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index 101957512bcc..07f009ff5ee2 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -5,7 +5,7 @@
5 5
6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
7 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it> 7 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
8 Copyright (c) 2005-2008 Michael Buesch <mb@bu3sch.de> 8 Copyright (c) 2005-2008 Michael Buesch <m@bues.ch>
9 Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org> 9 Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org>
10 Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch> 10 Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch>
11 11
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index 83532d19347f..8e157bc213f3 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -5,7 +5,7 @@
5 5
6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
7 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it> 7 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
8 Copyright (c) 2005-2008 Michael Buesch <mb@bu3sch.de> 8 Copyright (c) 2005-2008 Michael Buesch <m@bues.ch>
9 Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org> 9 Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org>
10 Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch> 10 Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch>
11 11
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index daec1d9e4a18..f93d66b1817b 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -3,7 +3,7 @@
3 Broadcom B43 wireless driver 3 Broadcom B43 wireless driver
4 IEEE 802.11a/g LP-PHY driver 4 IEEE 802.11a/g LP-PHY driver
5 5
6 Copyright (c) 2008-2009 Michael Buesch <mb@bu3sch.de> 6 Copyright (c) 2008-2009 Michael Buesch <m@bues.ch>
7 Copyright (c) 2009 Gábor Stefanik <netrolller.3d@gmail.com> 7 Copyright (c) 2009 Gábor Stefanik <netrolller.3d@gmail.com>
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 1ae1e84cb4d1..3b46360da99b 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -3,7 +3,7 @@
3 Broadcom B43 wireless driver 3 Broadcom B43 wireless driver
4 IEEE 802.11n PHY support 4 IEEE 802.11n PHY support
5 5
6 Copyright (c) 2008 Michael Buesch <mb@bu3sch.de> 6 Copyright (c) 2008 Michael Buesch <m@bues.ch>
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c
index 44da620d9cc2..6e4228c3ed1b 100644
--- a/drivers/net/wireless/b43/pio.c
+++ b/drivers/net/wireless/b43/pio.c
@@ -4,7 +4,7 @@
4 4
5 PIO data transfer 5 PIO data transfer
6 6
7 Copyright (c) 2005-2008 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2005-2008 Michael Buesch <m@bues.ch>
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/radio_2055.c b/drivers/net/wireless/b43/radio_2055.c
index 44c6dea66882..93643f18c2b3 100644
--- a/drivers/net/wireless/b43/radio_2055.c
+++ b/drivers/net/wireless/b43/radio_2055.c
@@ -3,7 +3,7 @@
3 Broadcom B43 wireless driver 3 Broadcom B43 wireless driver
4 IEEE 802.11n PHY and radio device data tables 4 IEEE 802.11n PHY and radio device data tables
5 5
6 Copyright (c) 2008 Michael Buesch <mb@bu3sch.de> 6 Copyright (c) 2008 Michael Buesch <m@bues.ch>
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
index 59c3afe047af..70c2fcedd1bb 100644
--- a/drivers/net/wireless/b43/rfkill.c
+++ b/drivers/net/wireless/b43/rfkill.c
@@ -3,7 +3,7 @@
3 Broadcom B43 wireless driver 3 Broadcom B43 wireless driver
4 RFKILL support 4 RFKILL support
5 5
6 Copyright (c) 2007 Michael Buesch <mb@bu3sch.de> 6 Copyright (c) 2007 Michael Buesch <m@bues.ch>
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/sdio.c b/drivers/net/wireless/b43/sdio.c
index 4fd6775b8c33..80b0755ed3af 100644
--- a/drivers/net/wireless/b43/sdio.c
+++ b/drivers/net/wireless/b43/sdio.c
@@ -4,7 +4,7 @@
4 * SDIO over Sonics Silicon Backplane bus glue for b43. 4 * SDIO over Sonics Silicon Backplane bus glue for b43.
5 * 5 *
6 * Copyright (C) 2009 Albert Herranz 6 * Copyright (C) 2009 Albert Herranz
7 * Copyright (C) 2009 Michael Buesch <mb@bu3sch.de> 7 * Copyright (C) 2009 Michael Buesch <m@bues.ch>
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/sysfs.c b/drivers/net/wireless/b43/sysfs.c
index f1ae4e05a32c..8e8431d4eb0c 100644
--- a/drivers/net/wireless/b43/sysfs.c
+++ b/drivers/net/wireless/b43/sysfs.c
@@ -4,7 +4,7 @@
4 4
5 SYSFS support routines 5 SYSFS support routines
6 6
7 Copyright (c) 2006 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2006 Michael Buesch <m@bues.ch>
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/tables.c b/drivers/net/wireless/b43/tables.c
index 1ef9a6463ec6..ea288df8aee9 100644
--- a/drivers/net/wireless/b43/tables.c
+++ b/drivers/net/wireless/b43/tables.c
@@ -4,7 +4,7 @@
4 4
5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
6 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it> 6 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
7 Copyright (c) 2006, 2006 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2006, 2006 Michael Buesch <m@bues.ch>
8 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org> 8 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
9 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 10
diff --git a/drivers/net/wireless/b43/tables_lpphy.c b/drivers/net/wireless/b43/tables_lpphy.c
index 6748c5a196e9..cff187c5616d 100644
--- a/drivers/net/wireless/b43/tables_lpphy.c
+++ b/drivers/net/wireless/b43/tables_lpphy.c
@@ -3,7 +3,7 @@
3 Broadcom B43 wireless driver 3 Broadcom B43 wireless driver
4 IEEE 802.11a/g LP-PHY and radio device data tables 4 IEEE 802.11a/g LP-PHY and radio device data tables
5 5
6 Copyright (c) 2009 Michael Buesch <mb@bu3sch.de> 6 Copyright (c) 2009 Michael Buesch <m@bues.ch>
7 Copyright (c) 2009 Gábor Stefanik <netrolller.3d@gmail.com> 7 Copyright (c) 2009 Gábor Stefanik <netrolller.3d@gmail.com>
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c
index 2de483b3d3ba..916f238a71df 100644
--- a/drivers/net/wireless/b43/tables_nphy.c
+++ b/drivers/net/wireless/b43/tables_nphy.c
@@ -3,7 +3,7 @@
3 Broadcom B43 wireless driver 3 Broadcom B43 wireless driver
4 IEEE 802.11n PHY data tables 4 IEEE 802.11n PHY data tables
5 5
6 Copyright (c) 2008 Michael Buesch <mb@bu3sch.de> 6 Copyright (c) 2008 Michael Buesch <m@bues.ch>
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/wa.c b/drivers/net/wireless/b43/wa.c
index 5d00d0eaf2e7..9b1a038be08b 100644
--- a/drivers/net/wireless/b43/wa.c
+++ b/drivers/net/wireless/b43/wa.c
@@ -5,7 +5,7 @@
5 PHY workarounds. 5 PHY workarounds.
6 6
7 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it> 7 Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
8 Copyright (c) 2005-2007 Michael Buesch <mbuesch@freenet.de> 8 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
9 9
10 This program is free software; you can redistribute it and/or modify 10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by 11 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 82bcf7595139..b74f25ec1ab4 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -6,7 +6,7 @@
6 6
7 Copyright (C) 2005 Martin Langer <martin-langer@gmx.de> 7 Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
8 Copyright (C) 2005 Stefano Brivio <stefano.brivio@polimi.it> 8 Copyright (C) 2005 Stefano Brivio <stefano.brivio@polimi.it>
9 Copyright (C) 2005, 2006 Michael Buesch <mb@bu3sch.de> 9 Copyright (C) 2005, 2006 Michael Buesch <m@bues.ch>
10 Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org> 10 Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
11 Copyright (C) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 11 Copyright (C) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
12 12
diff --git a/drivers/net/wireless/b43legacy/debugfs.c b/drivers/net/wireless/b43legacy/debugfs.c
index f232618f2cd1..5e28ad0d6d17 100644
--- a/drivers/net/wireless/b43legacy/debugfs.c
+++ b/drivers/net/wireless/b43legacy/debugfs.c
@@ -4,7 +4,7 @@
4 4
5 debugfs driver debugging code 5 debugfs driver debugging code
6 6
7 Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index 704ee62101bd..5010c477abdf 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -4,7 +4,7 @@
4 4
5 DMA ringbuffer and descriptor allocation/management 5 DMA ringbuffer and descriptor allocation/management
6 6
7 Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2005, 2006 Michael Buesch <m@bues.ch>
8 8
9 Some code in this file is derived from the b44.c driver 9 Some code in this file is derived from the b44.c driver
10 Copyright (C) 2002 David S. Miller 10 Copyright (C) 2002 David S. Miller
diff --git a/drivers/net/wireless/b43legacy/ilt.c b/drivers/net/wireless/b43legacy/ilt.c
index a849078aea69..ee5682e54204 100644
--- a/drivers/net/wireless/b43legacy/ilt.c
+++ b/drivers/net/wireless/b43legacy/ilt.c
@@ -4,7 +4,7 @@
4 4
5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
6 Stefano Brivio <stefano.brivio@polimi.it> 6 Stefano Brivio <stefano.brivio@polimi.it>
7 Michael Buesch <mbuesch@freenet.de> 7 Michael Buesch <m@bues.ch>
8 Danny van Dyk <kugelfang@gentoo.org> 8 Danny van Dyk <kugelfang@gentoo.org>
9 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 10
diff --git a/drivers/net/wireless/b43legacy/leds.c b/drivers/net/wireless/b43legacy/leds.c
index 37e9be893560..2f1bfdc44f94 100644
--- a/drivers/net/wireless/b43legacy/leds.c
+++ b/drivers/net/wireless/b43legacy/leds.c
@@ -5,7 +5,7 @@
5 5
6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
7 Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it> 7 Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it>
8 Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de> 8 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
9 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org> 9 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
10 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 10 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
11 11
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index d6db6c17da4f..04c03b212a5e 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * Copyright (c) 2005 Martin Langer <martin-langer@gmx.de> 5 * Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>
6 * Copyright (c) 2005-2008 Stefano Brivio <stefano.brivio@polimi.it> 6 * Copyright (c) 2005-2008 Stefano Brivio <stefano.brivio@polimi.it>
7 * Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de> 7 * Copyright (c) 2005, 2006 Michael Buesch <m@bues.ch>
8 * Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org> 8 * Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
9 * Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 * Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 * Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net> 10 * Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net>
diff --git a/drivers/net/wireless/b43legacy/main.h b/drivers/net/wireless/b43legacy/main.h
index 1f0e2e379b02..b74a058d7bac 100644
--- a/drivers/net/wireless/b43legacy/main.h
+++ b/drivers/net/wireless/b43legacy/main.h
@@ -4,7 +4,7 @@
4 4
5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
6 Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it> 6 Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it>
7 Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2005, 2006 Michael Buesch <m@bues.ch>
8 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org> 8 Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
9 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net> 10 Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net>
diff --git a/drivers/net/wireless/b43legacy/phy.c b/drivers/net/wireless/b43legacy/phy.c
index 28e477d01587..96faaef3661b 100644
--- a/drivers/net/wireless/b43legacy/phy.c
+++ b/drivers/net/wireless/b43legacy/phy.c
@@ -4,7 +4,7 @@
4 4
5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
6 Stefano Brivio <stefano.brivio@polimi.it> 6 Stefano Brivio <stefano.brivio@polimi.it>
7 Michael Buesch <mbuesch@freenet.de> 7 Michael Buesch <m@bues.ch>
8 Danny van Dyk <kugelfang@gentoo.org> 8 Danny van Dyk <kugelfang@gentoo.org>
9 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net> 10 Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net>
diff --git a/drivers/net/wireless/b43legacy/phy.h b/drivers/net/wireless/b43legacy/phy.h
index ecbe409f9a94..831a7a4760e5 100644
--- a/drivers/net/wireless/b43legacy/phy.h
+++ b/drivers/net/wireless/b43legacy/phy.h
@@ -4,7 +4,7 @@
4 4
5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
6 Stefano Brivio <stefano.brivio@polimi.it> 6 Stefano Brivio <stefano.brivio@polimi.it>
7 Michael Buesch <mbuesch@freenet.de> 7 Michael Buesch <m@bues.ch>
8 Danny van Dyk <kugelfang@gentoo.org> 8 Danny van Dyk <kugelfang@gentoo.org>
9 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net> 10 Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net>
diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c
index b033b0ed4ca0..192251adf986 100644
--- a/drivers/net/wireless/b43legacy/pio.c
+++ b/drivers/net/wireless/b43legacy/pio.c
@@ -4,7 +4,7 @@
4 4
5 PIO Transmission 5 PIO Transmission
6 6
7 Copyright (c) 2005 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2005 Michael Buesch <m@bues.ch>
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43legacy/radio.c b/drivers/net/wireless/b43legacy/radio.c
index 2df545cfad14..475eb14e665b 100644
--- a/drivers/net/wireless/b43legacy/radio.c
+++ b/drivers/net/wireless/b43legacy/radio.c
@@ -4,7 +4,7 @@
4 4
5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
6 Stefano Brivio <stefano.brivio@polimi.it> 6 Stefano Brivio <stefano.brivio@polimi.it>
7 Michael Buesch <mbuesch@freenet.de> 7 Michael Buesch <m@bues.ch>
8 Danny van Dyk <kugelfang@gentoo.org> 8 Danny van Dyk <kugelfang@gentoo.org>
9 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net> 10 Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net>
diff --git a/drivers/net/wireless/b43legacy/radio.h b/drivers/net/wireless/b43legacy/radio.h
index ec4de2811c52..bccb3d7da682 100644
--- a/drivers/net/wireless/b43legacy/radio.h
+++ b/drivers/net/wireless/b43legacy/radio.h
@@ -4,7 +4,7 @@
4 4
5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 5 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
6 Stefano Brivio <stefano.brivio@polimi.it> 6 Stefano Brivio <stefano.brivio@polimi.it>
7 Michael Buesch <mbuesch@freenet.de> 7 Michael Buesch <m@bues.ch>
8 Danny van Dyk <kugelfang@gentoo.org> 8 Danny van Dyk <kugelfang@gentoo.org>
9 Andreas Jaggi <andreas.jaggi@waterwave.ch> 9 Andreas Jaggi <andreas.jaggi@waterwave.ch>
10 10
diff --git a/drivers/net/wireless/b43legacy/rfkill.c b/drivers/net/wireless/b43legacy/rfkill.c
index b90f223fb31c..c4559bcbc707 100644
--- a/drivers/net/wireless/b43legacy/rfkill.c
+++ b/drivers/net/wireless/b43legacy/rfkill.c
@@ -3,7 +3,7 @@
3 Broadcom B43 wireless driver 3 Broadcom B43 wireless driver
4 RFKILL support 4 RFKILL support
5 5
6 Copyright (c) 2007 Michael Buesch <mb@bu3sch.de> 6 Copyright (c) 2007 Michael Buesch <m@bues.ch>
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43legacy/sysfs.c b/drivers/net/wireless/b43legacy/sysfs.c
index 56c384fa9b1f..57f8b089767c 100644
--- a/drivers/net/wireless/b43legacy/sysfs.c
+++ b/drivers/net/wireless/b43legacy/sysfs.c
@@ -4,7 +4,7 @@
4 4
5 SYSFS support routines 5 SYSFS support routines
6 6
7 Copyright (c) 2006 Michael Buesch <mb@bu3sch.de> 7 Copyright (c) 2006 Michael Buesch <m@bues.ch>
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
index 6c174f38ca3c..5188fab0b377 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -6,7 +6,7 @@
6 6
7 Copyright (C) 2005 Martin Langer <martin-langer@gmx.de> 7 Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
8 Copyright (C) 2005 Stefano Brivio <stefano.brivio@polimi.it> 8 Copyright (C) 2005 Stefano Brivio <stefano.brivio@polimi.it>
9 Copyright (C) 2005, 2006 Michael Buesch <mb@bu3sch.de> 9 Copyright (C) 2005, 2006 Michael Buesch <m@bues.ch>
10 Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org> 10 Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
11 Copyright (C) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 11 Copyright (C) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
12 Copyright (C) 2007 Larry Finger <Larry.Finger@lwfinger.net> 12 Copyright (C) 2007 Larry Finger <Larry.Finger@lwfinger.net>
diff --git a/drivers/net/wireless/iwlegacy/iwl-commands.h b/drivers/net/wireless/iwlegacy/iwl-commands.h
index ee21210bea9c..89904054473f 100644
--- a/drivers/net/wireless/iwlegacy/iwl-commands.h
+++ b/drivers/net/wireless/iwlegacy/iwl-commands.h
@@ -2617,8 +2617,8 @@ struct iwl_scanstart_notification {
2617 __le32 status; 2617 __le32 status;
2618} __packed; 2618} __packed;
2619 2619
2620#define SCAN_OWNER_STATUS 0x1; 2620#define SCAN_OWNER_STATUS 0x1
2621#define MEASURE_OWNER_STATUS 0x2; 2621#define MEASURE_OWNER_STATUS 0x2
2622 2622
2623#define IWL_PROBE_STATUS_OK 0 2623#define IWL_PROBE_STATUS_OK 0
2624#define IWL_PROBE_STATUS_TX_FAILED BIT(0) 2624#define IWL_PROBE_STATUS_TX_FAILED BIT(0)
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 5769ca5cebca..e9e9d1d1778d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -2468,8 +2468,8 @@ struct iwl_scanstart_notification {
2468 __le32 status; 2468 __le32 status;
2469} __packed; 2469} __packed;
2470 2470
2471#define SCAN_OWNER_STATUS 0x1; 2471#define SCAN_OWNER_STATUS 0x1
2472#define MEASURE_OWNER_STATUS 0x2; 2472#define MEASURE_OWNER_STATUS 0x2
2473 2473
2474#define IWL_PROBE_STATUS_OK 0 2474#define IWL_PROBE_STATUS_OK 0
2475#define IWL_PROBE_STATUS_TX_FAILED BIT(0) 2475#define IWL_PROBE_STATUS_TX_FAILED BIT(0)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/reg.h b/drivers/net/wireless/rtlwifi/rtl8192ce/reg.h
index 72a3d5497547..ba5ff0411f0a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/reg.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/reg.h
@@ -1074,10 +1074,10 @@
1074#define _SRL(x) (((x) & 0x3F) << 8) 1074#define _SRL(x) (((x) & 0x3F) << 8)
1075 1075
1076#define _SIFS_CCK_CTX(x) ((x) & 0xFF) 1076#define _SIFS_CCK_CTX(x) ((x) & 0xFF)
1077#define _SIFS_CCK_TRX(x) (((x) & 0xFF) << 8); 1077#define _SIFS_CCK_TRX(x) (((x) & 0xFF) << 8)
1078 1078
1079#define _SIFS_OFDM_CTX(x) ((x) & 0xFF) 1079#define _SIFS_OFDM_CTX(x) ((x) & 0xFF)
1080#define _SIFS_OFDM_TRX(x) (((x) & 0xFF) << 8); 1080#define _SIFS_OFDM_TRX(x) (((x) & 0xFF) << 8)
1081 1081
1082#define _TBTT_PROHIBIT_HOLD(x) (((x) & 0xFF) << 8) 1082#define _TBTT_PROHIBIT_HOLD(x) (((x) & 0xFF) << 8)
1083 1083
diff --git a/drivers/parport/parport_ax88796.c b/drivers/parport/parport_ax88796.c
index 2c5ac2bf5c56..844f6137970a 100644
--- a/drivers/parport/parport_ax88796.c
+++ b/drivers/parport/parport_ax88796.c
@@ -293,7 +293,7 @@ static int parport_ax88796_probe(struct platform_device *pdev)
293 goto exit_mem; 293 goto exit_mem;
294 } 294 }
295 295
296 size = (res->end - res->start) + 1; 296 size = resource_size(res);
297 spacing = size / 3; 297 spacing = size / 3;
298 298
299 dd->io = request_mem_region(res->start, size, pdev->name); 299 dd->io = request_mem_region(res->start, size, pdev->name);
diff --git a/drivers/pci/hotplug/shpchp_sysfs.c b/drivers/pci/hotplug/shpchp_sysfs.c
index 071b7dc0094b..efa30da1ae8f 100644
--- a/drivers/pci/hotplug/shpchp_sysfs.c
+++ b/drivers/pci/hotplug/shpchp_sysfs.c
@@ -50,29 +50,26 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha
50 pci_bus_for_each_resource(bus, res, index) { 50 pci_bus_for_each_resource(bus, res, index) {
51 if (res && (res->flags & IORESOURCE_MEM) && 51 if (res && (res->flags & IORESOURCE_MEM) &&
52 !(res->flags & IORESOURCE_PREFETCH)) { 52 !(res->flags & IORESOURCE_PREFETCH)) {
53 out += sprintf(out, "start = %8.8llx, " 53 out += sprintf(out, "start = %8.8llx, length = %8.8llx\n",
54 "length = %8.8llx\n", 54 (unsigned long long)res->start,
55 (unsigned long long)res->start, 55 (unsigned long long)resource_size(res));
56 (unsigned long long)(res->end - res->start));
57 } 56 }
58 } 57 }
59 out += sprintf(out, "Free resources: prefetchable memory\n"); 58 out += sprintf(out, "Free resources: prefetchable memory\n");
60 pci_bus_for_each_resource(bus, res, index) { 59 pci_bus_for_each_resource(bus, res, index) {
61 if (res && (res->flags & IORESOURCE_MEM) && 60 if (res && (res->flags & IORESOURCE_MEM) &&
62 (res->flags & IORESOURCE_PREFETCH)) { 61 (res->flags & IORESOURCE_PREFETCH)) {
63 out += sprintf(out, "start = %8.8llx, " 62 out += sprintf(out, "start = %8.8llx, length = %8.8llx\n",
64 "length = %8.8llx\n", 63 (unsigned long long)res->start,
65 (unsigned long long)res->start, 64 (unsigned long long)resource_size(res));
66 (unsigned long long)(res->end - res->start));
67 } 65 }
68 } 66 }
69 out += sprintf(out, "Free resources: IO\n"); 67 out += sprintf(out, "Free resources: IO\n");
70 pci_bus_for_each_resource(bus, res, index) { 68 pci_bus_for_each_resource(bus, res, index) {
71 if (res && (res->flags & IORESOURCE_IO)) { 69 if (res && (res->flags & IORESOURCE_IO)) {
72 out += sprintf(out, "start = %8.8llx, " 70 out += sprintf(out, "start = %8.8llx, length = %8.8llx\n",
73 "length = %8.8llx\n", 71 (unsigned long long)res->start,
74 (unsigned long long)res->start, 72 (unsigned long long)resource_size(res));
75 (unsigned long long)(res->end - res->start));
76 } 73 }
77 } 74 }
78 out += sprintf(out, "Free resources: bus numbers\n"); 75 out += sprintf(out, "Free resources: bus numbers\n");
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 6892601fc76f..cbfbab18be91 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -940,7 +940,7 @@ static int __init pcie_aspm_disable(char *str)
940 printk(KERN_INFO "PCIe ASPM is disabled\n"); 940 printk(KERN_INFO "PCIe ASPM is disabled\n");
941 } else if (!strcmp(str, "force")) { 941 } else if (!strcmp(str, "force")) {
942 aspm_force = 1; 942 aspm_force = 1;
943 printk(KERN_INFO "PCIe ASPM is forcedly enabled\n"); 943 printk(KERN_INFO "PCIe ASPM is forcibly enabled\n");
944 } 944 }
945 return 1; 945 return 1;
946} 946}
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index fb33fa42d249..4902206f53d9 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -283,8 +283,7 @@ static int __init at91_cf_probe(struct platform_device *pdev)
283 } 283 }
284 284
285 /* reserve chip-select regions */ 285 /* reserve chip-select regions */
286 if (!request_mem_region(io->start, io->end + 1 - io->start, 286 if (!request_mem_region(io->start, resource_size(io), driver_name)) {
287 driver_name)) {
288 status = -ENXIO; 287 status = -ENXIO;
289 goto fail1; 288 goto fail1;
290 } 289 }
@@ -308,7 +307,7 @@ static int __init at91_cf_probe(struct platform_device *pdev)
308 return 0; 307 return 0;
309 308
310fail2: 309fail2:
311 release_mem_region(io->start, io->end + 1 - io->start); 310 release_mem_region(io->start, resource_size(io));
312fail1: 311fail1:
313 if (cf->socket.io_offset) 312 if (cf->socket.io_offset)
314 iounmap((void __iomem *) cf->socket.io_offset); 313 iounmap((void __iomem *) cf->socket.io_offset);
@@ -339,7 +338,7 @@ static int __exit at91_cf_remove(struct platform_device *pdev)
339 struct resource *io = cf->socket.io[0].res; 338 struct resource *io = cf->socket.io[0].res;
340 339
341 pcmcia_unregister_socket(&cf->socket); 340 pcmcia_unregister_socket(&cf->socket);
342 release_mem_region(io->start, io->end + 1 - io->start); 341 release_mem_region(io->start, resource_size(io));
343 iounmap((void __iomem *) cf->socket.io_offset); 342 iounmap((void __iomem *) cf->socket.io_offset);
344 if (board->irq_pin) { 343 if (board->irq_pin) {
345 free_irq(board->irq_pin, cf); 344 free_irq(board->irq_pin, cf);
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index 6defd4a8168e..06ad3e5e7d3d 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -209,9 +209,9 @@ static int __devinit electra_cf_probe(struct platform_device *ofdev)
209 209
210 cf->ofdev = ofdev; 210 cf->ofdev = ofdev;
211 cf->mem_phys = mem.start; 211 cf->mem_phys = mem.start;
212 cf->mem_size = PAGE_ALIGN(mem.end - mem.start); 212 cf->mem_size = PAGE_ALIGN(resource_size(&mem));
213 cf->mem_base = ioremap(cf->mem_phys, cf->mem_size); 213 cf->mem_base = ioremap(cf->mem_phys, cf->mem_size);
214 cf->io_size = PAGE_ALIGN(io.end - io.start); 214 cf->io_size = PAGE_ALIGN(resource_size(&io));
215 215
216 area = __get_vm_area(cf->io_size, 0, PHB_IO_BASE, PHB_IO_END); 216 area = __get_vm_area(cf->io_size, 0, PHB_IO_BASE, PHB_IO_END);
217 if (area == NULL) 217 if (area == NULL)
diff --git a/drivers/pcmcia/rsrc_iodyn.c b/drivers/pcmcia/rsrc_iodyn.c
index 523eb691c30b..f53c237bda2f 100644
--- a/drivers/pcmcia/rsrc_iodyn.c
+++ b/drivers/pcmcia/rsrc_iodyn.c
@@ -135,7 +135,7 @@ static int iodyn_find_io(struct pcmcia_socket *s, unsigned int attr,
135 try = res->end + 1; 135 try = res->end + 1;
136 if ((*base == 0) || (*base == try)) { 136 if ((*base == 0) || (*base == try)) {
137 if (adjust_resource(s->io[i].res, res->start, 137 if (adjust_resource(s->io[i].res, res->start,
138 res->end - res->start + num + 1)) 138 resource_size(res) + num))
139 continue; 139 continue;
140 *base = try; 140 *base = try;
141 s->io[i].InUse += num; 141 s->io[i].InUse += num;
@@ -147,8 +147,8 @@ static int iodyn_find_io(struct pcmcia_socket *s, unsigned int attr,
147 try = res->start - num; 147 try = res->start - num;
148 if ((*base == 0) || (*base == try)) { 148 if ((*base == 0) || (*base == try)) {
149 if (adjust_resource(s->io[i].res, 149 if (adjust_resource(s->io[i].res,
150 res->start - num, 150 res->start - num,
151 res->end - res->start + num + 1)) 151 resource_size(res) + num))
152 continue; 152 continue;
153 *base = try; 153 *base = try;
154 s->io[i].InUse += num; 154 s->io[i].InUse += num;
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index b187555d4388..9da9656242af 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -770,7 +770,7 @@ static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
770 res->end + num); 770 res->end + num);
771 if (!ret) { 771 if (!ret) {
772 ret = adjust_resource(s->io[i].res, res->start, 772 ret = adjust_resource(s->io[i].res, res->start,
773 res->end - res->start + num + 1); 773 resource_size(res) + num);
774 if (ret) 774 if (ret)
775 continue; 775 continue;
776 *base = try; 776 *base = try;
@@ -788,8 +788,8 @@ static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
788 res->end); 788 res->end);
789 if (!ret) { 789 if (!ret) {
790 ret = adjust_resource(s->io[i].res, 790 ret = adjust_resource(s->io[i].res,
791 res->start - num, 791 res->start - num,
792 res->end - res->start + num + 1); 792 resource_size(res) + num);
793 if (ret) 793 if (ret)
794 continue; 794 continue;
795 *base = try; 795 *base = try;
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 100e4d9372f1..1a6937d9118f 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -1018,7 +1018,7 @@ static void pnpacpi_encode_io(struct pnp_dev *dev,
1018 io->minimum = p->start; 1018 io->minimum = p->start;
1019 io->maximum = p->end; 1019 io->maximum = p->end;
1020 io->alignment = 0; /* Correct? */ 1020 io->alignment = 0; /* Correct? */
1021 io->address_length = p->end - p->start + 1; 1021 io->address_length = resource_size(p);
1022 } else { 1022 } else {
1023 io->minimum = 0; 1023 io->minimum = 0;
1024 io->address_length = 0; 1024 io->address_length = 0;
@@ -1036,7 +1036,7 @@ static void pnpacpi_encode_fixed_io(struct pnp_dev *dev,
1036 1036
1037 if (pnp_resource_enabled(p)) { 1037 if (pnp_resource_enabled(p)) {
1038 fixed_io->address = p->start; 1038 fixed_io->address = p->start;
1039 fixed_io->address_length = p->end - p->start + 1; 1039 fixed_io->address_length = resource_size(p);
1040 } else { 1040 } else {
1041 fixed_io->address = 0; 1041 fixed_io->address = 0;
1042 fixed_io->address_length = 0; 1042 fixed_io->address_length = 0;
@@ -1059,7 +1059,7 @@ static void pnpacpi_encode_mem24(struct pnp_dev *dev,
1059 memory24->minimum = p->start; 1059 memory24->minimum = p->start;
1060 memory24->maximum = p->end; 1060 memory24->maximum = p->end;
1061 memory24->alignment = 0; 1061 memory24->alignment = 0;
1062 memory24->address_length = p->end - p->start + 1; 1062 memory24->address_length = resource_size(p);
1063 } else { 1063 } else {
1064 memory24->minimum = 0; 1064 memory24->minimum = 0;
1065 memory24->address_length = 0; 1065 memory24->address_length = 0;
@@ -1083,7 +1083,7 @@ static void pnpacpi_encode_mem32(struct pnp_dev *dev,
1083 memory32->minimum = p->start; 1083 memory32->minimum = p->start;
1084 memory32->maximum = p->end; 1084 memory32->maximum = p->end;
1085 memory32->alignment = 0; 1085 memory32->alignment = 0;
1086 memory32->address_length = p->end - p->start + 1; 1086 memory32->address_length = resource_size(p);
1087 } else { 1087 } else {
1088 memory32->minimum = 0; 1088 memory32->minimum = 0;
1089 memory32->alignment = 0; 1089 memory32->alignment = 0;
@@ -1106,7 +1106,7 @@ static void pnpacpi_encode_fixed_mem32(struct pnp_dev *dev,
1106 p->flags & IORESOURCE_MEM_WRITEABLE ? 1106 p->flags & IORESOURCE_MEM_WRITEABLE ?
1107 ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY; 1107 ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY;
1108 fixed_memory32->address = p->start; 1108 fixed_memory32->address = p->start;
1109 fixed_memory32->address_length = p->end - p->start + 1; 1109 fixed_memory32->address_length = resource_size(p);
1110 } else { 1110 } else {
1111 fixed_memory32->address = 0; 1111 fixed_memory32->address = 0;
1112 fixed_memory32->address_length = 0; 1112 fixed_memory32->address_length = 0;
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index cb1f47bfee96..cca2f9f9f3e3 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -505,7 +505,7 @@ static void pnpbios_encode_mem(struct pnp_dev *dev, unsigned char *p,
505 505
506 if (pnp_resource_enabled(res)) { 506 if (pnp_resource_enabled(res)) {
507 base = res->start; 507 base = res->start;
508 len = res->end - res->start + 1; 508 len = resource_size(res);
509 } else { 509 } else {
510 base = 0; 510 base = 0;
511 len = 0; 511 len = 0;
@@ -529,7 +529,7 @@ static void pnpbios_encode_mem32(struct pnp_dev *dev, unsigned char *p,
529 529
530 if (pnp_resource_enabled(res)) { 530 if (pnp_resource_enabled(res)) {
531 base = res->start; 531 base = res->start;
532 len = res->end - res->start + 1; 532 len = resource_size(res);
533 } else { 533 } else {
534 base = 0; 534 base = 0;
535 len = 0; 535 len = 0;
@@ -559,7 +559,7 @@ static void pnpbios_encode_fixed_mem32(struct pnp_dev *dev, unsigned char *p,
559 559
560 if (pnp_resource_enabled(res)) { 560 if (pnp_resource_enabled(res)) {
561 base = res->start; 561 base = res->start;
562 len = res->end - res->start + 1; 562 len = resource_size(res);
563 } else { 563 } else {
564 base = 0; 564 base = 0;
565 len = 0; 565 len = 0;
@@ -617,7 +617,7 @@ static void pnpbios_encode_port(struct pnp_dev *dev, unsigned char *p,
617 617
618 if (pnp_resource_enabled(res)) { 618 if (pnp_resource_enabled(res)) {
619 base = res->start; 619 base = res->start;
620 len = res->end - res->start + 1; 620 len = resource_size(res);
621 } else { 621 } else {
622 base = 0; 622 base = 0;
623 len = 0; 623 len = 0;
@@ -636,11 +636,11 @@ static void pnpbios_encode_fixed_port(struct pnp_dev *dev, unsigned char *p,
636 struct resource *res) 636 struct resource *res)
637{ 637{
638 unsigned long base = res->start; 638 unsigned long base = res->start;
639 unsigned long len = res->end - res->start + 1; 639 unsigned long len = resource_size(res);
640 640
641 if (pnp_resource_enabled(res)) { 641 if (pnp_resource_enabled(res)) {
642 base = res->start; 642 base = res->start;
643 len = res->end - res->start + 1; 643 len = resource_size(res);
644 } else { 644 } else {
645 base = 0; 645 base = 0;
646 len = 0; 646 len = 0;
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
index 4d2dc4fa2888..bfbce5de49da 100644
--- a/drivers/power/ds2782_battery.c
+++ b/drivers/power/ds2782_battery.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2009 Bluewater Systems Ltd 4 * Copyright (C) 2009 Bluewater Systems Ltd
5 * 5 *
6 * Author: Ryan Mallon <ryan@bluewatersys.com> 6 * Author: Ryan Mallon
7 * 7 *
8 * DS2786 added by Yulia Vilensky <vilensky@compulab.co.il> 8 * DS2786 added by Yulia Vilensky <vilensky@compulab.co.il>
9 * 9 *
@@ -416,6 +416,6 @@ static void __exit ds278x_exit(void)
416} 416}
417module_exit(ds278x_exit); 417module_exit(ds278x_exit);
418 418
419MODULE_AUTHOR("Ryan Mallon <ryan@bluewatersys.com>"); 419MODULE_AUTHOR("Ryan Mallon");
420MODULE_DESCRIPTION("Maxim/Dallas DS2782 Stand-Alone Fuel Gauage IC driver"); 420MODULE_DESCRIPTION("Maxim/Dallas DS2782 Stand-Alone Fuel Gauage IC driver");
421MODULE_LICENSE("GPL"); 421MODULE_LICENSE("GPL");
diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c
index e725d51e773d..8dd08305aae1 100644
--- a/drivers/rtc/rtc-at32ap700x.c
+++ b/drivers/rtc/rtc-at32ap700x.c
@@ -223,7 +223,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
223 } 223 }
224 224
225 rtc->irq = irq; 225 rtc->irq = irq;
226 rtc->regs = ioremap(regs->start, regs->end - regs->start + 1); 226 rtc->regs = ioremap(regs->start, resource_size(regs));
227 if (!rtc->regs) { 227 if (!rtc->regs) {
228 ret = -ENOMEM; 228 ret = -ENOMEM;
229 dev_dbg(&pdev->dev, "could not map I/O memory\n"); 229 dev_dbg(&pdev->dev, "could not map I/O memory\n");
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 911e75cdc125..05beb6c1ca79 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -606,7 +606,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
606 * (needing ioremap etc), not i/o space resources like this ... 606 * (needing ioremap etc), not i/o space resources like this ...
607 */ 607 */
608 ports = request_region(ports->start, 608 ports = request_region(ports->start,
609 ports->end + 1 - ports->start, 609 resource_size(ports),
610 driver_name); 610 driver_name);
611 if (!ports) { 611 if (!ports) {
612 dev_dbg(dev, "i/o registers already in use\n"); 612 dev_dbg(dev, "i/o registers already in use\n");
@@ -750,7 +750,7 @@ cleanup1:
750 cmos_rtc.dev = NULL; 750 cmos_rtc.dev = NULL;
751 rtc_device_unregister(cmos_rtc.rtc); 751 rtc_device_unregister(cmos_rtc.rtc);
752cleanup0: 752cleanup0:
753 release_region(ports->start, ports->end + 1 - ports->start); 753 release_region(ports->start, resource_size(ports));
754 return retval; 754 return retval;
755} 755}
756 756
@@ -779,7 +779,7 @@ static void __exit cmos_do_remove(struct device *dev)
779 cmos->rtc = NULL; 779 cmos->rtc = NULL;
780 780
781 ports = cmos->iomem; 781 ports = cmos->iomem;
782 release_region(ports->start, ports->end + 1 - ports->start); 782 release_region(ports->start, resource_size(ports));
783 cmos->iomem = NULL; 783 cmos->iomem = NULL;
784 784
785 cmos->dev = NULL; 785 cmos->dev = NULL;
diff --git a/drivers/rtc/rtc-ds1286.c b/drivers/rtc/rtc-ds1286.c
index 47e681df31e2..68e6caf25496 100644
--- a/drivers/rtc/rtc-ds1286.c
+++ b/drivers/rtc/rtc-ds1286.c
@@ -343,7 +343,7 @@ static int __devinit ds1286_probe(struct platform_device *pdev)
343 if (!priv) 343 if (!priv)
344 return -ENOMEM; 344 return -ENOMEM;
345 345
346 priv->size = res->end - res->start + 1; 346 priv->size = resource_size(res);
347 if (!request_mem_region(res->start, priv->size, pdev->name)) { 347 if (!request_mem_region(res->start, priv->size, pdev->name)) {
348 ret = -EBUSY; 348 ret = -EBUSY;
349 goto out; 349 goto out;
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c
index fbabc773dded..568ad30617e7 100644
--- a/drivers/rtc/rtc-ds1511.c
+++ b/drivers/rtc/rtc-ds1511.c
@@ -490,7 +490,7 @@ ds1511_rtc_probe(struct platform_device *pdev)
490 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); 490 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
491 if (!pdata) 491 if (!pdata)
492 return -ENOMEM; 492 return -ENOMEM;
493 pdata->size = res->end - res->start + 1; 493 pdata->size = resource_size(res);
494 if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, 494 if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size,
495 pdev->name)) 495 pdev->name))
496 return -EBUSY; 496 return -EBUSY;
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index 042630c90dd3..d84a448dd754 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -173,7 +173,7 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev)
173 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); 173 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
174 if (!pdata) 174 if (!pdata)
175 return -ENOMEM; 175 return -ENOMEM;
176 pdata->size = res->end - res->start + 1; 176 pdata->size = resource_size(res);
177 if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, 177 if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size,
178 pdev->name)) 178 pdev->name))
179 return -EBUSY; 179 return -EBUSY;
diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c
index 7410875e5838..8e2a24e33ed6 100644
--- a/drivers/rtc/rtc-m48t35.c
+++ b/drivers/rtc/rtc-m48t35.c
@@ -154,7 +154,7 @@ static int __devinit m48t35_probe(struct platform_device *pdev)
154 if (!priv) 154 if (!priv)
155 return -ENOMEM; 155 return -ENOMEM;
156 156
157 priv->size = res->end - res->start + 1; 157 priv->size = resource_size(res);
158 /* 158 /*
159 * kludge: remove the #ifndef after ioc3 resource 159 * kludge: remove the #ifndef after ioc3 resource
160 * conflicts are resolved 160 * conflicts are resolved
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index 3978f4caf724..28365388fb6c 100644
--- a/drivers/rtc/rtc-m48t59.c
+++ b/drivers/rtc/rtc-m48t59.c
@@ -433,7 +433,7 @@ static int __devinit m48t59_rtc_probe(struct platform_device *pdev)
433 433
434 if (!m48t59->ioaddr) { 434 if (!m48t59->ioaddr) {
435 /* ioaddr not mapped externally */ 435 /* ioaddr not mapped externally */
436 m48t59->ioaddr = ioremap(res->start, res->end - res->start + 1); 436 m48t59->ioaddr = ioremap(res->start, resource_size(res));
437 if (!m48t59->ioaddr) 437 if (!m48t59->ioaddr)
438 goto out; 438 goto out;
439 } 439 }
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 0cec5650d56a..d33544802a2e 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -332,9 +332,8 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
332 if (!iomem) 332 if (!iomem)
333 return -ENODEV; 333 return -ENODEV;
334 334
335 iomem = request_mem_region(iomem->start, 335 iomem = request_mem_region(iomem->start, resource_size(iomem),
336 iomem->end + 1 - iomem->start, 336 driver_name);
337 driver_name);
338 if (!iomem) { 337 if (!iomem) {
339 dev_dbg(dev, "i/o mem already in use.\n"); 338 dev_dbg(dev, "i/o mem already in use.\n");
340 return -EBUSY; 339 return -EBUSY;
diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c
index 46f14b82f3ab..b3eba3cddd42 100644
--- a/drivers/rtc/rtc-puv3.c
+++ b/drivers/rtc/rtc-puv3.c
@@ -267,9 +267,8 @@ static int puv3_rtc_probe(struct platform_device *pdev)
267 return -ENOENT; 267 return -ENOENT;
268 } 268 }
269 269
270 puv3_rtc_mem = request_mem_region(res->start, 270 puv3_rtc_mem = request_mem_region(res->start, resource_size(res),
271 res->end-res->start+1, 271 pdev->name);
272 pdev->name);
273 272
274 if (puv3_rtc_mem == NULL) { 273 if (puv3_rtc_mem == NULL) {
275 dev_err(&pdev->dev, "failed to reserve memory region\n"); 274 dev_err(&pdev->dev, "failed to reserve memory region\n");
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 16512ecae31a..2a65e85e0f56 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -455,8 +455,7 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
455 return -ENOENT; 455 return -ENOENT;
456 } 456 }
457 457
458 s3c_rtc_mem = request_mem_region(res->start, 458 s3c_rtc_mem = request_mem_region(res->start, resource_size(res),
459 res->end-res->start+1,
460 pdev->name); 459 pdev->name);
461 460
462 if (s3c_rtc_mem == NULL) { 461 if (s3c_rtc_mem == NULL) {
@@ -465,7 +464,7 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
465 goto err_nores; 464 goto err_nores;
466 } 465 }
467 466
468 s3c_rtc_base = ioremap(res->start, res->end - res->start + 1); 467 s3c_rtc_base = ioremap(res->start, resource_size(res));
469 if (s3c_rtc_base == NULL) { 468 if (s3c_rtc_base == NULL) {
470 dev_err(&pdev->dev, "failed ioremap()\n"); 469 dev_err(&pdev->dev, "failed ioremap()\n");
471 ret = -EINVAL; 470 ret = -EINVAL;
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index e7fc70d6b478..2e7c136bb805 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -35,7 +35,7 @@
35 * mode page were taken from the LSI RDAC 2.4 GPL'd 35 * mode page were taken from the LSI RDAC 2.4 GPL'd
36 * driver, and then converted to Linux conventions. 36 * driver, and then converted to Linux conventions.
37 */ 37 */
38#define RDAC_QUIESCENCE_TIME 20; 38#define RDAC_QUIESCENCE_TIME 20
39/* 39/*
40 * Page Codes 40 * Page Codes
41 */ 41 */
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index 9059524cf225..ab4c4d651d0c 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -2955,18 +2955,18 @@ typedef struct _SLI2_RDSC {
2955typedef struct _PCB { 2955typedef struct _PCB {
2956#ifdef __BIG_ENDIAN_BITFIELD 2956#ifdef __BIG_ENDIAN_BITFIELD
2957 uint32_t type:8; 2957 uint32_t type:8;
2958#define TYPE_NATIVE_SLI2 0x01; 2958#define TYPE_NATIVE_SLI2 0x01
2959 uint32_t feature:8; 2959 uint32_t feature:8;
2960#define FEATURE_INITIAL_SLI2 0x01; 2960#define FEATURE_INITIAL_SLI2 0x01
2961 uint32_t rsvd:12; 2961 uint32_t rsvd:12;
2962 uint32_t maxRing:4; 2962 uint32_t maxRing:4;
2963#else /* __LITTLE_ENDIAN_BITFIELD */ 2963#else /* __LITTLE_ENDIAN_BITFIELD */
2964 uint32_t maxRing:4; 2964 uint32_t maxRing:4;
2965 uint32_t rsvd:12; 2965 uint32_t rsvd:12;
2966 uint32_t feature:8; 2966 uint32_t feature:8;
2967#define FEATURE_INITIAL_SLI2 0x01; 2967#define FEATURE_INITIAL_SLI2 0x01
2968 uint32_t type:8; 2968 uint32_t type:8;
2969#define TYPE_NATIVE_SLI2 0x01; 2969#define TYPE_NATIVE_SLI2 0x01
2970#endif 2970#endif
2971 2971
2972 uint32_t mailBoxSize; 2972 uint32_t mailBoxSize;
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 1b60a95adb50..ae8e298746ba 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -63,7 +63,7 @@ qla2100_intr_handler(int irq, void *dev_id)
63 63
64 /* 64 /*
65 * Issue a "HARD" reset in order for the RISC interrupt 65 * Issue a "HARD" reset in order for the RISC interrupt
66 * bit to be cleared. Schedule a big hammmer to get 66 * bit to be cleared. Schedule a big hammer to get
67 * out of the RISC PAUSED state. 67 * out of the RISC PAUSED state.
68 */ 68 */
69 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC); 69 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC);
@@ -169,7 +169,7 @@ qla2300_intr_handler(int irq, void *dev_id)
169 /* 169 /*
170 * Issue a "HARD" reset in order for the RISC 170 * Issue a "HARD" reset in order for the RISC
171 * interrupt bit to be cleared. Schedule a big 171 * interrupt bit to be cleared. Schedule a big
172 * hammmer to get out of the RISC PAUSED state. 172 * hammer to get out of the RISC PAUSED state.
173 */ 173 */
174 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC); 174 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC);
175 RD_REG_WORD(&reg->hccr); 175 RD_REG_WORD(&reg->hccr);
diff --git a/drivers/ssb/b43_pci_bridge.c b/drivers/ssb/b43_pci_bridge.c
index 744d3f6e4709..bf53e44c82a1 100644
--- a/drivers/ssb/b43_pci_bridge.c
+++ b/drivers/ssb/b43_pci_bridge.c
@@ -5,7 +5,7 @@
5 * because of its small size we include it in the SSB core 5 * because of its small size we include it in the SSB core
6 * instead of creating a standalone module. 6 * instead of creating a standalone module.
7 * 7 *
8 * Copyright 2007 Michael Buesch <mb@bu3sch.de> 8 * Copyright 2007 Michael Buesch <m@bues.ch>
9 * 9 *
10 * Licensed under the GNU/GPL. See COPYING for details. 10 * Licensed under the GNU/GPL. See COPYING for details.
11 */ 11 */
diff --git a/drivers/ssb/driver_chipcommon.c b/drivers/ssb/driver_chipcommon.c
index 06d15b6f2215..5d9c97c24797 100644
--- a/drivers/ssb/driver_chipcommon.c
+++ b/drivers/ssb/driver_chipcommon.c
@@ -3,7 +3,7 @@
3 * Broadcom ChipCommon core driver 3 * Broadcom ChipCommon core driver
4 * 4 *
5 * Copyright 2005, Broadcom Corporation 5 * Copyright 2005, Broadcom Corporation
6 * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de> 6 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
9 */ 9 */
diff --git a/drivers/ssb/driver_chipcommon_pmu.c b/drivers/ssb/driver_chipcommon_pmu.c
index a7aef47bf739..52901c14c68b 100644
--- a/drivers/ssb/driver_chipcommon_pmu.c
+++ b/drivers/ssb/driver_chipcommon_pmu.c
@@ -2,7 +2,7 @@
2 * Sonics Silicon Backplane 2 * Sonics Silicon Backplane
3 * Broadcom ChipCommon Power Management Unit driver 3 * Broadcom ChipCommon Power Management Unit driver
4 * 4 *
5 * Copyright 2009, Michael Buesch <mb@bu3sch.de> 5 * Copyright 2009, Michael Buesch <m@bues.ch>
6 * Copyright 2007, Broadcom Corporation 6 * Copyright 2007, Broadcom Corporation
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
diff --git a/drivers/ssb/driver_extif.c b/drivers/ssb/driver_extif.c
index c3e1d3e6d610..dc47f30e9cf7 100644
--- a/drivers/ssb/driver_extif.c
+++ b/drivers/ssb/driver_extif.c
@@ -3,7 +3,7 @@
3 * Broadcom EXTIF core driver 3 * Broadcom EXTIF core driver
4 * 4 *
5 * Copyright 2005, Broadcom Corporation 5 * Copyright 2005, Broadcom Corporation
6 * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de> 6 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
7 * Copyright 2006, 2007, Felix Fietkau <nbd@openwrt.org> 7 * Copyright 2006, 2007, Felix Fietkau <nbd@openwrt.org>
8 * Copyright 2007, Aurelien Jarno <aurelien@aurel32.net> 8 * Copyright 2007, Aurelien Jarno <aurelien@aurel32.net>
9 * 9 *
diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c
index d75890909222..3adb98dad70c 100644
--- a/drivers/ssb/driver_gige.c
+++ b/drivers/ssb/driver_gige.c
@@ -3,7 +3,7 @@
3 * Broadcom Gigabit Ethernet core driver 3 * Broadcom Gigabit Ethernet core driver
4 * 4 *
5 * Copyright 2008, Broadcom Corporation 5 * Copyright 2008, Broadcom Corporation
6 * Copyright 2008, Michael Buesch <mb@bu3sch.de> 6 * Copyright 2008, Michael Buesch <m@bues.ch>
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
9 */ 9 */
diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c
index 97efce184a8f..ced501568594 100644
--- a/drivers/ssb/driver_mipscore.c
+++ b/drivers/ssb/driver_mipscore.c
@@ -3,7 +3,7 @@
3 * Broadcom MIPS core driver 3 * Broadcom MIPS core driver
4 * 4 *
5 * Copyright 2005, Broadcom Corporation 5 * Copyright 2005, Broadcom Corporation
6 * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de> 6 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
9 */ 9 */
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
index 11d85bfd774e..e6ac3177fbbe 100644
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -3,7 +3,7 @@
3 * Broadcom PCI-core driver 3 * Broadcom PCI-core driver
4 * 4 *
5 * Copyright 2005, Broadcom Corporation 5 * Copyright 2005, Broadcom Corporation
6 * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de> 6 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
9 */ 9 */
diff --git a/drivers/ssb/embedded.c b/drivers/ssb/embedded.c
index a0e0d246b592..eec3e267be4d 100644
--- a/drivers/ssb/embedded.c
+++ b/drivers/ssb/embedded.c
@@ -3,7 +3,7 @@
3 * Embedded systems support code 3 * Embedded systems support code
4 * 4 *
5 * Copyright 2005-2008, Broadcom Corporation 5 * Copyright 2005-2008, Broadcom Corporation
6 * Copyright 2006-2008, Michael Buesch <mb@bu3sch.de> 6 * Copyright 2006-2008, Michael Buesch <m@bues.ch>
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
9 */ 9 */
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 6ec6e099fe04..29c7d4f9d1ae 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -3,7 +3,7 @@
3 * Subsystem core 3 * Subsystem core
4 * 4 *
5 * Copyright 2005, Broadcom Corporation 5 * Copyright 2005, Broadcom Corporation
6 * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de> 6 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
9 */ 9 */
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index a00b35f03084..34c3bab90b9a 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Sonics Silicon Backplane PCI-Hostbus related functions. 2 * Sonics Silicon Backplane PCI-Hostbus related functions.
3 * 3 *
4 * Copyright (C) 2005-2006 Michael Buesch <mb@bu3sch.de> 4 * Copyright (C) 2005-2006 Michael Buesch <m@bues.ch>
5 * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de> 5 * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
6 * Copyright (C) 2005 Stefano Brivio <st3@riseup.net> 6 * Copyright (C) 2005 Stefano Brivio <st3@riseup.net>
7 * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org> 7 * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c
index d7a98131ebf3..116a8116984b 100644
--- a/drivers/ssb/pcihost_wrapper.c
+++ b/drivers/ssb/pcihost_wrapper.c
@@ -6,7 +6,7 @@
6 * Copyright (c) 2005 Stefano Brivio <st3@riseup.net> 6 * Copyright (c) 2005 Stefano Brivio <st3@riseup.net>
7 * Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org> 7 * Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
8 * Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch> 8 * Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
9 * Copyright (c) 2005-2007 Michael Buesch <mbuesch@freenet.de> 9 * Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
10 * 10 *
11 * Licensed under the GNU/GPL. See COPYING for details. 11 * Licensed under the GNU/GPL. See COPYING for details.
12 */ 12 */
diff --git a/drivers/ssb/pcmcia.c b/drivers/ssb/pcmcia.c
index f8533795ee7f..c821c6b2a6a0 100644
--- a/drivers/ssb/pcmcia.c
+++ b/drivers/ssb/pcmcia.c
@@ -3,7 +3,7 @@
3 * PCMCIA-Hostbus related functions 3 * PCMCIA-Hostbus related functions
4 * 4 *
5 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> 5 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2007-2008 Michael Buesch <mb@bu3sch.de> 6 * Copyright 2007-2008 Michael Buesch <m@bues.ch>
7 * 7 *
8 * Licensed under the GNU/GPL. See COPYING for details. 8 * Licensed under the GNU/GPL. See COPYING for details.
9 */ 9 */
diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
index 8047f9aaa4b2..3e844874631f 100644
--- a/drivers/ssb/scan.c
+++ b/drivers/ssb/scan.c
@@ -2,7 +2,7 @@
2 * Sonics Silicon Backplane 2 * Sonics Silicon Backplane
3 * Bus scanning 3 * Bus scanning
4 * 4 *
5 * Copyright (C) 2005-2007 Michael Buesch <mb@bu3sch.de> 5 * Copyright (C) 2005-2007 Michael Buesch <m@bues.ch>
6 * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de> 6 * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
7 * Copyright (C) 2005 Stefano Brivio <st3@riseup.net> 7 * Copyright (C) 2005 Stefano Brivio <st3@riseup.net>
8 * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org> 8 * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
diff --git a/drivers/ssb/sdio.c b/drivers/ssb/sdio.c
index 65a6080cb02a..63fd709038ca 100644
--- a/drivers/ssb/sdio.c
+++ b/drivers/ssb/sdio.c
@@ -6,7 +6,7 @@
6 * 6 *
7 * Based on drivers/ssb/pcmcia.c 7 * Based on drivers/ssb/pcmcia.c
8 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> 8 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
9 * Copyright 2007-2008 Michael Buesch <mb@bu3sch.de> 9 * Copyright 2007-2008 Michael Buesch <m@bues.ch>
10 * 10 *
11 * Licensed under the GNU/GPL. See COPYING for details. 11 * Licensed under the GNU/GPL. See COPYING for details.
12 * 12 *
diff --git a/drivers/ssb/sprom.c b/drivers/ssb/sprom.c
index 45ff0e3a3828..80d366fcf8d3 100644
--- a/drivers/ssb/sprom.c
+++ b/drivers/ssb/sprom.c
@@ -2,7 +2,7 @@
2 * Sonics Silicon Backplane 2 * Sonics Silicon Backplane
3 * Common SPROM support routines 3 * Common SPROM support routines
4 * 4 *
5 * Copyright (C) 2005-2008 Michael Buesch <mb@bu3sch.de> 5 * Copyright (C) 2005-2008 Michael Buesch <m@bues.ch>
6 * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de> 6 * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
7 * Copyright (C) 2005 Stefano Brivio <st3@riseup.net> 7 * Copyright (C) 2005 Stefano Brivio <st3@riseup.net>
8 * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org> 8 * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
index 22453b0873e4..11dc39c6987a 100644
--- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
+++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
@@ -52,7 +52,6 @@
52#include "aggr_recv_api.h" 52#include "aggr_recv_api.h"
53#include <host_version.h> 53#include <host_version.h>
54#include <linux/rtnetlink.h> 54#include <linux/rtnetlink.h>
55#include <linux/init.h>
56#include <linux/moduleparam.h> 55#include <linux/moduleparam.h>
57#include "ar6000_api.h" 56#include "ar6000_api.h"
58#ifdef CONFIG_HOST_TCMD_SUPPORT 57#ifdef CONFIG_HOST_TCMD_SUPPORT
diff --git a/drivers/staging/bcm/headers.h b/drivers/staging/bcm/headers.h
index 1148e5e22eb9..8fe8d2b1f627 100644
--- a/drivers/staging/bcm/headers.h
+++ b/drivers/staging/bcm/headers.h
@@ -20,25 +20,23 @@
20#include <linux/file.h> 20#include <linux/file.h>
21#include <linux/string.h> 21#include <linux/string.h>
22#include <linux/etherdevice.h> 22#include <linux/etherdevice.h>
23#include <net/ip.h>
24#include <linux/wait.h> 23#include <linux/wait.h>
25#include <linux/proc_fs.h> 24#include <linux/proc_fs.h>
26#include <linux/interrupt.h> 25#include <linux/interrupt.h>
27
28#include <linux/version.h> 26#include <linux/version.h>
29#include <linux/stddef.h> 27#include <linux/stddef.h>
30#include <linux/kernel.h>
31#include <linux/stat.h> 28#include <linux/stat.h>
32#include <linux/fcntl.h> 29#include <linux/fcntl.h>
33#include <linux/unistd.h> 30#include <linux/unistd.h>
34#include <linux/sched.h> 31#include <linux/sched.h>
35#include <linux/mm.h> 32#include <linux/mm.h>
36#include <linux/pagemap.h> 33#include <linux/pagemap.h>
37#include <asm/uaccess.h>
38#include <linux/kthread.h> 34#include <linux/kthread.h>
39#include <linux/tcp.h> 35#include <linux/tcp.h>
40#include <linux/udp.h> 36#include <linux/udp.h>
41#include <linux/usb.h> 37#include <linux/usb.h>
38#include <asm/uaccess.h>
39#include <net/ip.h>
42 40
43#include "Typedefs.h" 41#include "Typedefs.h"
44#include "Version.h" 42#include "Version.h"
@@ -61,7 +59,6 @@
61#include "Queue.h" 59#include "Queue.h"
62#include "vendorspecificextn.h" 60#include "vendorspecificextn.h"
63 61
64
65#include "InterfaceMacros.h" 62#include "InterfaceMacros.h"
66#include "InterfaceAdapter.h" 63#include "InterfaceAdapter.h"
67#include "InterfaceIsr.h" 64#include "InterfaceIsr.h"
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index a71c6f8ee8a3..8cbfeae464b1 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -26,7 +26,6 @@
26#include BCMEMBEDIMAGE 26#include BCMEMBEDIMAGE
27#endif /* BCMEMBEDIMAGE */ 27#endif /* BCMEMBEDIMAGE */
28 28
29#include <bcmdefs.h>
30#include <bcmutils.h> 29#include <bcmutils.h>
31#include <bcmdevs.h> 30#include <bcmdevs.h>
32 31
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
index 996033cf9b09..d4bcc1edddb2 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
@@ -18,7 +18,6 @@
18#define _wl_cfg80211_h_ 18#define _wl_cfg80211_h_
19 19
20#include <linux/wireless.h> 20#include <linux/wireless.h>
21#include <linux/wireless.h>
22#include <net/cfg80211.h> 21#include <net/cfg80211.h>
23#include <wlioctl.h> 22#include <wlioctl.h>
24 23
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
index 35eec917f232..53e6a10655e1 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
@@ -20,21 +20,16 @@
20#include <linux/netdevice.h> 20#include <linux/netdevice.h>
21#include <linux/hardirq.h> 21#include <linux/hardirq.h>
22#include <wlioctl.h> 22#include <wlioctl.h>
23
24#include <bcmutils.h> 23#include <bcmutils.h>
25
26#include <linux/if_arp.h> 24#include <linux/if_arp.h>
27#include <asm/uaccess.h> 25#include <asm/uaccess.h>
26#include <linux/ieee80211.h>
28 27
29#include <dngl_stats.h> 28#include <dngl_stats.h>
30#include <dhd.h> 29#include <dhd.h>
31#include <dhdioctl.h> 30#include <dhdioctl.h>
32#include <linux/ieee80211.h>
33typedef const struct si_pub si_t;
34#include <wlioctl.h>
35 31
36#include <dngl_stats.h> 32typedef const struct si_pub si_t;
37#include <dhd.h>
38 33
39#define WL_ERROR(fmt, args...) printk(fmt, ##args) 34#define WL_ERROR(fmt, args...) printk(fmt, ##args)
40#define WL_TRACE(fmt, args...) no_printk(fmt, ##args) 35#define WL_TRACE(fmt, args...) no_printk(fmt, ##args)
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 359e73741c48..b3324d609c8b 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -24,7 +24,6 @@
24#include <linux/hiddev.h> 24#include <linux/hiddev.h>
25#include <linux/pci.h> 25#include <linux/pci.h>
26#include <linux/dmi.h> 26#include <linux/dmi.h>
27#include <linux/delay.h>
28 27
29#include "hyperv.h" 28#include "hyperv.h"
30 29
diff --git a/drivers/staging/hv/tools/hv_kvp_daemon.c b/drivers/staging/hv/tools/hv_kvp_daemon.c
index 33f0f1c8ad73..a4a407f7052a 100644
--- a/drivers/staging/hv/tools/hv_kvp_daemon.c
+++ b/drivers/staging/hv/tools/hv_kvp_daemon.c
@@ -35,7 +35,6 @@
35#include <arpa/inet.h> 35#include <arpa/inet.h>
36#include <linux/connector.h> 36#include <linux/connector.h>
37#include <linux/netlink.h> 37#include <linux/netlink.h>
38#include <sys/socket.h>
39#include <ifaddrs.h> 38#include <ifaddrs.h>
40#include <netdb.h> 39#include <netdb.h>
41#include <syslog.h> 40#include <syslog.h>
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 1a94364c48b5..72258e8c64ca 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -21,7 +21,6 @@
21#include <linux/semaphore.h> 21#include <linux/semaphore.h>
22#include <linux/list.h> 22#include <linux/list.h>
23#include <linux/notifier.h> 23#include <linux/notifier.h>
24#include <linux/workqueue.h>
25#include <linux/platform_device.h> 24#include <linux/platform_device.h>
26#include "nvec.h" 25#include "nvec.h"
27 26
diff --git a/drivers/staging/rtl8712/drv_types.h b/drivers/staging/rtl8712/drv_types.h
index 3bb66dc2eb2c..4f380a64aa85 100644
--- a/drivers/staging/rtl8712/drv_types.h
+++ b/drivers/staging/rtl8712/drv_types.h
@@ -29,7 +29,6 @@ struct qos_priv {
29 29
30#include "rtl871x_ht.h" 30#include "rtl871x_ht.h"
31#include "rtl871x_cmd.h" 31#include "rtl871x_cmd.h"
32#include "wlan_bssdef.h"
33#include "rtl871x_xmit.h" 32#include "rtl871x_xmit.h"
34#include "rtl871x_recv.h" 33#include "rtl871x_recv.h"
35#include "rtl871x_security.h" 34#include "rtl871x_security.h"
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h
index 3d3f73c5cd5b..505395cff282 100644
--- a/drivers/staging/rtl8712/osdep_service.h
+++ b/drivers/staging/rtl8712/osdep_service.h
@@ -22,7 +22,6 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/sched.h> 23#include <linux/sched.h>
24#include <linux/kref.h> 24#include <linux/kref.h>
25#include <linux/netdevice.h>
26#include <linux/skbuff.h> 25#include <linux/skbuff.h>
27#include <linux/usb.h> 26#include <linux/usb.h>
28#include <linux/usb/ch9.h> 27#include <linux/usb/ch9.h>
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index 52342c17eadd..848b4c57531d 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -50,7 +50,6 @@
50#include <linux/interrupt.h> 50#include <linux/interrupt.h>
51#include <linux/pagemap.h> 51#include <linux/pagemap.h>
52#include <asm/cacheflush.h> 52#include <asm/cacheflush.h>
53#include <linux/sched.h>
54#include <linux/delay.h> 53#include <linux/delay.h>
55#include <linux/jiffies.h> 54#include <linux/jiffies.h>
56#include <linux/rar_register.h> 55#include <linux/rar_register.h>
diff --git a/drivers/staging/usbip/userspace/src/utils.h b/drivers/staging/usbip/userspace/src/utils.h
index 6c29ae945212..991f662720bb 100644
--- a/drivers/staging/usbip/userspace/src/utils.h
+++ b/drivers/staging/usbip/userspace/src/utils.h
@@ -13,7 +13,6 @@
13#include <glib.h> 13#include <glib.h>
14#include <unistd.h> 14#include <unistd.h>
15#include <stdio.h> 15#include <stdio.h>
16#include <sys/types.h>
17#include <sys/stat.h> 16#include <sys/stat.h>
18#include <fcntl.h> 17#include <fcntl.h>
19#include <stdlib.h> 18#include <stdlib.h>
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
index a6bfb6deba94..09df38b4610c 100644
--- a/drivers/target/tcm_fc/tfc_cmd.c
+++ b/drivers/target/tcm_fc/tfc_cmd.c
@@ -45,7 +45,6 @@
45#include <target/target_core_device.h> 45#include <target/target_core_device.h>
46#include <target/target_core_tpg.h> 46#include <target/target_core_tpg.h>
47#include <target/target_core_configfs.h> 47#include <target/target_core_configfs.h>
48#include <target/target_core_base.h>
49#include <target/target_core_tmr.h> 48#include <target/target_core_tmr.h>
50#include <target/configfs_macros.h> 49#include <target/configfs_macros.h>
51 50
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
index d63e3dd3b180..8781d1e423df 100644
--- a/drivers/target/tcm_fc/tfc_conf.c
+++ b/drivers/target/tcm_fc/tfc_conf.c
@@ -48,7 +48,6 @@
48#include <target/target_core_device.h> 48#include <target/target_core_device.h>
49#include <target/target_core_tpg.h> 49#include <target/target_core_tpg.h>
50#include <target/target_core_configfs.h> 50#include <target/target_core_configfs.h>
51#include <target/target_core_base.h>
52#include <target/configfs_macros.h> 51#include <target/configfs_macros.h>
53 52
54#include "tcm_fc.h" 53#include "tcm_fc.h"
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
index 11e6483fc127..8e2a46ddcccb 100644
--- a/drivers/target/tcm_fc/tfc_io.c
+++ b/drivers/target/tcm_fc/tfc_io.c
@@ -54,7 +54,6 @@
54#include <target/target_core_device.h> 54#include <target/target_core_device.h>
55#include <target/target_core_tpg.h> 55#include <target/target_core_tpg.h>
56#include <target/target_core_configfs.h> 56#include <target/target_core_configfs.h>
57#include <target/target_core_base.h>
58#include <target/configfs_macros.h> 57#include <target/configfs_macros.h>
59 58
60#include "tcm_fc.h" 59#include "tcm_fc.h"
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c
index fbcbb3d1d06b..dbb5eaeee399 100644
--- a/drivers/target/tcm_fc/tfc_sess.c
+++ b/drivers/target/tcm_fc/tfc_sess.c
@@ -46,10 +46,8 @@
46#include <target/target_core_device.h> 46#include <target/target_core_device.h>
47#include <target/target_core_tpg.h> 47#include <target/target_core_tpg.h>
48#include <target/target_core_configfs.h> 48#include <target/target_core_configfs.h>
49#include <target/target_core_base.h>
50#include <target/configfs_macros.h> 49#include <target/configfs_macros.h>
51 50
52#include <scsi/libfc.h>
53#include "tcm_fc.h" 51#include "tcm_fc.h"
54 52
55static void ft_sess_delete_all(struct ft_tport *); 53static void ft_sess_delete_all(struct ft_tport *);
diff --git a/drivers/tty/serial/8250_pci.c b/drivers/tty/serial/8250_pci.c
index f41b4259ecdd..cf35e0dc5085 100644
--- a/drivers/tty/serial/8250_pci.c
+++ b/drivers/tty/serial/8250_pci.c
@@ -743,7 +743,7 @@ pci_ni8430_setup(struct serial_private *priv,
743 len = pci_resource_len(priv->dev, bar); 743 len = pci_resource_len(priv->dev, bar);
744 p = ioremap_nocache(base, len); 744 p = ioremap_nocache(base, len);
745 745
746 /* enable the transciever */ 746 /* enable the transceiver */
747 writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE, 747 writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE,
748 p + offset + NI8430_PORTCON); 748 p + offset + NI8430_PORTCON);
749 749
diff --git a/drivers/tty/serial/bfin_5xx.c b/drivers/tty/serial/bfin_5xx.c
index 9b1ff2b6bb37..ff6979181ac5 100644
--- a/drivers/tty/serial/bfin_5xx.c
+++ b/drivers/tty/serial/bfin_5xx.c
@@ -1304,8 +1304,7 @@ static int bfin_serial_probe(struct platform_device *pdev)
1304 goto out_error_free_peripherals; 1304 goto out_error_free_peripherals;
1305 } 1305 }
1306 1306
1307 uart->port.membase = ioremap(res->start, 1307 uart->port.membase = ioremap(res->start, resource_size(res));
1308 res->end - res->start);
1309 if (!uart->port.membase) { 1308 if (!uart->port.membase) {
1310 dev_err(&pdev->dev, "Cannot map uart IO\n"); 1309 dev_err(&pdev->dev, "Cannot map uart IO\n");
1311 ret = -ENXIO; 1310 ret = -ENXIO;
@@ -1483,7 +1482,7 @@ static int bfin_earlyprintk_probe(struct platform_device *pdev)
1483 } 1482 }
1484 1483
1485 bfin_earlyprintk_port.port.membase = ioremap(res->start, 1484 bfin_earlyprintk_port.port.membase = ioremap(res->start,
1486 res->end - res->start); 1485 resource_size(res));
1487 if (!bfin_earlyprintk_port.port.membase) { 1486 if (!bfin_earlyprintk_port.port.membase) {
1488 dev_err(&pdev->dev, "Cannot map uart IO\n"); 1487 dev_err(&pdev->dev, "Cannot map uart IO\n");
1489 ret = -ENXIO; 1488 ret = -ENXIO;
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index a54473123e0a..22fe801cce31 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -954,7 +954,7 @@ static void imx_release_port(struct uart_port *port)
954 struct resource *mmres; 954 struct resource *mmres;
955 955
956 mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0); 956 mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
957 release_mem_region(mmres->start, mmres->end - mmres->start + 1); 957 release_mem_region(mmres->start, resource_size(mmres));
958} 958}
959 959
960/* 960/*
@@ -970,8 +970,7 @@ static int imx_request_port(struct uart_port *port)
970 if (!mmres) 970 if (!mmres)
971 return -ENODEV; 971 return -ENODEV;
972 972
973 ret = request_mem_region(mmres->start, mmres->end - mmres->start + 1, 973 ret = request_mem_region(mmres->start, resource_size(mmres), "imx-uart");
974 "imx-uart");
975 974
976 return ret ? 0 : -EBUSY; 975 return ret ? 0 : -EBUSY;
977} 976}
diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c
index 84db7321cce8..8e07517f8acd 100644
--- a/drivers/tty/serial/m32r_sio.c
+++ b/drivers/tty/serial/m32r_sio.c
@@ -892,7 +892,7 @@ static int m32r_sio_request_port(struct uart_port *port)
892 * If we have a mapbase, then request that as well. 892 * If we have a mapbase, then request that as well.
893 */ 893 */
894 if (ret == 0 && up->port.flags & UPF_IOREMAP) { 894 if (ret == 0 && up->port.flags & UPF_IOREMAP) {
895 int size = res->end - res->start + 1; 895 int size = resource_size(res);
896 896
897 up->port.membase = ioremap(up->port.mapbase, size); 897 up->port.membase = ioremap(up->port.mapbase, size);
898 if (!up->port.membase) 898 if (!up->port.membase)
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 47cadf474149..c37df8d0fa28 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -1241,8 +1241,8 @@ static int serial_omap_probe(struct platform_device *pdev)
1241 return -ENODEV; 1241 return -ENODEV;
1242 } 1242 }
1243 1243
1244 if (!request_mem_region(mem->start, (mem->end - mem->start) + 1, 1244 if (!request_mem_region(mem->start, resource_size(mem),
1245 pdev->dev.driver->name)) { 1245 pdev->dev.driver->name)) {
1246 dev_err(&pdev->dev, "memory region already claimed\n"); 1246 dev_err(&pdev->dev, "memory region already claimed\n");
1247 return -EBUSY; 1247 return -EBUSY;
1248 } 1248 }
@@ -1308,7 +1308,7 @@ err:
1308 dev_err(&pdev->dev, "[UART%d]: failure [%s]: %d\n", 1308 dev_err(&pdev->dev, "[UART%d]: failure [%s]: %d\n",
1309 pdev->id, __func__, ret); 1309 pdev->id, __func__, ret);
1310do_release_region: 1310do_release_region:
1311 release_mem_region(mem->start, (mem->end - mem->start) + 1); 1311 release_mem_region(mem->start, resource_size(mem));
1312 return ret; 1312 return ret;
1313} 1313}
1314 1314
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index 4302e6e3768e..531931c1b250 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -803,7 +803,7 @@ static int serial_pxa_probe(struct platform_device *dev)
803 break; 803 break;
804 } 804 }
805 805
806 sport->port.membase = ioremap(mmres->start, mmres->end - mmres->start + 1); 806 sport->port.membase = ioremap(mmres->start, resource_size(mmres));
807 if (!sport->port.membase) { 807 if (!sport->port.membase) {
808 ret = -ENOMEM; 808 ret = -ENOMEM;
809 goto err_clk; 809 goto err_clk;
diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c
index 92aa54550e84..ad0f8f5f6ea1 100644
--- a/drivers/tty/serial/sunsu.c
+++ b/drivers/tty/serial/sunsu.c
@@ -1435,7 +1435,7 @@ static int __devinit su_probe(struct platform_device *op)
1435 1435
1436 rp = &op->resource[0]; 1436 rp = &op->resource[0];
1437 up->port.mapbase = rp->start; 1437 up->port.mapbase = rp->start;
1438 up->reg_size = (rp->end - rp->start) + 1; 1438 up->reg_size = resource_size(rp);
1439 up->port.membase = of_ioremap(rp, 0, up->reg_size, "su"); 1439 up->port.membase = of_ioremap(rp, 0, up->reg_size, "su");
1440 if (!up->port.membase) { 1440 if (!up->port.membase) {
1441 if (type != SU_PORT_PORT) 1441 if (type != SU_PORT_PORT)
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index 37fc4e3d487c..026cb9ea5cd1 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -573,8 +573,7 @@ static int __init vt8500_serial_probe(struct platform_device *pdev)
573 snprintf(vt8500_port->name, sizeof(vt8500_port->name), 573 snprintf(vt8500_port->name, sizeof(vt8500_port->name),
574 "VT8500 UART%d", pdev->id); 574 "VT8500 UART%d", pdev->id);
575 575
576 vt8500_port->uart.membase = ioremap(mmres->start, 576 vt8500_port->uart.membase = ioremap(mmres->start, resource_size(mmres));
577 mmres->end - mmres->start + 1);
578 if (!vt8500_port->uart.membase) { 577 if (!vt8500_port->uart.membase) {
579 ret = -ENOMEM; 578 ret = -ENOMEM;
580 goto err; 579 goto err;
diff --git a/drivers/uio/uio_pdrv.c b/drivers/uio/uio_pdrv.c
index 7d3e469b9904..bdc3db946122 100644
--- a/drivers/uio/uio_pdrv.c
+++ b/drivers/uio/uio_pdrv.c
@@ -58,7 +58,7 @@ static int uio_pdrv_probe(struct platform_device *pdev)
58 58
59 uiomem->memtype = UIO_MEM_PHYS; 59 uiomem->memtype = UIO_MEM_PHYS;
60 uiomem->addr = r->start; 60 uiomem->addr = r->start;
61 uiomem->size = r->end - r->start + 1; 61 uiomem->size = resource_size(r);
62 ++uiomem; 62 ++uiomem;
63 } 63 }
64 64
diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index 0f424af7f109..31e799d9efe5 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -137,7 +137,7 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
137 137
138 uiomem->memtype = UIO_MEM_PHYS; 138 uiomem->memtype = UIO_MEM_PHYS;
139 uiomem->addr = r->start; 139 uiomem->addr = r->start;
140 uiomem->size = r->end - r->start + 1; 140 uiomem->size = resource_size(r);
141 ++uiomem; 141 ++uiomem;
142 } 142 }
143 143
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index db1a659702ba..f045c8968a6e 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -272,7 +272,7 @@ static void usba_init_debugfs(struct usba_udc *udc)
272 272
273 regs_resource = platform_get_resource(udc->pdev, IORESOURCE_MEM, 273 regs_resource = platform_get_resource(udc->pdev, IORESOURCE_MEM,
274 CTRL_IOMEM_ID); 274 CTRL_IOMEM_ID);
275 regs->d_inode->i_size = regs_resource->end - regs_resource->start + 1; 275 regs->d_inode->i_size = resource_size(regs_resource);
276 udc->debugfs_regs = regs; 276 udc->debugfs_regs = regs;
277 277
278 usba_ep_init_debugfs(udc, to_usba_ep(udc->gadget.ep0)); 278 usba_ep_init_debugfs(udc, to_usba_ep(udc->gadget.ep0));
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index 4e4833168087..3e59035e6de8 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -2463,7 +2463,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
2463 } 2463 }
2464 2464
2465 if (pdata->operating_mode == FSL_USB2_DR_DEVICE) { 2465 if (pdata->operating_mode == FSL_USB2_DR_DEVICE) {
2466 if (!request_mem_region(res->start, res->end - res->start + 1, 2466 if (!request_mem_region(res->start, resource_size(res),
2467 driver_name)) { 2467 driver_name)) {
2468 ERR("request mem region for %s failed\n", pdev->name); 2468 ERR("request mem region for %s failed\n", pdev->name);
2469 ret = -EBUSY; 2469 ret = -EBUSY;
@@ -2605,7 +2605,7 @@ err_iounmap_noclk:
2605 iounmap(dr_regs); 2605 iounmap(dr_regs);
2606err_release_mem_region: 2606err_release_mem_region:
2607 if (pdata->operating_mode == FSL_USB2_DR_DEVICE) 2607 if (pdata->operating_mode == FSL_USB2_DR_DEVICE)
2608 release_mem_region(res->start, res->end - res->start + 1); 2608 release_mem_region(res->start, resource_size(res));
2609err_kfree: 2609err_kfree:
2610 kfree(udc_controller); 2610 kfree(udc_controller);
2611 udc_controller = NULL; 2611 udc_controller = NULL;
@@ -2640,7 +2640,7 @@ static int __exit fsl_udc_remove(struct platform_device *pdev)
2640 free_irq(udc_controller->irq, udc_controller); 2640 free_irq(udc_controller->irq, udc_controller);
2641 iounmap(dr_regs); 2641 iounmap(dr_regs);
2642 if (pdata->operating_mode == FSL_USB2_DR_DEVICE) 2642 if (pdata->operating_mode == FSL_USB2_DR_DEVICE)
2643 release_mem_region(res->start, res->end - res->start + 1); 2643 release_mem_region(res->start, resource_size(res));
2644 2644
2645 device_unregister(&udc_controller->gadget.dev); 2645 device_unregister(&udc_controller->gadget.dev);
2646 /* free udc --wait for the release() finished */ 2646 /* free udc --wait for the release() finished */
diff --git a/drivers/usb/gadget/pxa27x_udc.h b/drivers/usb/gadget/pxa27x_udc.h
index cd16231d8c73..b01696eab068 100644
--- a/drivers/usb/gadget/pxa27x_udc.h
+++ b/drivers/usb/gadget/pxa27x_udc.h
@@ -88,9 +88,9 @@
88#define UDCISR_INT_MASK (UDCICR_FIFOERR | UDCICR_PKTCOMPL) 88#define UDCISR_INT_MASK (UDCICR_FIFOERR | UDCICR_PKTCOMPL)
89 89
90#define UDCOTGICR_IESF (1 << 24) /* OTG SET_FEATURE command recvd */ 90#define UDCOTGICR_IESF (1 << 24) /* OTG SET_FEATURE command recvd */
91#define UDCOTGICR_IEXR (1 << 17) /* Extra Transciever Interrupt 91#define UDCOTGICR_IEXR (1 << 17) /* Extra Transceiver Interrupt
92 Rising Edge Interrupt Enable */ 92 Rising Edge Interrupt Enable */
93#define UDCOTGICR_IEXF (1 << 16) /* Extra Transciever Interrupt 93#define UDCOTGICR_IEXF (1 << 16) /* Extra Transceiver Interrupt
94 Falling Edge Interrupt Enable */ 94 Falling Edge Interrupt Enable */
95#define UDCOTGICR_IEVV40R (1 << 9) /* OTG Vbus Valid 4.0V Rising Edge 95#define UDCOTGICR_IEVV40R (1 << 9) /* OTG Vbus Valid 4.0V Rising Edge
96 Interrupt Enable */ 96 Interrupt Enable */
diff --git a/drivers/usb/host/ehci-ath79.c b/drivers/usb/host/ehci-ath79.c
index aa248c2f2c60..4d2e88d04dab 100644
--- a/drivers/usb/host/ehci-ath79.c
+++ b/drivers/usb/host/ehci-ath79.c
@@ -148,7 +148,7 @@ static int ehci_ath79_probe(struct platform_device *pdev)
148 return -ENOMEM; 148 return -ENOMEM;
149 149
150 hcd->rsrc_start = res->start; 150 hcd->rsrc_start = res->start;
151 hcd->rsrc_len = res->end - res->start + 1; 151 hcd->rsrc_len = resource_size(res);
152 152
153 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 153 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
154 dev_dbg(&pdev->dev, "controller already in use\n"); 154 dev_dbg(&pdev->dev, "controller already in use\n");
diff --git a/drivers/usb/host/ehci-cns3xxx.c b/drivers/usb/host/ehci-cns3xxx.c
index d41745c6f0c4..6536abdea6e6 100644
--- a/drivers/usb/host/ehci-cns3xxx.c
+++ b/drivers/usb/host/ehci-cns3xxx.c
@@ -107,7 +107,7 @@ static int cns3xxx_ehci_probe(struct platform_device *pdev)
107 } 107 }
108 108
109 hcd->rsrc_start = res->start; 109 hcd->rsrc_start = res->start;
110 hcd->rsrc_len = res->end - res->start + 1; 110 hcd->rsrc_len = resource_size(res);
111 111
112 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, 112 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
113 driver->description)) { 113 driver->description)) {
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index f380bf97e5af..34a3140d1e5f 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -100,7 +100,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
100 goto err2; 100 goto err2;
101 } 101 }
102 hcd->rsrc_start = res->start; 102 hcd->rsrc_start = res->start;
103 hcd->rsrc_len = res->end - res->start + 1; 103 hcd->rsrc_len = resource_size(res);
104 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, 104 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
105 driver->description)) { 105 driver->description)) {
106 dev_dbg(&pdev->dev, "controller already in use\n"); 106 dev_dbg(&pdev->dev, "controller already in use\n");
diff --git a/drivers/usb/host/ehci-grlib.c b/drivers/usb/host/ehci-grlib.c
index 93b230dc51a2..fdfd8c5b639b 100644
--- a/drivers/usb/host/ehci-grlib.c
+++ b/drivers/usb/host/ehci-grlib.c
@@ -130,7 +130,7 @@ static int __devinit ehci_hcd_grlib_probe(struct platform_device *op)
130 return -ENOMEM; 130 return -ENOMEM;
131 131
132 hcd->rsrc_start = res.start; 132 hcd->rsrc_start = res.start;
133 hcd->rsrc_len = res.end - res.start + 1; 133 hcd->rsrc_len = resource_size(&res);
134 134
135 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 135 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
136 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); 136 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c
index 50e600d26e28..c4460f3d009f 100644
--- a/drivers/usb/host/ehci-ixp4xx.c
+++ b/drivers/usb/host/ehci-ixp4xx.c
@@ -100,7 +100,7 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev)
100 goto fail_request_resource; 100 goto fail_request_resource;
101 } 101 }
102 hcd->rsrc_start = res->start; 102 hcd->rsrc_start = res->start;
103 hcd->rsrc_len = res->end - res->start + 1; 103 hcd->rsrc_len = resource_size(res);
104 104
105 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, 105 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
106 driver->description)) { 106 driver->description)) {
diff --git a/drivers/usb/host/ehci-octeon.c b/drivers/usb/host/ehci-octeon.c
index ff55757ba7d8..c3ba3ed5f3a6 100644
--- a/drivers/usb/host/ehci-octeon.c
+++ b/drivers/usb/host/ehci-octeon.c
@@ -124,7 +124,7 @@ static int ehci_octeon_drv_probe(struct platform_device *pdev)
124 return -ENOMEM; 124 return -ENOMEM;
125 125
126 hcd->rsrc_start = res_mem->start; 126 hcd->rsrc_start = res_mem->start;
127 hcd->rsrc_len = res_mem->end - res_mem->start + 1; 127 hcd->rsrc_len = resource_size(res_mem);
128 128
129 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, 129 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
130 OCTEON_EHCI_HCD_NAME)) { 130 OCTEON_EHCI_HCD_NAME)) {
diff --git a/drivers/usb/host/ehci-pmcmsp.c b/drivers/usb/host/ehci-pmcmsp.c
index cd69099cda19..e8d54de44acc 100644
--- a/drivers/usb/host/ehci-pmcmsp.c
+++ b/drivers/usb/host/ehci-pmcmsp.c
@@ -124,7 +124,7 @@ static int usb_hcd_msp_map_regs(struct mspusb_device *dev)
124 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 124 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
125 if (res == NULL) 125 if (res == NULL)
126 return -ENOMEM; 126 return -ENOMEM;
127 res_len = res->end - res->start + 1; 127 res_len = resource_size(res);
128 if (!request_mem_region(res->start, res_len, "mab regs")) 128 if (!request_mem_region(res->start, res_len, "mab regs"))
129 return -EBUSY; 129 return -EBUSY;
130 130
@@ -140,7 +140,7 @@ static int usb_hcd_msp_map_regs(struct mspusb_device *dev)
140 retval = -ENOMEM; 140 retval = -ENOMEM;
141 goto err2; 141 goto err2;
142 } 142 }
143 res_len = res->end - res->start + 1; 143 res_len = resource_size(res);
144 if (!request_mem_region(res->start, res_len, "usbid regs")) { 144 if (!request_mem_region(res->start, res_len, "usbid regs")) {
145 retval = -EBUSY; 145 retval = -EBUSY;
146 goto err2; 146 goto err2;
@@ -154,13 +154,13 @@ static int usb_hcd_msp_map_regs(struct mspusb_device *dev)
154 return 0; 154 return 0;
155err3: 155err3:
156 res = platform_get_resource(pdev, IORESOURCE_MEM, 2); 156 res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
157 res_len = res->end - res->start + 1; 157 res_len = resource_size(res);
158 release_mem_region(res->start, res_len); 158 release_mem_region(res->start, res_len);
159err2: 159err2:
160 iounmap(dev->mab_regs); 160 iounmap(dev->mab_regs);
161err1: 161err1:
162 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 162 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
163 res_len = res->end - res->start + 1; 163 res_len = resource_size(res);
164 release_mem_region(res->start, res_len); 164 release_mem_region(res->start, res_len);
165 dev_err(&pdev->dev, "Failed to map non-EHCI regs.\n"); 165 dev_err(&pdev->dev, "Failed to map non-EHCI regs.\n");
166 return retval; 166 return retval;
@@ -194,7 +194,7 @@ int usb_hcd_msp_probe(const struct hc_driver *driver,
194 goto err1; 194 goto err1;
195 } 195 }
196 hcd->rsrc_start = res->start; 196 hcd->rsrc_start = res->start;
197 hcd->rsrc_len = res->end - res->start + 1; 197 hcd->rsrc_len = resource_size(res);
198 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, dev->name)) { 198 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, dev->name)) {
199 retval = -EBUSY; 199 retval = -EBUSY;
200 goto err1; 200 goto err1;
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index 8552db6c29c9..41d11fe14252 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -130,7 +130,7 @@ static int __devinit ehci_hcd_ppc_of_probe(struct platform_device *op)
130 return -ENOMEM; 130 return -ENOMEM;
131 131
132 hcd->rsrc_start = res.start; 132 hcd->rsrc_start = res.start;
133 hcd->rsrc_len = res.end - res.start + 1; 133 hcd->rsrc_len = resource_size(&res);
134 134
135 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 135 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
136 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); 136 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
diff --git a/drivers/usb/host/ehci-w90x900.c b/drivers/usb/host/ehci-w90x900.c
index 52a027aaa370..d661cf7de140 100644
--- a/drivers/usb/host/ehci-w90x900.c
+++ b/drivers/usb/host/ehci-w90x900.c
@@ -41,7 +41,7 @@ static int __devinit usb_w90x900_probe(const struct hc_driver *driver,
41 } 41 }
42 42
43 hcd->rsrc_start = res->start; 43 hcd->rsrc_start = res->start;
44 hcd->rsrc_len = res->end - res->start + 1; 44 hcd->rsrc_len = resource_size(res);
45 45
46 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 46 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
47 retval = -EBUSY; 47 retval = -EBUSY;
diff --git a/drivers/usb/host/ehci-xilinx-of.c b/drivers/usb/host/ehci-xilinx-of.c
index a64d6d66d760..32793ce3d9e9 100644
--- a/drivers/usb/host/ehci-xilinx-of.c
+++ b/drivers/usb/host/ehci-xilinx-of.c
@@ -174,7 +174,7 @@ static int __devinit ehci_hcd_xilinx_of_probe(struct platform_device *op)
174 return -ENOMEM; 174 return -ENOMEM;
175 175
176 hcd->rsrc_start = res.start; 176 hcd->rsrc_start = res.start;
177 hcd->rsrc_len = res.end - res.start + 1; 177 hcd->rsrc_len = resource_size(&res);
178 178
179 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 179 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
180 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); 180 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index 19223c7449e1..572ea53b0226 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -605,7 +605,7 @@ static int __devinit of_fhci_probe(struct platform_device *ofdev)
605 goto err_regs; 605 goto err_regs;
606 } 606 }
607 607
608 hcd->regs = ioremap(usb_regs.start, usb_regs.end - usb_regs.start + 1); 608 hcd->regs = ioremap(usb_regs.start, resource_size(&usb_regs));
609 if (!hcd->regs) { 609 if (!hcd->regs) {
610 dev_err(dev, "could not ioremap regs\n"); 610 dev_err(dev, "could not ioremap regs\n");
611 ret = -ENOMEM; 611 ret = -ENOMEM;
diff --git a/drivers/usb/host/ohci-ath79.c b/drivers/usb/host/ohci-ath79.c
index ffea3e7cb0a8..c620c50f6770 100644
--- a/drivers/usb/host/ohci-ath79.c
+++ b/drivers/usb/host/ohci-ath79.c
@@ -93,8 +93,8 @@ static int ohci_ath79_probe(struct platform_device *pdev)
93 ret = -ENODEV; 93 ret = -ENODEV;
94 goto err_put_hcd; 94 goto err_put_hcd;
95 } 95 }
96 hcd->rsrc_start = res->start; 96 hcd->rsrc_start = res->start;
97 hcd->rsrc_len = res->end - res->start + 1; 97 hcd->rsrc_len = resource_size(res);
98 98
99 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 99 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
100 dev_dbg(&pdev->dev, "controller already in use\n"); 100 dev_dbg(&pdev->dev, "controller already in use\n");
diff --git a/drivers/usb/host/ohci-cns3xxx.c b/drivers/usb/host/ohci-cns3xxx.c
index f05ef87e934c..5a00a1e1c6ca 100644
--- a/drivers/usb/host/ohci-cns3xxx.c
+++ b/drivers/usb/host/ohci-cns3xxx.c
@@ -100,7 +100,7 @@ static int cns3xxx_ohci_probe(struct platform_device *pdev)
100 goto err1; 100 goto err1;
101 } 101 }
102 hcd->rsrc_start = res->start; 102 hcd->rsrc_start = res->start;
103 hcd->rsrc_len = res->end - res->start + 1; 103 hcd->rsrc_len = resource_size(res);
104 104
105 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, 105 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
106 driver->description)) { 106 driver->description)) {
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index d22fb4d577b7..6aca2c4453f7 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -322,7 +322,7 @@ static int usb_hcd_da8xx_probe(const struct hc_driver *driver,
322 goto err2; 322 goto err2;
323 } 323 }
324 hcd->rsrc_start = mem->start; 324 hcd->rsrc_start = mem->start;
325 hcd->rsrc_len = mem->end - mem->start + 1; 325 hcd->rsrc_len = resource_size(mem);
326 326
327 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 327 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
328 dev_dbg(&pdev->dev, "request_mem_region failed\n"); 328 dev_dbg(&pdev->dev, "request_mem_region failed\n");
diff --git a/drivers/usb/host/ohci-octeon.c b/drivers/usb/host/ohci-octeon.c
index e4ddfaf8870f..d8b45647d1dc 100644
--- a/drivers/usb/host/ohci-octeon.c
+++ b/drivers/usb/host/ohci-octeon.c
@@ -135,7 +135,7 @@ static int ohci_octeon_drv_probe(struct platform_device *pdev)
135 return -ENOMEM; 135 return -ENOMEM;
136 136
137 hcd->rsrc_start = res_mem->start; 137 hcd->rsrc_start = res_mem->start;
138 hcd->rsrc_len = res_mem->end - res_mem->start + 1; 138 hcd->rsrc_len = resource_size(res_mem);
139 139
140 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, 140 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
141 OCTEON_OHCI_HCD_NAME)) { 141 OCTEON_OHCI_HCD_NAME)) {
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 1ca1821320f4..0c12f4e14dcd 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -110,7 +110,7 @@ static int __devinit ohci_hcd_ppc_of_probe(struct platform_device *op)
110 return -ENOMEM; 110 return -ENOMEM;
111 111
112 hcd->rsrc_start = res.start; 112 hcd->rsrc_start = res.start;
113 hcd->rsrc_len = res.end - res.start + 1; 113 hcd->rsrc_len = resource_size(&res);
114 114
115 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 115 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
116 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); 116 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c
index 89e670e38c10..c0f595c44487 100644
--- a/drivers/usb/host/ohci-ppc-soc.c
+++ b/drivers/usb/host/ohci-ppc-soc.c
@@ -56,7 +56,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
56 if (!hcd) 56 if (!hcd)
57 return -ENOMEM; 57 return -ENOMEM;
58 hcd->rsrc_start = res->start; 58 hcd->rsrc_start = res->start;
59 hcd->rsrc_len = res->end - res->start + 1; 59 hcd->rsrc_len = resource_size(res);
60 60
61 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 61 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
62 pr_debug("%s: request_mem_region failed\n", __FILE__); 62 pr_debug("%s: request_mem_region failed\n", __FILE__);
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
index d8eb3bdafabb..4204d9720d23 100644
--- a/drivers/usb/host/ohci-sa1111.c
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -131,7 +131,7 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver,
131 if (!hcd) 131 if (!hcd)
132 return -ENOMEM; 132 return -ENOMEM;
133 hcd->rsrc_start = dev->res.start; 133 hcd->rsrc_start = dev->res.start;
134 hcd->rsrc_len = dev->res.end - dev->res.start + 1; 134 hcd->rsrc_len = resource_size(&dev->res);
135 135
136 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 136 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
137 dbg("request_mem_region failed"); 137 dbg("request_mem_region failed");
diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c
index 041d30f30c10..78918ca0da23 100644
--- a/drivers/usb/host/ohci-sm501.c
+++ b/drivers/usb/host/ohci-sm501.c
@@ -103,8 +103,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)
103 goto err0; 103 goto err0;
104 } 104 }
105 105
106 if (!request_mem_region(mem->start, mem->end - mem->start + 1, 106 if (!request_mem_region(mem->start, resource_size(mem), pdev->name)) {
107 pdev->name)) {
108 dev_err(dev, "request_mem_region failed\n"); 107 dev_err(dev, "request_mem_region failed\n");
109 retval = -EBUSY; 108 retval = -EBUSY;
110 goto err0; 109 goto err0;
@@ -126,7 +125,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)
126 125
127 if (!dma_declare_coherent_memory(dev, mem->start, 126 if (!dma_declare_coherent_memory(dev, mem->start,
128 mem->start - mem->parent->start, 127 mem->start - mem->parent->start,
129 (mem->end - mem->start) + 1, 128 resource_size(mem),
130 DMA_MEMORY_MAP | 129 DMA_MEMORY_MAP |
131 DMA_MEMORY_EXCLUSIVE)) { 130 DMA_MEMORY_EXCLUSIVE)) {
132 dev_err(dev, "cannot declare coherent memory\n"); 131 dev_err(dev, "cannot declare coherent memory\n");
@@ -149,7 +148,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)
149 } 148 }
150 149
151 hcd->rsrc_start = res->start; 150 hcd->rsrc_start = res->start;
152 hcd->rsrc_len = res->end - res->start + 1; 151 hcd->rsrc_len = resource_size(res);
153 152
154 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, pdev->name)) { 153 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, pdev->name)) {
155 dev_err(dev, "request_mem_region failed\n"); 154 dev_err(dev, "request_mem_region failed\n");
@@ -185,7 +184,7 @@ err3:
185err2: 184err2:
186 dma_release_declared_memory(dev); 185 dma_release_declared_memory(dev);
187err1: 186err1:
188 release_mem_region(mem->start, mem->end - mem->start + 1); 187 release_mem_region(mem->start, resource_size(mem));
189err0: 188err0:
190 return retval; 189 return retval;
191} 190}
@@ -201,7 +200,7 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev)
201 dma_release_declared_memory(&pdev->dev); 200 dma_release_declared_memory(&pdev->dev);
202 mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); 201 mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
203 if (mem) 202 if (mem)
204 release_mem_region(mem->start, mem->end - mem->start + 1); 203 release_mem_region(mem->start, resource_size(mem));
205 204
206 /* mask interrupts and disable power */ 205 /* mask interrupts and disable power */
207 206
diff --git a/drivers/usb/host/ohci-ssb.c b/drivers/usb/host/ohci-ssb.c
index 48ee6943bf35..c4aea3b8315e 100644
--- a/drivers/usb/host/ohci-ssb.c
+++ b/drivers/usb/host/ohci-ssb.c
@@ -2,7 +2,7 @@
2 * Sonics Silicon Backplane 2 * Sonics Silicon Backplane
3 * Broadcom USB-core OHCI driver 3 * Broadcom USB-core OHCI driver
4 * 4 *
5 * Copyright 2007 Michael Buesch <mb@bu3sch.de> 5 * Copyright 2007 Michael Buesch <m@bues.ch>
6 * 6 *
7 * Derived from the OHCI-PCI driver 7 * Derived from the OHCI-PCI driver
8 * Copyright 1999 Roman Weissgaerber 8 * Copyright 1999 Roman Weissgaerber
diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
index 3558491dd87d..57ad1271fc9b 100644
--- a/drivers/usb/host/ohci-tmio.c
+++ b/drivers/usb/host/ohci-tmio.c
@@ -208,13 +208,13 @@ static int __devinit ohci_hcd_tmio_drv_probe(struct platform_device *dev)
208 } 208 }
209 209
210 hcd->rsrc_start = regs->start; 210 hcd->rsrc_start = regs->start;
211 hcd->rsrc_len = regs->end - regs->start + 1; 211 hcd->rsrc_len = resource_size(regs);
212 212
213 tmio = hcd_to_tmio(hcd); 213 tmio = hcd_to_tmio(hcd);
214 214
215 spin_lock_init(&tmio->lock); 215 spin_lock_init(&tmio->lock);
216 216
217 tmio->ccr = ioremap(config->start, config->end - config->start + 1); 217 tmio->ccr = ioremap(config->start, resource_size(config));
218 if (!tmio->ccr) { 218 if (!tmio->ccr) {
219 ret = -ENOMEM; 219 ret = -ENOMEM;
220 goto err_ioremap_ccr; 220 goto err_ioremap_ccr;
@@ -228,7 +228,7 @@ static int __devinit ohci_hcd_tmio_drv_probe(struct platform_device *dev)
228 228
229 if (!dma_declare_coherent_memory(&dev->dev, sram->start, 229 if (!dma_declare_coherent_memory(&dev->dev, sram->start,
230 sram->start, 230 sram->start,
231 sram->end - sram->start + 1, 231 resource_size(sram),
232 DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE)) { 232 DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE)) {
233 ret = -EBUSY; 233 ret = -EBUSY;
234 goto err_dma_declare; 234 goto err_dma_declare;
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 5fbe997dc6df..dcd889803f0f 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -3828,7 +3828,7 @@ static int oxu_drv_probe(struct platform_device *pdev)
3828 return -ENODEV; 3828 return -ENODEV;
3829 } 3829 }
3830 memstart = res->start; 3830 memstart = res->start;
3831 memlen = res->end - res->start + 1; 3831 memlen = resource_size(res);
3832 dev_dbg(&pdev->dev, "MEM resource %lx-%lx\n", memstart, memlen); 3832 dev_dbg(&pdev->dev, "MEM resource %lx-%lx\n", memstart, memlen);
3833 if (!request_mem_region(memstart, memlen, 3833 if (!request_mem_region(memstart, memlen,
3834 oxu_hc_driver.description)) { 3834 oxu_hc_driver.description)) {
diff --git a/drivers/usb/host/uhci-grlib.c b/drivers/usb/host/uhci-grlib.c
index d01c1e227681..f7a62138e3e0 100644
--- a/drivers/usb/host/uhci-grlib.c
+++ b/drivers/usb/host/uhci-grlib.c
@@ -111,7 +111,7 @@ static int __devinit uhci_hcd_grlib_probe(struct platform_device *op)
111 return -ENOMEM; 111 return -ENOMEM;
112 112
113 hcd->rsrc_start = res.start; 113 hcd->rsrc_start = res.start;
114 hcd->rsrc_len = res.end - res.start + 1; 114 hcd->rsrc_len = resource_size(&res);
115 115
116 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 116 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
117 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); 117 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
diff --git a/drivers/usb/host/whci/init.c b/drivers/usb/host/whci/init.c
index f7582e8e2169..d3e13b640d4b 100644
--- a/drivers/usb/host/whci/init.c
+++ b/drivers/usb/host/whci/init.c
@@ -178,7 +178,7 @@ void whc_clean_up(struct whc *whc)
178 if (whc->qset_pool) 178 if (whc->qset_pool)
179 dma_pool_destroy(whc->qset_pool); 179 dma_pool_destroy(whc->qset_pool);
180 180
181 len = whc->umc->resource.end - whc->umc->resource.start + 1; 181 len = resource_size(&whc->umc->resource);
182 if (whc->base) 182 if (whc->base)
183 iounmap(whc->base); 183 iounmap(whc->base);
184 if (whc->base_phys) 184 if (whc->base_phys)
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c
index b16bd3ce3915..2f41089cd854 100644
--- a/drivers/usb/misc/ftdi-elan.c
+++ b/drivers/usb/misc/ftdi-elan.c
@@ -187,7 +187,7 @@ struct usb_ftdi {
187 u32 controlreg; 187 u32 controlreg;
188 u8 response[4 + 1024]; 188 u8 response[4 + 1024];
189 int expected; 189 int expected;
190 int recieved; 190 int received;
191 int ed_found; 191 int ed_found;
192}; 192};
193#define kref_to_usb_ftdi(d) container_of(d, struct usb_ftdi, kref) 193#define kref_to_usb_ftdi(d) container_of(d, struct usb_ftdi, kref)
@@ -353,7 +353,7 @@ static void ftdi_elan_abandon_targets(struct usb_ftdi *ftdi)
353 mutex_lock(&ftdi->u132_lock); 353 mutex_lock(&ftdi->u132_lock);
354 } 354 }
355 } 355 }
356 ftdi->recieved = 0; 356 ftdi->received = 0;
357 ftdi->expected = 4; 357 ftdi->expected = 4;
358 ftdi->ed_found = 0; 358 ftdi->ed_found = 0;
359 mutex_unlock(&ftdi->u132_lock); 359 mutex_unlock(&ftdi->u132_lock);
@@ -411,7 +411,7 @@ static void ftdi_elan_flush_targets(struct usb_ftdi *ftdi)
411 } 411 }
412 } 412 }
413 } 413 }
414 ftdi->recieved = 0; 414 ftdi->received = 0;
415 ftdi->expected = 4; 415 ftdi->expected = 4;
416 ftdi->ed_found = 0; 416 ftdi->ed_found = 0;
417 mutex_unlock(&ftdi->u132_lock); 417 mutex_unlock(&ftdi->u132_lock);
@@ -447,7 +447,7 @@ static void ftdi_elan_cancel_targets(struct usb_ftdi *ftdi)
447 } 447 }
448 } 448 }
449 } 449 }
450 ftdi->recieved = 0; 450 ftdi->received = 0;
451 ftdi->expected = 4; 451 ftdi->expected = 4;
452 ftdi->ed_found = 0; 452 ftdi->ed_found = 0;
453 mutex_unlock(&ftdi->u132_lock); 453 mutex_unlock(&ftdi->u132_lock);
@@ -874,7 +874,7 @@ static char *have_ed_set_response(struct usb_ftdi *ftdi,
874 mutex_unlock(&ftdi->u132_lock); 874 mutex_unlock(&ftdi->u132_lock);
875 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response, 875 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
876 payload); 876 payload);
877 ftdi->recieved = 0; 877 ftdi->received = 0;
878 ftdi->expected = 4; 878 ftdi->expected = 4;
879 ftdi->ed_found = 0; 879 ftdi->ed_found = 0;
880 return ftdi->response; 880 return ftdi->response;
@@ -890,7 +890,7 @@ static char *have_ed_set_response(struct usb_ftdi *ftdi,
890 mutex_unlock(&ftdi->u132_lock); 890 mutex_unlock(&ftdi->u132_lock);
891 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response, 891 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
892 payload); 892 payload);
893 ftdi->recieved = 0; 893 ftdi->received = 0;
894 ftdi->expected = 4; 894 ftdi->expected = 4;
895 ftdi->ed_found = 0; 895 ftdi->ed_found = 0;
896 return ftdi->response; 896 return ftdi->response;
@@ -905,7 +905,7 @@ static char *have_ed_set_response(struct usb_ftdi *ftdi,
905 mutex_unlock(&ftdi->u132_lock); 905 mutex_unlock(&ftdi->u132_lock);
906 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response, 906 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
907 payload); 907 payload);
908 ftdi->recieved = 0; 908 ftdi->received = 0;
909 ftdi->expected = 4; 909 ftdi->expected = 4;
910 ftdi->ed_found = 0; 910 ftdi->ed_found = 0;
911 return ftdi->response; 911 return ftdi->response;
@@ -914,7 +914,7 @@ static char *have_ed_set_response(struct usb_ftdi *ftdi,
914 mutex_unlock(&ftdi->u132_lock); 914 mutex_unlock(&ftdi->u132_lock);
915 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response, 915 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
916 payload); 916 payload);
917 ftdi->recieved = 0; 917 ftdi->received = 0;
918 ftdi->expected = 4; 918 ftdi->expected = 4;
919 ftdi->ed_found = 0; 919 ftdi->ed_found = 0;
920 return ftdi->response; 920 return ftdi->response;
@@ -934,7 +934,7 @@ static char *have_ed_get_response(struct usb_ftdi *ftdi,
934 if (target->active) 934 if (target->active)
935 ftdi_elan_do_callback(ftdi, target, NULL, 0); 935 ftdi_elan_do_callback(ftdi, target, NULL, 0);
936 target->abandoning = 0; 936 target->abandoning = 0;
937 ftdi->recieved = 0; 937 ftdi->received = 0;
938 ftdi->expected = 4; 938 ftdi->expected = 4;
939 ftdi->ed_found = 0; 939 ftdi->ed_found = 0;
940 return ftdi->response; 940 return ftdi->response;
@@ -951,7 +951,7 @@ static char *have_ed_get_response(struct usb_ftdi *ftdi,
951*/ 951*/
952static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi) 952static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
953{ 953{
954 u8 *b = ftdi->response + ftdi->recieved; 954 u8 *b = ftdi->response + ftdi->received;
955 int bytes_read = 0; 955 int bytes_read = 0;
956 int retry_on_empty = 1; 956 int retry_on_empty = 1;
957 int retry_on_timeout = 3; 957 int retry_on_timeout = 3;
@@ -1043,11 +1043,11 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
1043 u8 c = ftdi->bulk_in_buffer[++ftdi->bulk_in_last]; 1043 u8 c = ftdi->bulk_in_buffer[++ftdi->bulk_in_last];
1044 bytes_read += 1; 1044 bytes_read += 1;
1045 ftdi->bulk_in_left -= 1; 1045 ftdi->bulk_in_left -= 1;
1046 if (ftdi->recieved == 0 && c == 0xFF) { 1046 if (ftdi->received == 0 && c == 0xFF) {
1047 goto have; 1047 goto have;
1048 } else 1048 } else
1049 *b++ = c; 1049 *b++ = c;
1050 if (++ftdi->recieved < ftdi->expected) { 1050 if (++ftdi->received < ftdi->expected) {
1051 goto have; 1051 goto have;
1052 } else if (ftdi->ed_found) { 1052 } else if (ftdi->ed_found) {
1053 int ed_number = (ftdi->response[0] >> 5) & 0x03; 1053 int ed_number = (ftdi->response[0] >> 5) & 0x03;
@@ -1069,7 +1069,7 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
1069 } 1069 }
1070 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response, 1070 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
1071 payload); 1071 payload);
1072 ftdi->recieved = 0; 1072 ftdi->received = 0;
1073 ftdi->expected = 4; 1073 ftdi->expected = 4;
1074 ftdi->ed_found = 0; 1074 ftdi->ed_found = 0;
1075 b = ftdi->response; 1075 b = ftdi->response;
@@ -1089,7 +1089,7 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
1089 *respond->value = data; 1089 *respond->value = data;
1090 *respond->result = 0; 1090 *respond->result = 0;
1091 complete(&respond->wait_completion); 1091 complete(&respond->wait_completion);
1092 ftdi->recieved = 0; 1092 ftdi->received = 0;
1093 ftdi->expected = 4; 1093 ftdi->expected = 4;
1094 ftdi->ed_found = 0; 1094 ftdi->ed_found = 0;
1095 b = ftdi->response; 1095 b = ftdi->response;
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index c71b0372786e..bcbd1aba961a 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1955,7 +1955,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
1955 * - initializes musb->xceiv, usually by otg_get_transceiver() 1955 * - initializes musb->xceiv, usually by otg_get_transceiver()
1956 * - stops powering VBUS 1956 * - stops powering VBUS
1957 * 1957 *
1958 * There are various transciever configurations. Blackfin, 1958 * There are various transceiver configurations. Blackfin,
1959 * DaVinci, TUSB60x0, and others integrate them. OMAP3 uses 1959 * DaVinci, TUSB60x0, and others integrate them. OMAP3 uses
1960 * external/discrete ones in various flavors (twl4030 family, 1960 * external/discrete ones in various flavors (twl4030 family,
1961 * isp1504, non-OTG, etc) mostly hooking up through ULPI. 1961 * isp1504, non-OTG, etc) mostly hooking up through ULPI.
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c
index 8c282258e1bd..ca9b690a7e40 100644
--- a/drivers/usb/otg/isp1301_omap.c
+++ b/drivers/usb/otg/isp1301_omap.c
@@ -660,7 +660,7 @@ static irqreturn_t omap_otg_irq(int irq, void *_isp)
660 int ret = IRQ_NONE; 660 int ret = IRQ_NONE;
661 struct isp1301 *isp = _isp; 661 struct isp1301 *isp = _isp;
662 662
663 /* update ISP1301 transciever from OTG controller */ 663 /* update ISP1301 transceiver from OTG controller */
664 if (otg_irq & OPRT_CHG) { 664 if (otg_irq & OPRT_CHG) {
665 omap_writew(OPRT_CHG, OTG_IRQ_SRC); 665 omap_writew(OPRT_CHG, OTG_IRQ_SRC);
666 isp1301_defer_work(isp, WORK_UPDATE_ISP); 666 isp1301_defer_work(isp, WORK_UPDATE_ISP);
@@ -755,7 +755,7 @@ static irqreturn_t omap_otg_irq(int irq, void *_isp)
755 omap_writew(A_VBUS_ERR, OTG_IRQ_SRC); 755 omap_writew(A_VBUS_ERR, OTG_IRQ_SRC);
756 ret = IRQ_HANDLED; 756 ret = IRQ_HANDLED;
757 757
758 /* switch driver; the transciever code activates it, 758 /* switch driver; the transceiver code activates it,
759 * ungating the udc clock or resuming OHCI. 759 * ungating the udc clock or resuming OHCI.
760 */ 760 */
761 } else if (otg_irq & DRIVER_SWITCH) { 761 } else if (otg_irq & DRIVER_SWITCH) {
diff --git a/drivers/usb/otg/otg_fsm.c b/drivers/usb/otg/otg_fsm.c
index b0cc422f2ff9..09117387d2a4 100644
--- a/drivers/usb/otg/otg_fsm.c
+++ b/drivers/usb/otg/otg_fsm.c
@@ -28,7 +28,6 @@
28#include <linux/usb.h> 28#include <linux/usb.h>
29#include <linux/usb/gadget.h> 29#include <linux/usb/gadget.h>
30#include <linux/usb/otg.h> 30#include <linux/usb/otg.h>
31#include <linux/types.h>
32 31
33#include "otg_fsm.h" 32#include "otg_fsm.h"
34 33
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index efeb4d1517ff..14f66c358629 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -166,7 +166,7 @@ struct twl4030_usb {
166}; 166};
167 167
168/* internal define on top of container_of */ 168/* internal define on top of container_of */
169#define xceiv_to_twl(x) container_of((x), struct twl4030_usb, otg); 169#define xceiv_to_twl(x) container_of((x), struct twl4030_usb, otg)
170 170
171/*-------------------------------------------------------------------------*/ 171/*-------------------------------------------------------------------------*/
172 172
diff --git a/drivers/uwb/uwbd.c b/drivers/uwb/uwbd.c
index 001c8b4020a8..bdcb13cc1d54 100644
--- a/drivers/uwb/uwbd.c
+++ b/drivers/uwb/uwbd.c
@@ -256,7 +256,7 @@ static void uwbd_event_handle(struct uwb_event *evt)
256 * UWB Daemon 256 * UWB Daemon
257 * 257 *
258 * Listens to all UWB notifications and takes care to track the state 258 * Listens to all UWB notifications and takes care to track the state
259 * of the UWB neighboorhood for the kernel. When we do a run, we 259 * of the UWB neighbourhood for the kernel. When we do a run, we
260 * spinlock, move the list to a private copy and release the 260 * spinlock, move the list to a private copy and release the
261 * lock. Hold it as little as possible. Not a conflict: it is 261 * lock. Hold it as little as possible. Not a conflict: it is
262 * guaranteed we own the events in the private list. 262 * guaranteed we own the events in the private list.
diff --git a/drivers/uwb/whc-rc.c b/drivers/uwb/whc-rc.c
index 70a004aa19db..3ae3c702500d 100644
--- a/drivers/uwb/whc-rc.c
+++ b/drivers/uwb/whc-rc.c
@@ -222,7 +222,7 @@ int whcrc_setup_rc_umc(struct whcrc *whcrc)
222 struct umc_dev *umc_dev = whcrc->umc_dev; 222 struct umc_dev *umc_dev = whcrc->umc_dev;
223 223
224 whcrc->area = umc_dev->resource.start; 224 whcrc->area = umc_dev->resource.start;
225 whcrc->rc_len = umc_dev->resource.end - umc_dev->resource.start + 1; 225 whcrc->rc_len = resource_size(&umc_dev->resource);
226 result = -EBUSY; 226 result = -EBUSY;
227 if (request_mem_region(whcrc->area, whcrc->rc_len, KBUILD_MODNAME) == NULL) { 227 if (request_mem_region(whcrc->area, whcrc->rc_len, KBUILD_MODNAME) == NULL) {
228 dev_err(dev, "can't request URC region (%zu bytes @ 0x%lx): %d\n", 228 dev_err(dev, "can't request URC region (%zu bytes @ 0x%lx): %d\n",
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 4484c721f0f9..817ab60f7537 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -906,7 +906,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
906 if (map) { 906 if (map) {
907 /* use a pre-allocated memory buffer */ 907 /* use a pre-allocated memory buffer */
908 info->fix.smem_start = map->start; 908 info->fix.smem_start = map->start;
909 info->fix.smem_len = map->end - map->start + 1; 909 info->fix.smem_len = resource_size(map);
910 if (!request_mem_region(info->fix.smem_start, 910 if (!request_mem_region(info->fix.smem_start,
911 info->fix.smem_len, pdev->name)) { 911 info->fix.smem_len, pdev->name)) {
912 ret = -EBUSY; 912 ret = -EBUSY;
@@ -932,7 +932,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
932 932
933 /* LCDC registers */ 933 /* LCDC registers */
934 info->fix.mmio_start = regs->start; 934 info->fix.mmio_start = regs->start;
935 info->fix.mmio_len = regs->end - regs->start + 1; 935 info->fix.mmio_len = resource_size(regs);
936 936
937 if (!request_mem_region(info->fix.mmio_start, 937 if (!request_mem_region(info->fix.mmio_start,
938 info->fix.mmio_len, pdev->name)) { 938 info->fix.mmio_len, pdev->name)) {
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index d7aaec5667bf..44bdce4242ad 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -3458,9 +3458,10 @@ static int __devinit atyfb_setup_generic(struct pci_dev *pdev,
3458 3458
3459 raddr = addr + 0x7ff000UL; 3459 raddr = addr + 0x7ff000UL;
3460 rrp = &pdev->resource[2]; 3460 rrp = &pdev->resource[2];
3461 if ((rrp->flags & IORESOURCE_MEM) && request_mem_region(rrp->start, rrp->end - rrp->start + 1, "atyfb")) { 3461 if ((rrp->flags & IORESOURCE_MEM) &&
3462 request_mem_region(rrp->start, resource_size(rrp), "atyfb")) {
3462 par->aux_start = rrp->start; 3463 par->aux_start = rrp->start;
3463 par->aux_size = rrp->end - rrp->start + 1; 3464 par->aux_size = resource_size(rrp);
3464 raddr = rrp->start; 3465 raddr = rrp->start;
3465 PRINTKI("using auxiliary register aperture\n"); 3466 PRINTKI("using auxiliary register aperture\n");
3466 } 3467 }
@@ -3550,7 +3551,7 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev,
3550 3551
3551 /* Reserve space */ 3552 /* Reserve space */
3552 res_start = rp->start; 3553 res_start = rp->start;
3553 res_size = rp->end - rp->start + 1; 3554 res_size = resource_size(rp);
3554 if (!request_mem_region(res_start, res_size, "atyfb")) 3555 if (!request_mem_region(res_start, res_size, "atyfb"))
3555 return -EBUSY; 3556 return -EBUSY;
3556 3557
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
index 34b2fc472fe8..01a8fde67f20 100644
--- a/drivers/video/au1100fb.c
+++ b/drivers/video/au1100fb.c
@@ -486,7 +486,7 @@ static int __devinit au1100fb_drv_probe(struct platform_device *dev)
486 } 486 }
487 487
488 au1100fb_fix.mmio_start = regs_res->start; 488 au1100fb_fix.mmio_start = regs_res->start;
489 au1100fb_fix.mmio_len = regs_res->end - regs_res->start + 1; 489 au1100fb_fix.mmio_len = resource_size(regs_res);
490 490
491 if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len, 491 if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len,
492 DRIVER_NAME)) { 492 DRIVER_NAME)) {
diff --git a/drivers/video/cobalt_lcdfb.c b/drivers/video/cobalt_lcdfb.c
index 42fe155aba0e..e02764319ff7 100644
--- a/drivers/video/cobalt_lcdfb.c
+++ b/drivers/video/cobalt_lcdfb.c
@@ -303,7 +303,7 @@ static int __devinit cobalt_lcdfb_probe(struct platform_device *dev)
303 return -EBUSY; 303 return -EBUSY;
304 } 304 }
305 305
306 info->screen_size = res->end - res->start + 1; 306 info->screen_size = resource_size(res);
307 info->screen_base = ioremap(res->start, info->screen_size); 307 info->screen_base = ioremap(res->start, info->screen_size);
308 info->fbops = &cobalt_lcd_fbops; 308 info->fbops = &cobalt_lcd_fbops;
309 info->fix = cobalt_lcdfb_fix; 309 info->fix = cobalt_lcdfb_fix;
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
index c225dcce89e7..9075bea55879 100644
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -709,11 +709,11 @@ static int __init control_of_init(struct device_node *dp)
709 709
710 /* Map in frame buffer and registers */ 710 /* Map in frame buffer and registers */
711 p->fb_orig_base = fb_res.start; 711 p->fb_orig_base = fb_res.start;
712 p->fb_orig_size = fb_res.end - fb_res.start + 1; 712 p->fb_orig_size = resource_size(&fb_res);
713 /* use the big-endian aperture (??) */ 713 /* use the big-endian aperture (??) */
714 p->frame_buffer_phys = fb_res.start + 0x800000; 714 p->frame_buffer_phys = fb_res.start + 0x800000;
715 p->control_regs_phys = reg_res.start; 715 p->control_regs_phys = reg_res.start;
716 p->control_regs_size = reg_res.end - reg_res.start + 1; 716 p->control_regs_size = resource_size(&reg_res);
717 717
718 if (!p->fb_orig_base || 718 if (!p->fb_orig_base ||
719 !request_mem_region(p->fb_orig_base,p->fb_orig_size,"controlfb")) { 719 !request_mem_region(p->fb_orig_base,p->fb_orig_size,"controlfb")) {
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c
index cbdb1bd77c21..40e5f17d1e4b 100644
--- a/drivers/video/ep93xx-fb.c
+++ b/drivers/video/ep93xx-fb.c
@@ -4,7 +4,7 @@
4 * Framebuffer support for the EP93xx series. 4 * Framebuffer support for the EP93xx series.
5 * 5 *
6 * Copyright (C) 2007 Bluewater Systems Ltd 6 * Copyright (C) 2007 Bluewater Systems Ltd
7 * Author: Ryan Mallon <ryan@bluewatersys.com> 7 * Author: Ryan Mallon
8 * 8 *
9 * Copyright (c) 2009 H Hartley Sweeten <hsweeten@visionengravers.com> 9 * Copyright (c) 2009 H Hartley Sweeten <hsweeten@visionengravers.com>
10 * 10 *
@@ -644,6 +644,6 @@ module_exit(ep93xxfb_exit);
644 644
645MODULE_DESCRIPTION("EP93XX Framebuffer Driver"); 645MODULE_DESCRIPTION("EP93XX Framebuffer Driver");
646MODULE_ALIAS("platform:ep93xx-fb"); 646MODULE_ALIAS("platform:ep93xx-fb");
647MODULE_AUTHOR("Ryan Mallon <ryan&bluewatersys.com>, " 647MODULE_AUTHOR("Ryan Mallon, "
648 "H Hartley Sweeten <hsweeten@visionengravers.com"); 648 "H Hartley Sweeten <hsweeten@visionengravers.com");
649MODULE_LICENSE("GPL"); 649MODULE_LICENSE("GPL");
diff --git a/drivers/video/i810/i810.h b/drivers/video/i810/i810.h
index f37de60ecc59..1414b73ac55b 100644
--- a/drivers/video/i810/i810.h
+++ b/drivers/video/i810/i810.h
@@ -137,7 +137,7 @@
137#define DRAM_ON 0x08 137#define DRAM_ON 0x08
138#define DRAM_OFF 0xE7 138#define DRAM_OFF 0xE7
139#define PG_ENABLE_MASK 0x01 139#define PG_ENABLE_MASK 0x01
140#define RING_SIZE_MASK (RINGBUFFER_SIZE - 1); 140#define RING_SIZE_MASK (RINGBUFFER_SIZE - 1)
141 141
142/* defines for restoring registers partially */ 142/* defines for restoring registers partially */
143#define ADDR_MAP_MASK (0x07 << 5) 143#define ADDR_MAP_MASK (0x07 << 5)
diff --git a/drivers/video/mb862xx/mb862xxfbdrv.c b/drivers/video/mb862xx/mb862xxfbdrv.c
index f70bd63b0187..ee1de3e26dec 100644
--- a/drivers/video/mb862xx/mb862xxfbdrv.c
+++ b/drivers/video/mb862xx/mb862xxfbdrv.c
@@ -697,7 +697,7 @@ static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev)
697 goto fbrel; 697 goto fbrel;
698 } 698 }
699 699
700 res_size = 1 + res.end - res.start; 700 res_size = resource_size(&res);
701 par->res = request_mem_region(res.start, res_size, DRV_NAME); 701 par->res = request_mem_region(res.start, res_size, DRV_NAME);
702 if (par->res == NULL) { 702 if (par->res == NULL) {
703 dev_err(dev, "Cannot claim framebuffer/mmio\n"); 703 dev_err(dev, "Cannot claim framebuffer/mmio\n");
@@ -787,7 +787,7 @@ static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev)
787{ 787{
788 struct fb_info *fbi = dev_get_drvdata(&ofdev->dev); 788 struct fb_info *fbi = dev_get_drvdata(&ofdev->dev);
789 struct mb862xxfb_par *par = fbi->par; 789 struct mb862xxfb_par *par = fbi->par;
790 resource_size_t res_size = 1 + par->res->end - par->res->start; 790 resource_size_t res_size = resource_size(par->res);
791 unsigned long reg; 791 unsigned long reg;
792 792
793 dev_dbg(fbi->dev, "%s release\n", fbi->fix.id); 793 dev_dbg(fbi->dev, "%s release\n", fbi->fix.id);
diff --git a/drivers/video/msm/mdp.c b/drivers/video/msm/mdp.c
index c3636d55a3c5..243d16f09b8a 100644
--- a/drivers/video/msm/mdp.c
+++ b/drivers/video/msm/mdp.c
@@ -406,8 +406,7 @@ int mdp_probe(struct platform_device *pdev)
406 goto error_get_irq; 406 goto error_get_irq;
407 } 407 }
408 408
409 mdp->base = ioremap(resource->start, 409 mdp->base = ioremap(resource->start, resource_size(resource));
410 resource->end - resource->start);
411 if (mdp->base == 0) { 410 if (mdp->base == 0) {
412 printk(KERN_ERR "msmfb: cannot allocate mdp regs!\n"); 411 printk(KERN_ERR "msmfb: cannot allocate mdp regs!\n");
413 ret = -ENOMEM; 412 ret = -ENOMEM;
diff --git a/drivers/video/msm/msm_fb.c b/drivers/video/msm/msm_fb.c
index ec351309e607..c6e3b4fcdd68 100644
--- a/drivers/video/msm/msm_fb.c
+++ b/drivers/video/msm/msm_fb.c
@@ -525,10 +525,9 @@ static int setup_fbmem(struct msmfb_info *msmfb, struct platform_device *pdev)
525 return -ENOMEM; 525 return -ENOMEM;
526 } 526 }
527 fb->fix.smem_start = resource->start; 527 fb->fix.smem_start = resource->start;
528 fb->fix.smem_len = resource->end - resource->start; 528 fb->fix.smem_len = resource_size(resource);
529 fbram = ioremap(resource->start, 529 fbram = ioremap(resource->start, resource_size(resource));
530 resource->end - resource->start); 530 if (fbram == NULL) {
531 if (fbram == 0) {
532 printk(KERN_ERR "msmfb: cannot allocate fbram!\n"); 531 printk(KERN_ERR "msmfb: cannot allocate fbram!\n");
533 return -ENOMEM; 532 return -ENOMEM;
534 } 533 }
diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c
index f838d9e277f0..0fff59782e45 100644
--- a/drivers/video/nuc900fb.c
+++ b/drivers/video/nuc900fb.c
@@ -551,7 +551,7 @@ static int __devinit nuc900fb_probe(struct platform_device *pdev)
551 551
552 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 552 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
553 553
554 size = (res->end - res->start) + 1; 554 size = resource_size(res);
555 fbi->mem = request_mem_region(res->start, size, pdev->name); 555 fbi->mem = request_mem_region(res->start, size, pdev->name);
556 if (fbi->mem == NULL) { 556 if (fbi->mem == NULL) {
557 dev_err(&pdev->dev, "failed to alloc memory region\n"); 557 dev_err(&pdev->dev, "failed to alloc memory region\n");
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
index ef532d9d3c99..f27ae16ead2e 100644
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -567,7 +567,7 @@ static int __devinit platinumfb_probe(struct platform_device* odev)
567 * northbridge and that can fail. Only request framebuffer 567 * northbridge and that can fail. Only request framebuffer
568 */ 568 */
569 if (!request_mem_region(pinfo->rsrc_fb.start, 569 if (!request_mem_region(pinfo->rsrc_fb.start,
570 pinfo->rsrc_fb.end - pinfo->rsrc_fb.start + 1, 570 resource_size(&pinfo->rsrc_fb),
571 "platinumfb framebuffer")) { 571 "platinumfb framebuffer")) {
572 printk(KERN_ERR "platinumfb: Can't request framebuffer !\n"); 572 printk(KERN_ERR "platinumfb: Can't request framebuffer !\n");
573 framebuffer_release(info); 573 framebuffer_release(info);
@@ -658,8 +658,7 @@ static int __devexit platinumfb_remove(struct platform_device* odev)
658 iounmap(pinfo->cmap_regs); 658 iounmap(pinfo->cmap_regs);
659 659
660 release_mem_region(pinfo->rsrc_fb.start, 660 release_mem_region(pinfo->rsrc_fb.start,
661 pinfo->rsrc_fb.end - 661 resource_size(&pinfo->rsrc_fb));
662 pinfo->rsrc_fb.start + 1);
663 662
664 release_mem_region(pinfo->cmap_regs_phys, 0x1000); 663 release_mem_region(pinfo->cmap_regs_phys, 0x1000);
665 664
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
index bb95ec56d25d..18ead6f0184d 100644
--- a/drivers/video/pxa168fb.c
+++ b/drivers/video/pxa168fb.c
@@ -662,7 +662,7 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev)
662 info->fix.ypanstep = 0; 662 info->fix.ypanstep = 0;
663 info->fix.ywrapstep = 0; 663 info->fix.ywrapstep = 0;
664 info->fix.mmio_start = res->start; 664 info->fix.mmio_start = res->start;
665 info->fix.mmio_len = res->end - res->start + 1; 665 info->fix.mmio_len = resource_size(res);
666 info->fix.accel = FB_ACCEL_NONE; 666 info->fix.accel = FB_ACCEL_NONE;
667 info->fbops = &pxa168fb_ops; 667 info->fbops = &pxa168fb_ops;
668 info->pseudo_palette = fbi->pseudo_palette; 668 info->pseudo_palette = fbi->pseudo_palette;
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
index 816a4fda04f5..087fc9960bb9 100644
--- a/drivers/video/udlfb.c
+++ b/drivers/video/udlfb.c
@@ -29,7 +29,6 @@
29#include <linux/slab.h> 29#include <linux/slab.h>
30#include <linux/prefetch.h> 30#include <linux/prefetch.h>
31#include <linux/delay.h> 31#include <linux/delay.h>
32#include <linux/prefetch.h>
33#include <video/udlfb.h> 32#include <video/udlfb.h>
34#include "edid.h" 33#include "edid.h"
35 34
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index cf43c80d27f6..53aa4430d86e 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -2016,7 +2016,7 @@ static int __init viafb_setup(void)
2016int __init viafb_init(void) 2016int __init viafb_init(void)
2017{ 2017{
2018 u32 dummy_x, dummy_y; 2018 u32 dummy_x, dummy_y;
2019 int r; 2019 int r = 0;
2020 2020
2021 if (machine_is_olpc()) 2021 if (machine_is_olpc())
2022 /* Apply XO-1.5-specific configuration. */ 2022 /* Apply XO-1.5-specific configuration. */
@@ -2039,7 +2039,7 @@ int __init viafb_init(void)
2039 printk(KERN_INFO 2039 printk(KERN_INFO
2040 "VIA Graphics Integration Chipset framebuffer %d.%d initializing\n", 2040 "VIA Graphics Integration Chipset framebuffer %d.%d initializing\n",
2041 VERSION_MAJOR, VERSION_MINOR); 2041 VERSION_MAJOR, VERSION_MINOR);
2042 return 0; 2042 return r;
2043} 2043}
2044 2044
2045void __exit viafb_exit(void) 2045void __exit viafb_exit(void)