From patchwork Mon Jun 6 07:32:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 9157325 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24C1D60572 for ; Mon, 6 Jun 2016 07:33:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15335272AA for ; Mon, 6 Jun 2016 07:33:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07DEC281BE; Mon, 6 Jun 2016 07:33:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86AA3272AA for ; Mon, 6 Jun 2016 07:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752084AbcFFHcu (ORCPT ); Mon, 6 Jun 2016 03:32:50 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:34179 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655AbcFFHcr (ORCPT ); Mon, 6 Jun 2016 03:32:47 -0400 Received: by mail-pa0-f65.google.com with SMTP id ug1so1216608pab.1; Mon, 06 Jun 2016 00:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uutkpdt89t43/961R15Y8KIqSlNz6CfZ9gQyDrxFIPY=; b=sr4N6IUMopRMbA49sOlTcB32t9Tlrtekrv/Znl/7Z6ixevNCcezHqXPZOjke+VR9Qr SGFS/r5Udye06gSrSn+vEu/v5RIhc8hDXF9s8ejtbb5TsrvsKqhMOXqE5p/+rq6PG9B/ s8I3Zgk63N4enb+fR/Kgpp45WOtfxfOY77+56Akn29I7Mf3F9kQGVBjg5zc/x/eaWoWI LasY/BIjMwSbn+NH6HWRfDs6iI1jos6HG2+PDQ9Cg29rECyd7lgcwvvcLFphe6RoK1Zp 1Z//Q4jDHZhSmbHdxgx1pdYSOmMND7orDJOOdaynsaTD4htcYpm1+jHidSuHgUmYnBwp DJ+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uutkpdt89t43/961R15Y8KIqSlNz6CfZ9gQyDrxFIPY=; b=YTvaUWXNPZyKpOuvcYC9ZWBa0lC+Kp1Hh7lPPxvdjXtUOYN9vNJWteQ0EhcnVRlaGN NKVJZsT4wbGWAEP/+2sVbraHzT72DN5wpJwJ7MeyMWpNYXaJcgPbnbZt8c92Hh5SpMJK yDEaUapYJXlhmRqaLZGI+jJBtHmvIzlutNXDaNnSYeG/THn9MmXlOCHfDNVKwObUWINk xNp+AVjE2fdqKbmetGu3sTGCSbP6jgr17w4AUpeGOPcasUmXc0uKNIZVFbrqEM8TN+Nt lTq+k0QsuS/PKS0oErGvcocheXBxLnymZsLoQzn4NB92xORVQV+Q/G14DtxMXOzIeSGD grDA== X-Gm-Message-State: ALyK8tKEC+Iz/cn4nfCFOx86t68yqRwP17eO/C3abxPRYv7y0/j0PZWflNcbGbmp5TD7tw== X-Received: by 10.66.159.163 with SMTP id xd3mr23023719pab.23.1465198366956; Mon, 06 Jun 2016 00:32:46 -0700 (PDT) Received: from localhost (port-6551.pppoe.wtnet.de. [84.46.25.176]) by smtp.gmail.com with ESMTPSA id z17sm3185311pfi.61.2016.06.06.00.32.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jun 2016 00:32:46 -0700 (PDT) From: Thierry Reding To: Greg Kroah-Hartman Cc: Bjorn Helgaas , "James E . J . Bottomley" , "Martin K . Petersen" , linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] PCI: Use device_match_always() Date: Mon, 6 Jun 2016 09:32:37 +0200 Message-Id: <20160606073238.1073-2-thierry.reding@gmail.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160606073238.1073-1-thierry.reding@gmail.com> References: <20160606073238.1073-1-thierry.reding@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding There is now a common implementation for a match function that will always match, so the PCI-specific implementation can be removed. Signed-off-by: Thierry Reding Acked-by: Bjorn Helgaas --- drivers/pci/probe.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 8e3ef720997d..3db06d8d6497 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -62,11 +62,6 @@ static struct resource *get_pci_domain_busn_res(int domain_nr) return &r->res; } -static int find_anything(struct device *dev, void *data) -{ - return 1; -} - /* * Some device drivers need know if pci is initiated. * Basically, we think pci is not initiated when there @@ -77,7 +72,7 @@ int no_pci_devices(void) struct device *dev; int no_devices; - dev = bus_find_device(&pci_bus_type, NULL, NULL, find_anything); + dev = bus_find_device(&pci_bus_type, NULL, NULL, device_match_always); no_devices = (dev == NULL); put_device(dev); return no_devices;