Skip to content

Commit

Permalink
zorro: Use zorro_match_device() helper in zorro_bus_match()
Browse files Browse the repository at this point in the history
Make zorro_bus_match() use the existing zorro_match_device() helper,
instead of open-coding the same operation.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20200112164949.20196-4-geert@linux-m68k.org
  • Loading branch information
Geert Uytterhoeven committed Mar 9, 2020
1 parent aeee094 commit 3d52910
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/zorro/zorro-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,7 @@ static int zorro_bus_match(struct device *dev, struct device_driver *drv)
if (!ids)
return 0;

while (ids->id) {
if (ids->id == ZORRO_WILDCARD || ids->id == z->id)
return 1;
ids++;
}
return 0;
return !!zorro_match_device(ids, z);
}

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

0 comments on commit 3d52910

Please sign in to comment.