Skip to content

Commit 3d52910

Browse files
committed
zorro: Use zorro_match_device() helper in zorro_bus_match()
Make zorro_bus_match() use the existing zorro_match_device() helper, instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent aeee094 commit 3d52910

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/zorro/zorro-driver.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,7 @@ static int zorro_bus_match(struct device *dev, struct device_driver *drv)
133133
if (!ids)
134134
return 0;
135135

136-
while (ids->id) {
137-
if (ids->id == ZORRO_WILDCARD || ids->id == z->id)
138-
return 1;
139-
ids++;
140-
}
141-
return 0;
136+
return !!zorro_match_device(ids, z);
142137
}
143138

144139
static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env)

0 commit comments

Comments
 (0)