diff options
Diffstat (limited to 'drivers/rtc/rtc-ds3232.c')
-rw-r--r-- | drivers/rtc/rtc-ds3232.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 16b89035d135..168bc27f1f5a 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -406,11 +406,10 @@ static irqreturn_t ds3232_irq(int irq, void *dev_id) { struct device *dev = dev_id; struct ds3232 *ds3232 = dev_get_drvdata(dev); - struct mutex *lock = &ds3232->rtc->ops_lock; int ret; int stat, control; - mutex_lock(lock); + rtc_lock(ds3232->rtc); ret = regmap_read(ds3232->regmap, DS3232_REG_SR, &stat); if (ret) @@ -448,7 +447,7 @@ static irqreturn_t ds3232_irq(int irq, void *dev_id) } unlock: - mutex_unlock(lock); + rtc_unlock(ds3232->rtc); return IRQ_HANDLED; } @@ -593,7 +592,7 @@ static const struct i2c_device_id ds3232_id[] = { }; MODULE_DEVICE_TABLE(i2c, ds3232_id); -static const struct of_device_id ds3232_of_match[] = { +static const __maybe_unused struct of_device_id ds3232_of_match[] = { { .compatible = "dallas,ds3232" }, { } }; |