Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rtc: ds1685: drop no_irq

No platforms are currently setting no_irq. Anyway, letting platform_get_irq
fail is fine as this means that there is no IRQ. In that case, clear
RTC_FEATURE_ALARM so the core knows there are no alarms.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220309162301.61679-2-alexandre.belloni@bootlin.com

+5 -10
+5 -9
drivers/rtc/rtc-ds1685.c
··· 1285 1285 * there won't be an automatic way of notifying the kernel about it, 1286 1286 * unless ctrlc is explicitly polled. 1287 1287 */ 1288 - if (!pdata->no_irq) { 1289 - ret = platform_get_irq(pdev, 0); 1290 - if (ret <= 0) 1291 - return ret; 1292 - 1293 - rtc->irq_num = ret; 1294 - 1288 + rtc->irq_num = platform_get_irq(pdev, 0); 1289 + if (rtc->irq_num <= 0) { 1290 + clear_bit(RTC_FEATURE_ALARM, rtc_dev->features); 1291 + } else { 1295 1292 /* Request an IRQ. */ 1296 1293 ret = devm_request_threaded_irq(&pdev->dev, rtc->irq_num, 1297 1294 NULL, ds1685_rtc_irq_handler, ··· 1302 1305 rtc->irq_num = 0; 1303 1306 } 1304 1307 } 1305 - rtc->no_irq = pdata->no_irq; 1306 1308 1307 1309 /* Setup complete. */ 1308 1310 ds1685_rtc_switch_to_bank0(rtc); ··· 1390 1394 * have been taken care of by the shutdown scripts and this 1391 1395 * is the final function call. 1392 1396 */ 1393 - if (!rtc->no_irq) 1397 + if (rtc->irq_num) 1394 1398 disable_irq_nosync(rtc->irq_num); 1395 1399 1396 1400 /* Oscillator must be on and the countdown chain enabled. */
-1
include/linux/rtc/ds1685.h
··· 46 46 u32 regstep; 47 47 int irq_num; 48 48 bool bcd_mode; 49 - bool no_irq; 50 49 u8 (*read)(struct ds1685_priv *, int); 51 50 void (*write)(struct ds1685_priv *, int, u8); 52 51 void (*prepare_poweroff)(void);