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 2014-03-02 21:25:32 +00:00
parent 1aa753817e
commit f13342ade4

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;