On Tue, Dec 22, 2015 at 10:53:02AM +0100, Christian Gromm wrote: > This patch fixes the function channel_has_mbo that delivers the false > information in case two AIMs are using the same tx channel. > > Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx> > --- > <snip> > diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c > index b085f0a..ff0e0dc 100644 > --- a/drivers/staging/most/mostcore/core.c > +++ b/drivers/staging/most/mostcore/core.c > @@ -1352,7 +1352,7 @@ most_c_obj *get_channel_by_iface(struct most_interface *iface, int id) > return i->channel[id]; > } > > -int channel_has_mbo(struct most_interface *iface, int id) > +int channel_has_mbo(struct most_interface *iface, int id, struct most_aim *aim) > { > struct most_c_obj *c = get_channel_by_iface(iface, id); > unsigned long flags; > @@ -1361,6 +1361,11 @@ int channel_has_mbo(struct most_interface *iface, int id) > if (unlikely(!c)) > return -EINVAL; > > + if (c->aim0.refs && c->aim1.refs && > + ((aim == c->aim0.ptr && c->aim0.num_buffers <= 0) || > + (aim == c->aim1.ptr && c->aim1.num_buffers <= 0))) > + return false; channel_has_mbo() return int. maybe return 0 instead of return false.. regards sudip _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel