mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 3/5, resend] USB: adjust PCI quirk handler section annotations
@ 2012-05-09  8:46 Jan Beulich
  2012-05-09 22:08 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2012-05-09  8:46 UTC (permalink / raw)
  To: sarah.a.sharp, gregkh; +Cc: linux-kernel, linux-usb

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@suse.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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/5, resend] USB: adjust PCI quirk handler section annotations
  2012-05-09  8:46 [PATCH 3/5, resend] USB: adjust PCI quirk handler section annotations Jan Beulich
@ 2012-05-09 22:08 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2012-05-09 22:08 UTC (permalink / raw)
  To: Jan Beulich; +Cc: sarah.a.sharp, linux-kernel, linux-usb

On Wed, May 09, 2012 at 09:46:55AM +0100, Jan Beulich wrote:
> 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@suse.com>

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-09 22:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-09  8:46 [PATCH 3/5, resend] USB: adjust PCI quirk handler section annotations Jan Beulich
2012-05-09 22:08 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®