* [PATCH] rtc: m41t80: move m41t80_rtc_mutex to the block where it is used
@ 2018-02-09 18:05 Sebastian Andrzej Siewior
2018-02-25 20:11 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2018-02-09 18:05 UTC (permalink / raw)
To: linux-rtc; +Cc: Alessandro Zummo, Alexandre Belloni, Sebastian Andrzej Siewior
Without CONFIG_RTC_DRV_M41T80_WDT the compiler complains:
|drivers/rtc/rtc-m41t80.c:76 ‘m41t80_rtc_mutex’ defined but not used [-Wunused-variable]
Move the variable to the block where it is used.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/rtc/rtc-m41t80.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index c90fba3ed861..bd268f0d6073 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -73,7 +73,6 @@
#define M41T80_FEATURE_WD BIT(3) /* Extra watchdog resolution */
#define M41T80_FEATURE_SQ_ALT BIT(4) /* RSx bits are in reg 4 */
-static DEFINE_MUTEX(m41t80_rtc_mutex);
static const struct i2c_device_id m41t80_id[] = {
{ "m41t62", M41T80_FEATURE_SQ | M41T80_FEATURE_SQ_ALT },
{ "m41t65", M41T80_FEATURE_HT | M41T80_FEATURE_WD },
@@ -598,6 +597,7 @@ static struct clk *m41t80_sqw_register_clk(struct m41t80_data *m41t80)
*
*****************************************************************************
*/
+static DEFINE_MUTEX(m41t80_rtc_mutex);
static struct i2c_client *save_client;
/* Default margin */
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-25 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-09 18:05 [PATCH] rtc: m41t80: move m41t80_rtc_mutex to the block where it is used Sebastian Andrzej Siewior
2018-02-25 20:11 ` Alexandre Belloni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.