Skip to content

Commit

Permalink
rtc: m41t80: move m41t80_rtc_mutex to the block where it is used
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
  • Loading branch information
Sebastian Andrzej Siewior authored and alexandrebelloni committed Mar 17, 2018
1 parent 965271d commit 76384f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-m41t80.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 76384f3

Please sign in to comment.