Message ID | 20200409121202.11130-2-kieran.bingham+renesas@ideasonboard.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Kieran Bingham |
Headers | show |
Series | max9286 v8 - modifications | expand |
Hi Kieran, On Thu, Apr 09, 2020 at 01:11:50PM +0100, Kieran Bingham wrote: > The bound_sources bit mask tracks sources which have been successfully > bound through the v4l2 async notifier system. > > Ensure that the mask is updated accordingly when unbinding. > Indeed! Acked-by: Jacopo Mondi <jacopo@jmondi.org> Please squash in v8! Thanks j > Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> > --- > drivers/media/i2c/max9286.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c > index cb58782e5143..b84d2daa6561 100644 > --- a/drivers/media/i2c/max9286.c > +++ b/drivers/media/i2c/max9286.c > @@ -493,9 +493,12 @@ static void max9286_notify_unbind(struct v4l2_async_notifier *notifier, > struct v4l2_subdev *subdev, > struct v4l2_async_subdev *asd) > { > + struct max9286_priv *priv = sd_to_max9286(notifier->sd); > struct max9286_source *source = asd_to_max9286_source(asd); > + unsigned int index = to_index(priv, source); > > source->sd = NULL; > + priv->bound_sources &= ~BIT(index); > } > > static const struct v4l2_async_notifier_operations max9286_notify_ops = { > -- > 2.20.1 >
diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index cb58782e5143..b84d2daa6561 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -493,9 +493,12 @@ static void max9286_notify_unbind(struct v4l2_async_notifier *notifier, struct v4l2_subdev *subdev, struct v4l2_async_subdev *asd) { + struct max9286_priv *priv = sd_to_max9286(notifier->sd); struct max9286_source *source = asd_to_max9286_source(asd); + unsigned int index = to_index(priv, source); source->sd = NULL; + priv->bound_sources &= ~BIT(index); } static const struct v4l2_async_notifier_operations max9286_notify_ops = {
The bound_sources bit mask tracks sources which have been successfully bound through the v4l2 async notifier system. Ensure that the mask is updated accordingly when unbinding. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> --- drivers/media/i2c/max9286.c | 3 +++ 1 file changed, 3 insertions(+)