From patchwork Thu Nov 28 12:54:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 11265951 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D83F5138C for ; Thu, 28 Nov 2019 12:56:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B78C721774 for ; Thu, 28 Nov 2019 12:56:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726681AbfK1M4y (ORCPT ); Thu, 28 Nov 2019 07:56:54 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:33409 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726320AbfK1M4x (ORCPT ); Thu, 28 Nov 2019 07:56:53 -0500 Received: from orion.localdomain ([95.117.37.214]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MyK1E-1hbdcU0isO-00ydb8; Thu, 28 Nov 2019 13:54:34 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: tim@buttersideup.com, james.morse@arm.com, rrichter@marvell.com, jdelvare@suse.com, linux@roeck-us.net, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-crypto@vger.kernel.org, linux-edac@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pci@vger.kernel.org Subject: [PATCH 2/6] mtd: maps: esb2rom: use pci_get_device_by_id() Date: Thu, 28 Nov 2019 13:54:02 +0100 Message-Id: <20191128125406.10417-2-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191128125406.10417-1-info@metux.net> References: <20191128125406.10417-1-info@metux.net> X-Provags-ID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S2Z+ZPC2aHk/bvb0+wJAssQ8IyH G+Mh+rLaqXVLNlC8EaSnZ++5+T2u8tT4WxyfiGko+FA50gM9mKPmEl9OHzpHqWghgcpPBwTUz oi7mN497nCPqXxEoMqNw== Sender: linux-edac-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org From: Enrico Weigelt Use the new pci_get_device_by_id() helper in order to reduce a bit of boilerplate. Signed-off-by: Enrico Weigelt, metux IT consult --- drivers/mtd/maps/esb2rom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c index 5c27c6994896..0c638ac6ad82 100644 --- a/drivers/mtd/maps/esb2rom.c +++ b/drivers/mtd/maps/esb2rom.c @@ -421,7 +421,7 @@ static int __init init_esb2rom(void) pdev = NULL; for (id = esb2rom_pci_tbl; id->vendor; id++) { printk(KERN_DEBUG "device id = %x\n", id->device); - pdev = pci_get_device(id->vendor, id->device, NULL); + pdev = pci_get_device_by_id(id); if (pdev) { printk(KERN_DEBUG "matched device = %x\n", id->device); break;