platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock
PATCH 1/1 platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init().
Reported-by Hulk Robot <[email protected]>
Signed-off-by Ye Bin <[email protected]>
--- drivers/platform/chrome/cros_ec_lpc_mec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/chrome/cros_ec_lpc_mec.c +1 -2
@@ -14,7 +14,7 @@* This mutex must be held while accessing the EMI unit. We can't rely on the * EC mutex because memmap data may be accessed without it being held. */ -static struct mutex io_mutex; +static DEFINE_MUTEX (io_mutex);static u16 mec_emi_base, mec_emi_end;/**
@@ -142,7 +142,6 @@ EXPORT_SYMBOL(cros_ec_lpc_io_bytes_mec);void cros_ec_lpc_mec_init (unsigned int base,unsigned int end) { -mutex_init (&io_mutex); mec_emi_base = base; mec_emi_end = end; }
Enric Balletbo i Serra
AppliedQuoted 2 lines · Ye Bin
mutex lock can be initialized automatically with
DEFINE_MUTEX()rather than explicitly callingmutex_init().
Applied, thanks!
[1/1] platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock
commit: d61b3f9b91be32f714b218377ab5081932e3ebc2
Best regards,
Signature · 1 line
Enric Balletbo i Serra <[email protected]>