projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
memcg: fix mem_cgroup_get_reclaim_stat_from_page
[deliverable/linux.git]
/
drivers
/
rtc
/
rtc-vr41xx.c
diff --git
a/drivers/rtc/rtc-vr41xx.c
b/drivers/rtc/rtc-vr41xx.c
index 884b635f028b792ee9b9afef8954345b4375e24a..f11297aff854a3bf680d84c382581083e853df5d 100644
(file)
--- a/
drivers/rtc/rtc-vr41xx.c
+++ b/
drivers/rtc/rtc-vr41xx.c
@@
-27,6
+27,7
@@
#include <linux/rtc.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/rtc.h>
#include <linux/spinlock.h>
#include <linux/types.h>
+#include <linux/log2.h>
#include <asm/div64.h>
#include <asm/io.h>
#include <asm/div64.h>
#include <asm/io.h>
@@
-84,8
+85,8
@@
static DEFINE_SPINLOCK(rtc_lock);
static char rtc_name[] = "RTC";
static unsigned long periodic_count;
static unsigned int alarm_enabled;
static char rtc_name[] = "RTC";
static unsigned long periodic_count;
static unsigned int alarm_enabled;
-static int aie_irq
= -1
;
-static int pie_irq
= -1
;
+static int aie_irq;
+static int pie_irq;
static inline unsigned long read_elapsed_second(void)
{
static inline unsigned long read_elapsed_second(void)
{
@@
-210,6
+211,8
@@
static int vr41xx_rtc_irq_set_freq(struct device *dev, int freq)
{
unsigned long count;
{
unsigned long count;
+ if (!is_power_of_2(freq))
+ return -EINVAL;
count = RTC_FREQUENCY;
do_div(count, freq);
count = RTC_FREQUENCY;
do_div(count, freq);
@@
-360,7
+363,7
@@
static int __devinit rtc_probe(struct platform_device *pdev)
spin_unlock_irq(&rtc_lock);
aie_irq = platform_get_irq(pdev, 0);
spin_unlock_irq(&rtc_lock);
aie_irq = platform_get_irq(pdev, 0);
- if (aie_irq <
0 || aie_irq >= NR_IRQS
) {
+ if (aie_irq <
= 0
) {
retval = -EBUSY;
goto err_device_unregister;
}
retval = -EBUSY;
goto err_device_unregister;
}
@@
-371,7
+374,7
@@
static int __devinit rtc_probe(struct platform_device *pdev)
goto err_device_unregister;
pie_irq = platform_get_irq(pdev, 1);
goto err_device_unregister;
pie_irq = platform_get_irq(pdev, 1);
- if (pie_irq <
0 || pie_irq >= NR_IRQS
)
+ if (pie_irq <
= 0
)
goto err_free_irq;
retval = request_irq(pie_irq, rtclong1_interrupt, IRQF_DISABLED,
goto err_free_irq;
retval = request_irq(pie_irq, rtclong1_interrupt, IRQF_DISABLED,
This page took
0.025588 seconds
and
5
git commands to generate.