diff options
author | 2020-01-12 17:49:47 +0100 | |
---|---|---|
committer | 2020-03-09 11:12:19 +0100 | |
commit | 3d52910e2b8ae7483a17ee824fa0e4f18bd7e7d4 (patch) | |
tree | c50f79e14061702ff538e1d18e3626917cffaa69 /drivers/zorro/zorro-driver.c | |
parent | zorro: Fix zorro_bus_match() kerneldoc (diff) | |
download | wireguard-linux-3d52910e2b8ae7483a17ee824fa0e4f18bd7e7d4.tar.xz wireguard-linux-3d52910e2b8ae7483a17ee824fa0e4f18bd7e7d4.zip |
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]
Diffstat (limited to 'drivers/zorro/zorro-driver.c')
-rw-r--r-- | drivers/zorro/zorro-driver.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index 67e688805542..0dd7cbcec2b0 100644 --- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c @@ -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) |