[PATCH] powerpc: use a common vio_match_device routine

This requires the compatible properties having vaules that are empty
strings instead of just being empty properties.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Stephen Rothwell
2006-04-27 17:21:46 +10:00
committed by Paul Mackerras
parent e10fa77368
commit dd721ffd95
5 changed files with 7 additions and 31 deletions

View File

@@ -47,7 +47,8 @@ static const struct vio_device_id *vio_match_device(
const struct vio_device_id *ids, const struct vio_dev *dev)
{
while (ids->type[0] != '\0') {
if (vio_bus_ops.match(ids, dev))
if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) &&
device_is_compatible(dev->dev.platform_data, ids->compat))
return ids;
ids++;
}