Add __attribute__((used)) so that the delay implementation doesn't get

optimized away as unreferenced, causing linker errors when trying to
resolve the weak reference to the missing function.
This commit is contained in:
Ian Lepore
2014-03-02 21:25:32 +00:00
parent f5a477a34b
commit 45b1c8bbda
+1
View File
@@ -370,6 +370,7 @@ DRIVER_MODULE(mp_tmr, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0);
* nothing
*/
static void
__attribute__((used)) /* Must emit function code for the weak ref below. */
arm_tmr_DELAY(int usec)
{
int32_t counts_per_usec;