Re: [PATCH] bq2415x_charger: Allow to load and use driver even if notify device is not registered yet

From: Pali RohÃr
Date: Tue Aug 11 2015 - 07:23:54 EST


On Wednesday 05 August 2015 15:26:52 Pali RohÃr wrote:
> On Saturday 25 July 2015 23:46:56 Pali RohÃr wrote:
> > - if (psy != bq->notify_psy)
> > - return NOTIFY_OK;
> > + /* Ignore event if it was not send by notify_node/notify_device */
> > + if (bq->notify_node) {
> > + if (psy->dev.parent &&
> > + psy->dev.parent->of_node != bq->notify_node)
> > + return NOTIFY_OK;
>
> There is missing branch for case when psy->dev.parent is NULL. Logical
> error... I will send new version of patch.
>
> Correct logic should be: ignore psy dev which sent event if it is not
> notify dev specified in board/DT config of bq2415x psy dev.
>

Fixed in v2.

--
Pali RohÃr
pali.rohar@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/