Hi Heinrich,

On Sat, 23 Oct 2021 at 08:06, Heinrich Schuchardt
<heinrich.schucha...@canonical.com> wrote:
>
> The block descriptor contains the if_type. There is no need to first look
> up the uclass for the if_type and then to check the parent device's uclass
> to know if the device has the correct if_type.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com>
> ---
>  drivers/block/blk-uclass.c | 35 +----------------------------------
>  1 file changed, 1 insertion(+), 34 deletions(-)

This seems to be heading in the wrong direction though.

The IF_TYPE should really go away and be replaced with the UCLASS ID, I think.

At present we have lots of calls to blk_create_device_f() which
specify the type. I think we should drop the IF_TYPE_.. arg to that
function and have it figured out from the uclass, in the interim.

But why do we need IF_TYPE now?

Regards,
Simon

Reply via email to