/* Wake up users waiting for IO so they can disconnect from dead device.  */
static void mousedev_hangup(struct mousedev *mousedev)
/* Wake up users waiting for IO so they can disconnect from dead device.  */
static void mousedev_hangup(struct mousedev *mousedev)
{
	struct mousedev_client *client;
	spin_lock(&mousedev->client_lock);
	list_for_each_entry(client, &mousedev->client_list, node)
		kill_fasync(&client->fasync, SIGIO, POLL_HUP);
	spin_unlock(&mousedev->client_lock);
	wake_up_interruptible(&mousedev->wait);
}