
Hi,
On 8 September 2016 at 00:47, Paul Burton paul.burton@imgtec.com wrote:
Device model drivers have previously been matched to FDT nodes by virtue of being the first driver in the driver list to be compatible with the node. This ignores the fact that compatible strings in the device tree are listed in order of priority - that is, if we have a node with 2 compatible strings & a driver that matches each then we should always probe the driver that matches the first compatible string.
Fix this by looping through the compatible strings for a node when attempting to bind it in lists_bind_fdt and checking each driver for a match of the first string, then each driver for a match of the second string etc. Effectively this inverts the loops over compatible strings & drivers.
Signed-off-by: Paul Burton paul.burton@imgtec.com
Changes in v7:
- Pass the correct match data to device_bind_with_driver_data
Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None
drivers/core/lists.c | 78 +++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 37 deletions(-)
It looks like this has been applied, right?
Regards, Simon