Message ID | 1559577023-558-15-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 q26csp4647627ili; Mon, 3 Jun 2019 08:54:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxZOIdhJwLo/IMNDkanbSJHSelBn/e7vF8YM5J7nHG4XRh2sM66+w2bZHr3KzIlHeIoT9j X-Received: by 2002:a63:c20c:: with SMTP id b12mr14385088pgd.3.1559577284855; Mon, 03 Jun 2019 08:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577284; cv=none; d=google.com; s=arc-20160816; b=ZT0ajda0j70OOydtV1u4GLnNzeN1wQrl2WP1DYpznbe1XwxLENG1U4+x3VepxK5p7h sU9/OcoeFcmfz5n54gsU0v3Af/nP31x5Fn8KYklvGpdexTgY9F9yZZX7Fhu5XUE0KLh2 SmBBQt0WPKNLxT9WVuoh3BDFvtVlaZLNff9sue9svlJAiUFPeyWx0AFGZW3kpbz71Piu XLzQTd4ynjjtsqPeQ1O5nKwCmOlA4KROs29FGJlVCN66m9QL8LXxRyRdS+kL9m0fAqu2 YRmeEgciBB9DFSeWvlTTCLFYDsDVCOAO+WbQ0jIrV0DN0otPEVPHiUscZnKR1fOPbr+i mXHQ== 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=J7+CnAQpAGEZqMKPVkc+vuXNEzMjDORrCZbKCH4kC9Q=; b=Qz6p8faEUnTPwNixeI4gy0m/iTT/8iDt7w74p9aMbadEXwIn7B/hD75GfaJYDBa5Zx MlSN5cvfkQAkOfF4fugh9uOz+go6gKtlMvp5DGGNPyRjUsDj3dPi+EOGoM9MPMA86nHl EnB76i4taK3V6cNgfwfp8OVUB2Yn6pElX+qGy/abyJLQskyvyUqJnBpX8bZrMLs1edTR s56sGGKJs6DCq/8wUIYmWfHLoEzosRvSh3pWM5LEa1d4HXxawLnEjrsnp4WzrRJrvA4N p4wW2rU4AFVCR2vpHX73qoK9YJJD4PrpYB8qQPgbEmr4qP4kWlw0iBjI/3hgAUNSKZnm KxMw== 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 140si20483612pfy.113.2019.06.03.08.54.44; Mon, 03 Jun 2019 08:54:44 -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 S1729726AbfFCPyn (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:54:43 -0400 Received: from foss.arm.com ([217.140.101.70]:53662 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728750AbfFCPvU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:51:20 -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 C2C461715; Mon, 3 Jun 2019 08:51:19 -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 CDD5D3F246; Mon, 3 Jun 2019 08:51:18 -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 Subject: [RFC PATCH 14/57] drivers: devcon: Use bus_find_device_by_fwnode helper Date: Mon, 3 Jun 2019 16:49:40 +0100 Message-Id: <1559577023-558-15-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/base/devcon.c b/drivers/base/devcon.c index 04db9ae..d9bcf77 100644 --- a/drivers/base/devcon.c +++ b/drivers/base/devcon.c @@ -107,19 +107,13 @@ static struct bus_type *generic_match_buses[] = { NULL, }; -static int device_fwnode_match(struct device *dev, void *fwnode) -{ - return dev_fwnode(dev) == fwnode; -} - static void *device_connection_fwnode_match(struct device_connection *con) { struct bus_type *bus; struct device *dev; for (bus = generic_match_buses[0]; bus; bus++) { - dev = bus_find_device(bus, NULL, (void *)con->fwnode, - device_fwnode_match); + dev = bus_find_device_by_fwnode(bus, NULL, con->fwnode); if (dev && !strncmp(dev_name(dev), con->id, strlen(con->id))) return dev;
Switch to using the bus_find_device_by_fwnode helper Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/base/devcon.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4