| .. | .. |
|---|
| 23 | 23 | #include <linux/device.h> |
|---|
| 24 | 24 | #include <linux/err.h> |
|---|
| 25 | 25 | #include <linux/init.h> |
|---|
| 26 | +#include <linux/irq.h> |
|---|
| 26 | 27 | #include <linux/kernel.h> |
|---|
| 27 | 28 | #include <linux/mfd/tps6586x.h> |
|---|
| 28 | 29 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 259 | 260 | rtc->rtc = devm_rtc_allocate_device(&pdev->dev); |
|---|
| 260 | 261 | if (IS_ERR(rtc->rtc)) { |
|---|
| 261 | 262 | ret = PTR_ERR(rtc->rtc); |
|---|
| 262 | | - dev_err(&pdev->dev, "RTC allocate device: ret %d\n", ret); |
|---|
| 263 | 263 | goto fail_rtc_register; |
|---|
| 264 | 264 | } |
|---|
| 265 | 265 | |
|---|
| .. | .. |
|---|
| 267 | 267 | rtc->rtc->range_max = (1ULL << 30) - 1; /* 30-bit seconds */ |
|---|
| 268 | 268 | rtc->rtc->start_secs = mktime64(2009, 1, 1, 0, 0, 0); |
|---|
| 269 | 269 | rtc->rtc->set_start_time = true; |
|---|
| 270 | + |
|---|
| 271 | + irq_set_status_flags(rtc->irq, IRQ_NOAUTOEN); |
|---|
| 270 | 272 | |
|---|
| 271 | 273 | ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, |
|---|
| 272 | 274 | tps6586x_rtc_irq, |
|---|
| .. | .. |
|---|
| 277 | 279 | rtc->irq, ret); |
|---|
| 278 | 280 | goto fail_rtc_register; |
|---|
| 279 | 281 | } |
|---|
| 280 | | - disable_irq(rtc->irq); |
|---|
| 281 | 282 | |
|---|
| 282 | 283 | ret = rtc_register_device(rtc->rtc); |
|---|
| 283 | | - if (ret) { |
|---|
| 284 | | - dev_err(&pdev->dev, "RTC device register: ret %d\n", ret); |
|---|
| 284 | + if (ret) |
|---|
| 285 | 285 | goto fail_rtc_register; |
|---|
| 286 | | - } |
|---|
| 287 | 286 | |
|---|
| 288 | 287 | return 0; |
|---|
| 289 | 288 | |
|---|