Message ID | 1559577023-558-16-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 q26csp4647500ili; Mon, 3 Jun 2019 08:54:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWaza7G0pYNVHx7qg4rUqjO1vnMMMcRfl//dZJXJMywRSowqPjbGn6Msa+KUVCs4drpZJL X-Received: by 2002:aa7:8ec6:: with SMTP id b6mr32257270pfr.234.1559577277422; Mon, 03 Jun 2019 08:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577277; cv=none; d=google.com; s=arc-20160816; b=XVXBFEaU5nTbq2jTsCZSISal2WQZnGq3zl59pNvnHQ8Id+6s9u6y06zIrhms9IKnfv d7aLHm9K0193Alj2NcdFJekOUO/4fOUcmKUfg/kV5pkPw2xBC6a++gDk2ZZz6WrFnnbO UBVbuej2IRNWVmBb0IzOJID6XL944p5caIoHyTIPJ+XzBRmt9N2Djd1DprVtByiKBhTH aF3vHXdXkAGxtZTW5p574tm8MIm2zel0OdQcfcIJw++Bcp2dEZeqfczIXxoTucwCwagY k6jcTvvLDzlXQQNPv18PgJ4M0CWFT0+lFV872afdl6xAKVqU5sCO0kcb9ouuMSKXSeID GQWA== 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=xqLJLAwyKSrLC8A5FfF/RagZ/La3AVcJQ55lcUGY1/w=; b=S2xbEjRjed011lpR6yNc0FAm3uCU/zZqTDUplZYNLnL+1GfXFAi1jLghhwrT/Zwu/e WnDcNU4/ftuw+BVi64hLDBNBb5N47uJdIfgB3thB1fdm8QzfL9xxxUE68/kDxrERR+ey +aK8mJWMnJ08LXbFCsxSje36UyqdTfDiX+Fb8WZRBue6hdbTZrqSrPjj4arOOeHLzCcL BBWZZ7jUGp4rmdGKNwHyAKLR1GDeupjIMo1avyzN0X4yxX32KrUp/W3LA/WUXOKq4fGS 7Siky4Gk46YUyt0DoKCObVQje7/2rOXGLPx8rjoqitSkJCSz1x25HJicmJ49ZedgSuE+ hEtQ== 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 k93si18106987pjb.33.2019.06.03.08.54.36; Mon, 03 Jun 2019 08:54:37 -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 S1729602AbfFCPyg (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:54:36 -0400 Received: from foss.arm.com ([217.140.101.70]:53676 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728118AbfFCPvV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:51:21 -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 254F9169E; Mon, 3 Jun 2019 08:51:21 -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 0BA403F246; Mon, 3 Jun 2019 08:51:19 -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, "David S. Miller" <davem@davemloft.net> Subject: [RFC PATCH 15/57] net: hisilicon: hnfs:Use bus_find_device_by_fwnode helper Date: Mon, 3 Jun 2019 16:49:41 +0100 Message-Id: <1559577023-558-16-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/net/ethernet/hisilicon/hns/hns_dsaf_misc.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c index 09c16d8..b801ab7 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c @@ -754,17 +754,11 @@ struct dsaf_misc_op *hns_misc_op_get(struct dsaf_device *dsaf_dev) return (void *)misc_op; } -static int hns_dsaf_dev_match(struct device *dev, void *fwnode) -{ - return dev->fwnode == fwnode; -} - struct platform_device *hns_dsaf_find_platform_device(struct fwnode_handle *fwnode) { struct device *dev; - dev = bus_find_device(&platform_bus_type, NULL, - fwnode, hns_dsaf_dev_match); + dev = bus_find_device_by_fwnode(&platform_bus_type, NULL, fwnode); return dev ? to_platform_device(dev) : NULL; }
Switch to using the bus_find_device_by_fwnode helper Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4