Re: [QUEUED v20180920 04/16] stm class: Introduce framing protocol drivers

From: Alexander Shishkin
Date: Wed Oct 03 2018 - 09:04:50 EST


Mathieu Poirier <mathieu.poirier@xxxxxxxxxx> writes:

>> + err = stm_lookup_protocol(proto, &pdrv, &pdrv_node_type);
>> kfree(devname);
>>
>> - if (!stm)
>> + if (err) {
>> + stm_put_device(stm);
>> return ERR_PTR(-ENODEV);
>> + }
>
> This condition prevent the subsystem from being used until patch 06/16 is added.

Good catch, I completely missed that.

> I would also suggest automatically compiling in the functionality provided by
> p_basic if p_sys-t is not selected.

That's kind of the intention; in Kconfig the PROTO_BASIC should default
to the same thing as CONFIG_STM, so it should be present unless the user
specifically interfered and disabled it.

> That way we preserve the original
> behaviour. I would also use p_basic if no protocol driver is selected rather
> than leaving it to the insertion order to make things more
> deterministic.

Agreed, more deterministic is good.

Thanks,
--
Alex