static int irq_active;
#ifdef CONFIG_GEN_RTC_X
-struct work_struct genrtc_task;
+static struct work_struct genrtc_task;
static struct timer_list timer_task;
static unsigned int oldsecs;
static volatile int stask_active; /* schedule_work */
static volatile int ttask_active; /* timer_task */
static int stop_rtc_timers; /* don't requeue tasks */
-static spinlock_t gen_rtc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(gen_rtc_lock);
static void gen_rtc_interrupt(unsigned long arg);
/* first test allows optimizer to nuke this case for 32-bit machines */
if (sizeof (int) != sizeof (long) && count == sizeof (unsigned int)) {
unsigned int uidata = data;
- retval = put_user(uidata, (unsigned long __user *)buf);
+ retval = put_user(uidata, (unsigned int __user *)buf) ?:
+ sizeof(unsigned int);
}
else {
- retval = put_user(data, (unsigned long __user *)buf);
+ retval = put_user(data, (unsigned long __user *)buf) ?:
+ sizeof(unsigned long);
}
- if (!retval)
- retval = sizeof(unsigned long);
out:
current->state = TASK_RUNNING;
remove_wait_queue(&gen_rtc_wait, &wait);
{
struct proc_dir_entry *r;
- r = create_proc_read_entry("driver/rtc", 0, 0, gen_rtc_read_proc, NULL);
+ r = create_proc_read_entry("driver/rtc", 0, NULL, gen_rtc_read_proc, NULL);
if (!r)
return -ENOMEM;
return 0;