Re: [PATCH v1 1/2] driver core: Introduce device_find_first_child() helper

From: Greg Kroah-Hartman
Date: Wed Jun 08 2022 - 07:32:56 EST


On Tue, Jun 07, 2022 at 11:20:57PM +0300, Andy Shevchenko wrote:
> There are several places in the kernel where this kind of functionality is
> being used. Provide a generic helper for such cases.

This feels really wrong/broken.

There should not be any specific ordering of children in the tree. What
subsystem relies on this such that they require this?

thanks,

greg k-h