From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49436C33CA2 for ; Sun, 12 Jan 2020 16:50:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14956214D8 for ; Sun, 12 Jan 2020 16:50:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733098AbgALQtw (ORCPT ); Sun, 12 Jan 2020 11:49:52 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:32998 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732654AbgALQtw (ORCPT ); Sun, 12 Jan 2020 11:49:52 -0500 Received: from ramsan ([84.195.182.253]) by andre.telenet-ops.be with bizsmtp id pUpr210055USYZQ01UprH8; Sun, 12 Jan 2020 17:49:51 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iqgQw-0007yI-Um; Sun, 12 Jan 2020 17:49:50 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iqgQw-0005Gm-Tv; Sun, 12 Jan 2020 17:49:50 +0100 From: Geert Uytterhoeven To: linux-m68k@lists.linux-m68k.org Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 3/5] zorro: Use zorro_match_device() helper in zorro_bus_match() Date: Sun, 12 Jan 2020 17:49:47 +0100 Message-Id: <20200112164949.20196-4-geert@linux-m68k.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200112164949.20196-1-geert@linux-m68k.org> References: <20200112164949.20196-1-geert@linux-m68k.org> Sender: linux-m68k-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-m68k@vger.kernel.org Make zorro_bus_match() use the existing zorro_match_device() helper, instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven --- drivers/zorro/zorro-driver.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index 67e68880554245e1..0dd7cbcec2b0d478 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) -- 2.17.1