The patch titled Subject: rtc: ds1307: simplify irq setup code has been added to the -mm tree. Its filename is rtc-ds1307-simplify-irq-setup-code.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Wolfram Sang <w.sang@xxxxxxxxxxxxxx> Subject: rtc: ds1307: simplify irq setup code No need to have two seperate if-blocks for setting up the irq. Signed-off-by: Wolfram Sang <w.sang@xxxxxxxxxxxxxx> Tested-by: David Anders <danders.dev@xxxxxxxxx> Cc: Austin Boyle <Austin.Boyle@xxxxxxxxxxxx> Cc: Alessandro Zummo <alessandro.zummo@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-ds1307.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff -puN drivers/rtc/rtc-ds1307.c~rtc-ds1307-simplify-irq-setup-code drivers/rtc/rtc-ds1307.c --- a/drivers/rtc/rtc-ds1307.c~rtc-ds1307-simplify-irq-setup-code +++ a/drivers/rtc/rtc-ds1307.c @@ -646,11 +646,6 @@ static int __devinit ds1307_probe(struct case ds_1337: case ds_1339: case ds_3231: - /* has IRQ? */ - if (ds1307->client->irq > 0 && chip->alarm) { - INIT_WORK(&ds1307->work, ds1307_work); - want_irq = true; - } /* get registers that the "rtc" read below won't read... */ tmp = ds1307->read_block_data(ds1307->client, DS1337_REG_CONTROL, 2, buf); @@ -668,10 +663,14 @@ static int __devinit ds1307_probe(struct * For some variants, be sure alarms can trigger when we're * running on Vbackup (BBSQI/BBSQW) */ - if (want_irq) { + if (ds1307->client->irq > 0 && chip->alarm) { + INIT_WORK(&ds1307->work, ds1307_work); + ds1307->regs[0] |= DS1337_BIT_INTCN | bbsqi_bitpos[ds1307->type]; ds1307->regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE); + + want_irq = true; } i2c_smbus_write_byte_data(client, DS1337_REG_CONTROL, _ Subject: Subject: rtc: ds1307: simplify irq setup code Patches currently in -mm which might be from w.sang@xxxxxxxxxxxxxx are linux-next.patch rtc-ds1307-refactor-chip_desc-table.patch rtc-ds1307-simplify-irq-setup-code.patch rtc-ds1307-comment-and-format-cleanup.patch rtc-ds1307-generalise-ram-size-and-offset.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html