X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Frtc.c;h=5f80a9dff5735103b91cc16c40338aafa96f853a;hb=27c8d95f8c9ff83e4e4d8a90523d891427964c79;hp=78b151c4d20f94b0bccecc1acb3540e14b77cdc9;hpb=5bdeae46be6dfe9efa44a548bd622af325f4bdb4;p=linux-2.6 diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 78b151c4d2..5f80a9dff5 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c @@ -88,6 +88,7 @@ #ifdef CONFIG_SPARC32 #include +#include #include static unsigned long rtc_port; @@ -110,8 +111,8 @@ static int rtc_has_irq = 1; #define hpet_set_rtc_irq_bit(arg) 0 #define hpet_rtc_timer_init() do { } while (0) #define hpet_rtc_dropped_irq() 0 -#define hpet_register_irq_handler(h) 0 -#define hpet_unregister_irq_handler(h) 0 +#define hpet_register_irq_handler(h) ({ 0; }) +#define hpet_unregister_irq_handler(h) ({ 0; }) #ifdef RTC_IRQ static irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id) { @@ -1068,10 +1069,8 @@ no_irq: } #ifdef CONFIG_PROC_FS - ent = create_proc_entry("driver/rtc", 0, NULL); - if (ent) - ent->proc_fops = &rtc_proc_fops; - else + ent = proc_create("driver/rtc", 0, NULL, &rtc_proc_fops); + if (!ent) printk(KERN_WARNING "rtc: Failed to register with procfs.\n"); #endif @@ -1316,7 +1315,8 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm) * Once the read clears, read the RTC time (again via ioctl). Easy. */ - while (rtc_is_updating() != 0 && jiffies - uip_watchdog < 2*HZ/100) + while (rtc_is_updating() != 0 && + time_before(jiffies, uip_watchdog + 2*HZ/100)) cpu_relax(); /*