Skip to contentSkip to conversation

usb: musb: don't mark of_dev_auxdata as initdata

PATCH In review Arnd Bergmann 2 participants 2 messages Apr 25, 2017 – Apr 26, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: musb: don't mark of_dev_auxdata as initdata

The probe function is not __init since it can be called for deferred probing or when unbinding/rebinding the device, and therefore it must not reference objects in __initdata, as pointed out by this link time warning:

WARNING: drivers/usb/musb/da8xx.o(.text+0x9d4): Section mismatch in reference from the function da8xx_probe() to the (unknown reference) .init.data:(unknown)

This removes the annotation.

Fixes d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx")
---
 drivers/usb/musb/da8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/musb/da8xx.c +1 -1
index 5a8a031485ea..df88123274ca 100644
@@ -513,7 +513,7 @@ static const struct musb_hdrc_config da8xx_config = {
 	.multipoint = 1,
 };
 
-static struct of_dev_auxdata da8xx_auxdata_lookup[] __initdata = {
+static struct of_dev_auxdata da8xx_auxdata_lookup[] = {
 	OF_DEV_AUXDATA("ti,da830-cppi41", 0x01e01000, "cppi41-dmaengine",
 		       NULL),
 	{}
Signature · 1 line
2.9.0
#1 lore raw
Quoted 5 lines · Arnd Bergmann

The probe function is not __init since it can be called for deferred probing or when unbinding/rebinding the device, and therefore it must not reference objects in __initdata, as pointed out by this link time warning:

Quoted 7 lines

WARNING: drivers/usb/musb/da8xx.o(.text+0x9d4): Section mismatch in reference from the function da8xx_probe() to the (unknown reference) .init.data:(unknown)

This removes the annotation.

Fixes d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx")

Now applied as I think Bin is offline for a bit.

thanks,

greg k-h