]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
Fix __init section mismatch in usb gadget driver
authorJoe Korty <joe.korty@ccur.com>
Wed, 25 May 2016 09:08:19 +0000 (14:38 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 5 Jul 2016 13:04:13 +0000 (06:04 -0700)
commit88b9e83434983a64faf6b479b95edaac1b68ac82
tree6d906a4e61770702d0cf0f457e8dc1a66df4cb03
parenta6e36e57fc628a7c5dd2c0721f0917e4c0308775
Fix __init section mismatch in usb gadget driver

gcc complains when __init variables or __init functions
are referenced from non-init code, as by the time the
non-init code is run, the __init variables and functions
it references might no longer exist.

Fix by removing the __init from the afunc_bind defition.
This allows it to be called from anywhere, anytime without
problem.

WARNING: drivers/usb/gadget/g_audio.o(.text+0x101c): Section
mismatch in reference from the function audio_bind_config()
to the function .init.text:afunc_bind()
The function audio_bind_config() references
the function __init afunc_bind().
This is often because audio_bind_config lacks a __init
annotation or the annotation of afunc_bind is wrong.

Bug 200187768

Change-Id: I3df30f66a100273b6b1d9b1a29a2ded022027690
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163919
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
drivers/usb/gadget/f_uac2.c