Message ID | 1559577023-558-58-git-send-email-suzuki.poulose@arm.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4645264ili; Mon, 3 Jun 2019 08:52:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHHpY+ymYRXcbSSoVDhYLtgenmtEQZuiFfTNdJoCUfWjYz3p58c2w8IrkDPLxgnKpWksYb X-Received: by 2002:aa7:8e50:: with SMTP id d16mr25222501pfr.65.1559577150632; Mon, 03 Jun 2019 08:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577150; cv=none; d=google.com; s=arc-20160816; b=IOKIkA82wIMapKag79laEl9f0Qoxhcc0EcpgVTfLSkkKBoBGAJFBd26OJS/pHM2VBd 0tVQoP4NdMrvVltFs3Hld+P6j2/HKHKkV0AW873IAHezvwzTwrqOBB47H/9ScXD5MWz0 k9oE1zmz1FmZuZ6893boHF7kOnJMDNgwOiK0nm3AiNGnTC2ps6JD1ekNRhys1Fv87dAe JR1YuU+AWXFsSEEYma4pfrHQauRSp2XqCYH3QRiz9zvYWnYBY4RKmgsYK3mnDbPM4r8e 0rbiaZi2ad0TBhfK/F7j8v6DJN5iqcSaARIu7B4Yt8mF+bdDeo0SIey7LLUcOIXFT4QN 8gLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ACJx35ijrLFRztU5DOlVipk7Mvw3OEvfjElrQlyVoEo=; b=hCmeYIA1AZ0D8PoAd0rx2AmEndNUR7zW2yJbXTg63iklpb4FMnLMr8Ous/L5X7F3Lw 8TfEG4alth1SX/YJFKsnt4oFAtKgx6sSxofD5RLRJv7pniPUp9AgLg9f5At0zoUzfXkO jtId9ih0d6tu2PLzr/sJTQvFrz1jN9AT8OZ4rVjmgQik9Q891brVJ66HQbCt4Wqlm9t6 LoDSR6cfsMkokEzU+NcCqS0zJUFaa/RDF6AIG4zuFm+EDqnZWiQf8XBa5CJ6E/3JBP6E D+apETpAweU4HZzZ8S6M0FOQ1fQU4IQRagD9xC8fweE9zi/tOgopBvKsQDnAk6tDV+1J JB6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si17718022pgs.269.2019.06.03.08.52.30; Mon, 03 Jun 2019 08:52:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729651AbfFCPw3 (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:52:29 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54128 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729615AbfFCPw0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:52:26 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0107515AB; Mon, 3 Jun 2019 08:52:26 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 968023F246; Mon, 3 Jun 2019 08:52:24 -0700 (PDT) From: Suzuki K Poulose <suzuki.poulose@arm.com> To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Elie Morisse <syniurge@gmail.com>, Nehal Shah <nehal-bakulchandra.shah@amd.com>, Shyam Sundar S K <shyam-sundar.s-k@amd.com> Subject: [RFC PATCH 57/57] drivers: i2c-amd: Use driver_find_next_device() helper Date: Mon, 3 Jun 2019 16:50:23 +0100 Message-Id: <1559577023-558-58-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
[RFC,01/57] drivers: s390/cio: Use driver_for_each_device
|
expand
|
diff --git a/drivers/i2c/busses/i2c-amd-mp2-pci.c b/drivers/i2c/busses/i2c-amd-mp2-pci.c index c7fe3b4..5e4800d 100644 --- a/drivers/i2c/busses/i2c-amd-mp2-pci.c +++ b/drivers/i2c/busses/i2c-amd-mp2-pci.c @@ -457,18 +457,12 @@ static struct pci_driver amd_mp2_pci_driver = { }; module_pci_driver(amd_mp2_pci_driver); -static int amd_mp2_device_match(struct device *dev, const void *data) -{ - return 1; -} - struct amd_mp2_dev *amd_mp2_find_device(void) { struct device *dev; struct pci_dev *pci_dev; - dev = driver_find_device(&amd_mp2_pci_driver.driver, NULL, NULL, - amd_mp2_device_match); + dev = driver_find_next_device(&amd_mp2_pci_driver.driver, NULL); if (!dev) return NULL;
Reuse the generic helper to find the first device matching the driver. Cc: Elie Morisse <syniurge@gmail.com> Cc: Nehal Shah <nehal-bakulchandra.shah@amd.com> Cc: Shyam Sundar S K <shyam-sundar.s-k@amd.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/i2c/busses/i2c-amd-mp2-pci.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4