mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: <sarah.a.sharp@linux.intel.com>, <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>
Subject: [PATCH 3/5, resend] USB: adjust PCI quirk handler section annotations
Date: Wed, 09 May 2012 09:46:55 +0100	[thread overview]
Message-ID: <4FAA4B1F0200007800082708@nat28.tlf.novell.com> (raw)

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




             reply	other threads:[~2012-05-09  9:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09  8:46 Jan Beulich [this message]
2012-05-09 22:08 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FAA4B1F0200007800082708@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sarah.a.sharp@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®