2010-11-09 01:12:57

by Axel Lin

[permalink] [raw]
Subject: [PATCH] USB: isp1362-hcd - fix section mismatch warning

Fix section mismatch warning by using "__devinit" annotation for isp1362_probe.

WARNING: drivers/usb/host/isp1362-hcd.o(.data+0x0): Section mismatch in reference from the variable isp1362_driver to the function .init.text:isp1362_probe()
The variable isp1362_driver references
the function __init isp1362_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Signed-off-by: Axel Lin <[email protected]>
---
drivers/usb/host/isp1362-hcd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 8196fa1..97cce59 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -2684,7 +2684,7 @@ static int __devexit isp1362_remove(struct platform_device *pdev)
return 0;
}

-static int __init isp1362_probe(struct platform_device *pdev)
+static int __devinit isp1362_probe(struct platform_device *pdev)
{
struct usb_hcd *hcd;
struct isp1362_hcd *isp1362_hcd;
--
1.7.2



2010-11-09 01:37:22

by Mike Frysinger

[permalink] [raw]
Subject: Re: [PATCH] USB: isp1362-hcd - fix section mismatch warning

On Mon, Nov 8, 2010 at 20:16, Axel Lin wrote:
> Fix section mismatch warning by using "__devinit" annotation for isp1362_probe.

odd that i hadnt noticed this yet in my randconfig compiles. looks
perfectly sane to me ... thanks !

Acked-by: Mike Frysinger <[email protected]>
-mike