[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <4FAA4B1F0200007800082708@nat28.tlf.novell.com>
Date: Wed, 09 May 2012 09:46:55 +0100
From: "Jan Beulich" <JBeulich@...e.com>
To: <sarah.a.sharp@...ux.intel.com>, <gregkh@...uxfoundation.org>
Cc: <linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>
Subject: [PATCH 3/5, resend] USB: adjust PCI quirk handler section
annotations
This is in preparation to adjust modpost to check section mismatches
on most of the .pci_fixup* sections:
.pci_fixup_final is only used from .init.text, and hence can (along
with the respective handler functions) reside in .init.*.
Several other .pci_fixup_* sections are needed only during boot and
suspend/resume, and can therefore be moved into .init.* if
!CONFIG_PM.
Handler (and eventual static data) section annotations need to/can be
changed accordingly.
Signed-off-by: Jan Beulich <jbeulich@...e.com>
---
drivers/usb/host/pci-quirks.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
--- 3.4-rc6/drivers/usb/host/pci-quirks.c
+++ 3.4-rc6-pci-fixup-sections/drivers/usb/host/pci-quirks.c
@@ -431,7 +431,7 @@ reset_needed:
}
EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc);
-static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask)
+static int __init io_type_enabled(struct pci_dev *pdev, unsigned int mask)
{
u16 cmd;
return !pci_read_config_word(pdev, PCI_COMMAND, &cmd) && (cmd & mask);
@@ -440,7 +440,7 @@ static inline int io_type_enabled(struct
#define pio_enabled(dev) io_type_enabled(dev, PCI_COMMAND_IO)
#define mmio_enabled(dev) io_type_enabled(dev, PCI_COMMAND_MEMORY)
-static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev)
+static void __init quirk_usb_handoff_uhci(struct pci_dev *pdev)
{
unsigned long base = 0;
int i;
@@ -458,12 +458,12 @@ static void __devinit quirk_usb_handoff_
uhci_check_and_reset_hc(pdev, base);
}
-static int __devinit mmio_resource_enabled(struct pci_dev *pdev, int idx)
+static int __init mmio_resource_enabled(struct pci_dev *pdev, int idx)
{
return pci_resource_start(pdev, idx) && mmio_enabled(pdev);
}
-static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
+static void __init quirk_usb_handoff_ohci(struct pci_dev *pdev)
{
void __iomem *base;
u32 control;
@@ -530,7 +530,7 @@ static void __devinit quirk_usb_handoff_
iounmap(base);
}
-static const struct dmi_system_id __devinitconst ehci_dmi_nohandoff_table[] = {
+static const struct dmi_system_id __initconst ehci_dmi_nohandoff_table[] = {
{
/* Pegatron Lucid (ExoPC) */
.matches = {
@@ -548,9 +548,9 @@ static const struct dmi_system_id __devi
{ }
};
-static void __devinit ehci_bios_handoff(struct pci_dev *pdev,
- void __iomem *op_reg_base,
- u32 cap, u8 offset)
+static void __init ehci_bios_handoff(struct pci_dev *pdev,
+ void __iomem *op_reg_base,
+ u32 cap, u8 offset)
{
int try_handoff = 1, tried_handoff = 0;
@@ -616,7 +616,7 @@ static void __devinit ehci_bios_handoff(
writel(0, op_reg_base + EHCI_CONFIGFLAG);
}
-static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
+static void __init quirk_usb_disable_ehci(struct pci_dev *pdev)
{
void __iomem *base, *op_reg_base;
u32 hcc_params, cap, val;
@@ -696,8 +696,8 @@ static void __devinit quirk_usb_disable_
* Returns -ETIMEDOUT if this condition is not true after
* wait_usec microseconds have passed.
*/
-static int handshake(void __iomem *ptr, u32 mask, u32 done,
- int wait_usec, int delay_usec)
+static int __init handshake(void __iomem *ptr, u32 mask, u32 done,
+ int wait_usec, int delay_usec)
{
u32 result;
@@ -778,7 +778,7 @@ EXPORT_SYMBOL_GPL(usb_enable_xhci_ports)
* and then waits 5 seconds for the BIOS to hand over control.
* If we timeout, assume the BIOS is broken and take control anyway.
*/
-static void __devinit quirk_usb_handoff_xhci(struct pci_dev *pdev)
+static void __init quirk_usb_handoff_xhci(struct pci_dev *pdev)
{
void __iomem *base;
int ext_cap_offset;
@@ -869,7 +869,7 @@ hc_init:
iounmap(base);
}
-static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
+static void __init quirk_usb_early_handoff(struct pci_dev *pdev)
{
/* Skip Netlogic mips SoC's internal PCI USB controller.
* This device does not need/support EHCI/OHCI handoff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists