diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-03-14 16:34:35 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-03-14 16:34:35 +0100 |
commit | b470ebc9e0e57f53d1db9c49b8a3de4086babd05 (patch) | |
tree | 95c61291ad5f216967a9be36f19774026ffc88cb /drivers/rtc/rtc-rx8010.c | |
parent | genirq: Prevent [devm_]irq_alloc_desc from returning irq 0 (diff) | |
parent | irqchip/ingenic: Add support for the JZ4760 (diff) | |
download | linux-b470ebc9e0e57f53d1db9c49b8a3de4086babd05.tar.xz linux-b470ebc9e0e57f53d1db9c49b8a3de4086babd05.zip |
Merge tag 'irqchip-fixes-5.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Pull irqchip fixes from Marc Zyngier:
- More compatible strings for the Ingenic irqchip (introducing the
JZ4760B SoC)
- Select GENERIC_IRQ_MULTI_HANDLER on the ARM ep93xx platform
- Drop all GENERIC_IRQ_MULTI_HANDLER selections from the irqchip
Kconfig, now relying on the architecture to get it right
- Drop the debugfs_file field from struct irq_domain, now that
debugfs can track things on its own
Diffstat (limited to 'drivers/rtc/rtc-rx8010.c')
-rw-r--r-- | drivers/rtc/rtc-rx8010.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/rtc/rtc-rx8010.c b/drivers/rtc/rtc-rx8010.c index 8340ab47a059..d09056570739 100644 --- a/drivers/rtc/rtc-rx8010.c +++ b/drivers/rtc/rtc-rx8010.c @@ -55,7 +55,7 @@ static const struct i2c_device_id rx8010_id[] = { }; MODULE_DEVICE_TABLE(i2c, rx8010_id); -static const struct of_device_id rx8010_of_match[] = { +static const __maybe_unused struct of_device_id rx8010_of_match[] = { { .compatible = "epson,rx8010" }, { } }; @@ -73,11 +73,11 @@ static irqreturn_t rx8010_irq_1_handler(int irq, void *dev_id) struct rx8010_data *rx8010 = i2c_get_clientdata(client); int flagreg, err; - mutex_lock(&rx8010->rtc->ops_lock); + rtc_lock(rx8010->rtc); err = regmap_read(rx8010->regs, RX8010_FLAG, &flagreg); if (err) { - mutex_unlock(&rx8010->rtc->ops_lock); + rtc_unlock(rx8010->rtc); return IRQ_NONE; } @@ -100,7 +100,7 @@ static irqreturn_t rx8010_irq_1_handler(int irq, void *dev_id) } err = regmap_write(rx8010->regs, RX8010_FLAG, flagreg); - mutex_unlock(&rx8010->rtc->ops_lock); + rtc_unlock(rx8010->rtc); return err ? IRQ_NONE : IRQ_HANDLED; } @@ -354,13 +354,7 @@ static int rx8010_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) } } -static const struct rtc_class_ops rx8010_rtc_ops_default = { - .read_time = rx8010_get_time, - .set_time = rx8010_set_time, - .ioctl = rx8010_ioctl, -}; - -static const struct rtc_class_ops rx8010_rtc_ops_alarm = { +static const struct rtc_class_ops rx8010_rtc_ops = { .read_time = rx8010_get_time, .set_time = rx8010_set_time, .ioctl = rx8010_ioctl, @@ -409,12 +403,11 @@ static int rx8010_probe(struct i2c_client *client) dev_err(dev, "unable to request IRQ\n"); return err; } - - rx8010->rtc->ops = &rx8010_rtc_ops_alarm; } else { - rx8010->rtc->ops = &rx8010_rtc_ops_default; + clear_bit(RTC_FEATURE_ALARM, rx8010->rtc->features); } + rx8010->rtc->ops = &rx8010_rtc_ops; rx8010->rtc->max_user_freq = 1; rx8010->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; rx8010->rtc->range_max = RTC_TIMESTAMP_END_2099; |