Input: use full RCU API

RT guys alerted me to the fact that in their tree spinlocks
are preemptible and it is better to use full RCU API
(rcu_read_lock()/rcu_read_unlock()) to be safe.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index cc36edb..79146d6 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -265,6 +265,7 @@
 	unsigned int new_head;
 	int wake_readers = 0;
 
+	rcu_read_lock();
 	list_for_each_entry_rcu(client, &mousedev->client_list, node) {
 
 		/* Just acquire the lock, interrupts already disabled */
@@ -309,6 +310,7 @@
 			wake_readers = 1;
 		}
 	}
+	rcu_read_unlock();
 
 	if (wake_readers)
 		wake_up_interruptible(&mousedev->wait);
@@ -499,12 +501,7 @@
 	spin_lock(&mousedev->client_lock);
 	list_add_tail_rcu(&client->node, &mousedev->client_list);
 	spin_unlock(&mousedev->client_lock);
-	/*
-	 * We don't use synchronize_rcu() here because read-side
-	 * critical section is protected by a spinlock (dev->event_lock)
-	 * instead of rcu_read_lock().
-	 */
-	synchronize_sched();
+	synchronize_rcu();
 }
 
 static void mousedev_detach_client(struct mousedev *mousedev,
@@ -513,7 +510,7 @@
 	spin_lock(&mousedev->client_lock);
 	list_del_rcu(&client->node);
 	spin_unlock(&mousedev->client_lock);
-	synchronize_sched();
+	synchronize_rcu();
 }
 
 static int mousedev_release(struct inode *inode, struct file *file)