Message ID | 1559577023-558-57-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 q26csp4645404ili; Mon, 3 Jun 2019 08:52:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3YhCcMH6Bgze2LPRTC5ZFjOYu1q3wq6JDoD0WyL0wII1+LYM/RbM+YwcKbxAhXcVcnQy5 X-Received: by 2002:a17:902:12f:: with SMTP id 44mr30551167plb.137.1559577156124; Mon, 03 Jun 2019 08:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577156; cv=none; d=google.com; s=arc-20160816; b=D0O7BEPop+RoYhDALGR2Teu4BHwJC+kysGm2EyuccA4EjFPgdgVwrE4pojSK55Rauj J+ZEzMBPJ1evnjM3ppcbyRHjcom/8akyebt6YXzf//C8RT8pbqx0smDGwiYKgDmtjjac /WqlociUUjSCnoeNQa5hfU1T7CaWrtIbkW4PB0caDsG4soALIvqre0QVTP5bRyhCczhM E+b3G2chjkRQFgt7ttY4Oc57Q4OvVSa1TI42XGMjJ6mmgFEb39OxFQR3hIOUEFyp812g a0Z6RiXPZ51PgY4yWNQOO8QtQH7CCm6ft0+5Hrja7izNuBSSRkaz/I08oswJFzKo+DHq +aaw== 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=dCuM8+RKDYjDg/71eQmgsWHS54DTwGQGyuiUJYjO3a4=; b=E9EbnE0GCEVPllR2ELh8HwI/25kIeWsYF5HrCZmXx1KczE2bkPJWtldRbfxba4mGjY luoq4QEoP36T3FmfkLmOf9uaamIZzzu/ZZ/fWGtd7zeYbyNctGJ6vUMpxChI3OPU0Q7U G0Ps2EeEv8OcSOofpzeQT8Owpg88fMePUVFacleTL3deT2romOHNqlyNbMVJWaHVmrTn jXvfgzsOK2014R8tmexsrKODZgnA7kjs9fi5j1aZpsoBEZOAchEoACTaip0450cfr3/e rdLFRzTG2fDyoLE4of0Kp1w1aWnxzO4xQg1LchhCXrmByJ9+YnHf7USEyvvMolMbNzhl QhvA== 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 a8si18113998pgm.592.2019.06.03.08.52.35; Mon, 03 Jun 2019 08:52:36 -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 S1729624AbfFCPw1 (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:52:27 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54118 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729600AbfFCPwY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:52:24 -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 58E381A25; Mon, 3 Jun 2019 08:52:24 -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 3EFF23F246; Mon, 3 Jun 2019 08:52:23 -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, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Subject: [RFC PATCH 56/57] drivers: Introduce driver_find_next_device() helper Date: Mon, 3 Jun 2019 16:50:22 +0100 Message-Id: <1559577023-558-57-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/include/linux/device.h b/include/linux/device.h index 528efc0..39a7755 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -456,6 +456,12 @@ driver_find_device_by_fwnode(struct device_driver *drv, return driver_find_device(drv, start, (void *)fwnode, device_match_fwnode); } +static inline struct device *driver_find_next_device(struct device_driver *drv, + struct device *start) +{ + return driver_find_device(drv, start, NULL, device_match_any); +} + void driver_deferred_probe_add(struct device *dev); int driver_deferred_probe_check_state(struct device *dev);
Similar to bus_find_next_device(), add a helper to find the next device for the given driver. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- include/linux/device.h | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.7.4