diff options
author | Simon Guinot <simon.guinot@sequanux.org> | 2014-04-03 17:49:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 19:21:20 -0400 |
commit | 5ea735144dd4d2716557ff62dbcc940d62d62208 (patch) | |
tree | 0d7847f4fdb6f49ab192f97d10beb5f607ad774f /drivers/rtc/rtc-ds1307.c | |
parent | 3916b09eed268705f738957aba6fd380470e994a (diff) |
drivers/rtc/rtc-ds1307.c: fix sysfs wakealarm attribute creation
In order to allow the creation of the sysfs attribute wakealarm, this
patch moves the device_set_wakeup_capable() call above the RTC device
registration.
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-ds1307.c')
-rw-r--r-- | drivers/rtc/rtc-ds1307.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 9e2aad68f96d..f739be96cbc0 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c | |||
@@ -927,6 +927,7 @@ read_rtc: | |||
927 | bin2bcd(tmp)); | 927 | bin2bcd(tmp)); |
928 | } | 928 | } |
929 | 929 | ||
930 | device_set_wakeup_capable(&client->dev, want_irq); | ||
930 | ds1307->rtc = devm_rtc_device_register(&client->dev, client->name, | 931 | ds1307->rtc = devm_rtc_device_register(&client->dev, client->name, |
931 | &ds13xx_rtc_ops, THIS_MODULE); | 932 | &ds13xx_rtc_ops, THIS_MODULE); |
932 | if (IS_ERR(ds1307->rtc)) { | 933 | if (IS_ERR(ds1307->rtc)) { |
@@ -941,7 +942,6 @@ read_rtc: | |||
941 | dev_err(&client->dev, "unable to request IRQ!\n"); | 942 | dev_err(&client->dev, "unable to request IRQ!\n"); |
942 | } else { | 943 | } else { |
943 | 944 | ||
944 | device_set_wakeup_capable(&client->dev, 1); | ||
945 | set_bit(HAS_ALARM, &ds1307->flags); | 945 | set_bit(HAS_ALARM, &ds1307->flags); |
946 | dev_dbg(&client->dev, "got IRQ %d\n", client->irq); | 946 | dev_dbg(&client->dev, "got IRQ %d\n", client->irq); |
947 | } | 947 | } |