rtc: ds1307: improve irq setup
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 12 Jul 2017 05:49:37 +0000 (07:49 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 31 Aug 2017 23:10:15 +0000 (01:10 +0200)
commit82e2d43f6315d7ae8cca1d00c94f25df0f17eb85
treed4b45ee711b5bcd1c15b4de04f40e1e662f5180a
parent7624df482d7aba599a92ebe1a1fab3e27749b658
rtc: ds1307: improve irq setup

Change the usage of variable want_irq to reflect its name. Don't set
it to true in case wakeup is enabled but no interrupt number is given.
In addition set variable ds1307_can_wakeup_device if chip->alarm
is set only.
This allows to simplify the code and make it better understandable.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-ds1307.c