From 010f8f1b07257938b44d032930919a061a03dbd0 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 23 Apr 2012 20:53:26 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4132 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/ext.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/os/hal/src/ext.c b/os/hal/src/ext.c index bd175d483..c53cd95fe 100644 --- a/os/hal/src/ext.c +++ b/os/hal/src/ext.c @@ -189,20 +189,17 @@ void extSetChannelModeI(EXTDriver *extp, chDbgCheck((extp != NULL) && (channel < EXT_MAX_CHANNELS) && (extcp != NULL), "extSetChannelModeI"); + chDbgAssert(extp->state == EXT_ACTIVE, + "extSetChannelModeI(), #1", "invalid state"); + /* Note that here the access is enforced as non-const, known access violation.*/ oldcp = (EXTChannelConfig *)&extp->config->channels[channel]; - chSysLock(); - - chDbgAssert(extp->state == EXT_ACTIVE, - "extSetChannelModeI(), #1", "invalid state"); - /* Overwiting the old channels configuration then the channel is reconfigured by the low level driver.*/ *oldcp = *extcp; ext_lld_channel_enable(extp, channel); - chSysUnlock(); } #endif /* HAL_USE_EXT */