Commit 9a0f4aea authored by Steven Rostedt's avatar Steven Rostedt Committed by Linus Torvalds

fix irq flags in rtc-ds1511

The file in drivers/rtc/rtc-ds1551.c uses "int" for flags.  This can cause
hard to find bugs on some architectures.  This patch converts the flags to use
"long" instead.

This bug was discovered by doing an allyesconfig make on the -rt kernel where
checks are done to ensure all flags are of size sizeof(long).
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a8b1ecf3
...@@ -184,7 +184,7 @@ ds1511_wdog_disable(void) ...@@ -184,7 +184,7 @@ ds1511_wdog_disable(void)
static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm) static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm)
{ {
u8 mon, day, dow, hrs, min, sec, yrs, cen; u8 mon, day, dow, hrs, min, sec, yrs, cen;
unsigned int flags; unsigned long flags;
/* /*
* won't have to change this for a while * won't have to change this for a while
...@@ -247,7 +247,7 @@ static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm) ...@@ -247,7 +247,7 @@ static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm)
static int ds1511_rtc_read_time(struct device *dev, struct rtc_time *rtc_tm) static int ds1511_rtc_read_time(struct device *dev, struct rtc_time *rtc_tm)
{ {
unsigned int century; unsigned int century;
unsigned int flags; unsigned long flags;
spin_lock_irqsave(&ds1511_lock, flags); spin_lock_irqsave(&ds1511_lock, flags);
rtc_disable_update(); rtc_disable_update();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment