staging: most: add fair buffer distribution
[firefly-linux-kernel-4.4.55.git] / drivers / staging / most / aim-cdev / cdev.c
index a8a7689231ac3a273603e1525fedf9f4900f787f..23c3f6e7340c346107d2130ca9bf14065e9420e2 100644 (file)
@@ -165,7 +165,7 @@ static ssize_t aim_write(struct file *filp, const char __user *buf,
        }
        mutex_unlock(&channel->io_mutex);
 
-       mbo = most_get_mbo(channel->iface, channel->channel_id);
+       mbo = most_get_mbo(channel->iface, channel->channel_id, &cdev_aim);
 
        if (!mbo) {
                if ((filp->f_flags & O_NONBLOCK))
@@ -173,7 +173,8 @@ static ssize_t aim_write(struct file *filp, const char __user *buf,
                if (wait_event_interruptible(
                            channel->wq,
                            (mbo = most_get_mbo(channel->iface,
-                                               channel->channel_id)) ||
+                                               channel->channel_id,
+                                               &cdev_aim)) ||
                            (!channel->dev)))
                        return -ERESTARTSYS;
        }