Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3454458pxb; Mon, 4 Apr 2022 17:30:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3IgyWALw0ZatV7LhW3QSDPRIl4WyOJWcAH7rTUdDq+TRSWN1TbNcZGRRttmT3xgeqHmgg X-Received: by 2002:a17:902:f64d:b0:14f:fb63:f1a with SMTP id m13-20020a170902f64d00b0014ffb630f1amr666792plg.159.1649118626482; Mon, 04 Apr 2022 17:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649118626; cv=none; d=google.com; s=arc-20160816; b=bufUKdXPKwskVu8e8cwJkdWXEA8NGWcqsUjXZKmFemXBNJj7ajzPLXX9imK9fe8FAF VsisW1YROHNcTWlOcCoRKM35iWAPaTlcbyCI2Blb8ePFut/2LHiPVsyD1KSWKoHuD61u PwsMhk5CReDRtP4ACG5aIpfNCZ//xJhRoRPGZRXRRnaYChWTx9jfGwGwmU9KpKJFaPUX fxikK7YBJ+90oN0iiWkkMxSAbQERbAOV+kyX0Ij4DUnv4+lcARMFJ84moCqQEdeNVtbS cCny28BnbEI8E0gbF5jYJf5nP+64HIqQTpKRJDFj7GuPWLsdml7ubKdEyFulZ6Dq8PIm T0Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=W5t4no3XuZkulEzjsfnRyieqxCfJbEhG12NzV1QSn04=; b=Wx3lmVGbi57uuolvcAiEHLMWmVJ0h1HmS2tfLKEBNtWTFyB8l4htLDC9Bvf3Hw3IOe 5bWu9FXHxkMYc+dgOvBOuctyRGZU3xGBNm97KCfc+RmzHlU2sYB8o+xOtk4bHVelm0m6 DegM7HVo926P5uHCAAFkGZs+2y+j3gv28N7R+4eTMvY5+ne5brg4vqr7naaX4rosS5uA D47i14uKpfsWOLGY/7GwxDy0I3/YHPdM1Q2nzv8j6t6G3MaHglSsC3KuOfEyvLBKE+Lt UuQKbYHoCSP/oTIFRoUBiqRYv++qxH8jEuFSAhHQhwgDgDv07iqojx4tZ7oKmV/6ZanH poMA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w63-20020a17090a6bc500b001c68744da0dsi698125pjj.39.2022.04.04.17.30.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 17:30:26 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B799E49F07; Mon, 4 Apr 2022 16:50:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378576AbiDDP1Y (ORCPT + 99 others); Mon, 4 Apr 2022 11:27:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241874AbiDDP1P (ORCPT ); Mon, 4 Apr 2022 11:27:15 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01AA2193EA; Mon, 4 Apr 2022 08:25:18 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.0.0) id 901cfd5021346696; Mon, 4 Apr 2022 17:25:17 +0200 Received: from kreacher.localnet (unknown [213.134.181.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 74C6266BCD2; Mon, 4 Apr 2022 17:25:16 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Linux PCI , Bjorn Helgaas , Mika Westerberg Subject: [PATCH v1 1/3] ACPI: bus: Introduce acpi_dev_for_each_child() Date: Mon, 04 Apr 2022 17:21:50 +0200 Message-ID: <3679769.kQq0lBPeGt@kreacher> In-Reply-To: <21439956.EfDdHjke4D@kreacher> References: <21439956.EfDdHjke4D@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.181.62 X-CLIENT-HOSTNAME: 213.134.181.62 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvvddrudejvddgkeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvjeelgffhiedukedtleekkedvudfggefhgfegjefgueekjeelvefggfdvledutdenucfkphepvddufedrudefgedrudekuddriedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekuddriedvpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeeipdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqphgtihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgt phhtthhopehhvghlghgrrghssehkvghrnhgvlhdrohhrghdprhgtphhtthhopehmihhkrgdrfigvshhtvghrsggvrhhgsehlihhnuhigrdhinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Introduce a wrapper around device_for_each_child() to iterate over the children of a given ACPI device object. This function will be used in subsequent change sets. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/bus.c | 6 ++++++ include/acpi/acpi_bus.h | 2 ++ 2 files changed, 8 insertions(+) Index: linux-pm/drivers/acpi/bus.c =================================================================== --- linux-pm.orig/drivers/acpi/bus.c +++ linux-pm/drivers/acpi/bus.c @@ -1070,6 +1070,12 @@ int acpi_bus_for_each_dev(int (*fn)(stru } EXPORT_SYMBOL_GPL(acpi_bus_for_each_dev); +int acpi_dev_for_each_child(struct acpi_device *adev, + int (*fn)(struct device *, void *), void *data) +{ + return device_for_each_child(&adev->dev, data, fn); +} + /* -------------------------------------------------------------------------- Initialization/Cleanup -------------------------------------------------------------------------- */ Index: linux-pm/include/acpi/acpi_bus.h =================================================================== --- linux-pm.orig/include/acpi/acpi_bus.h +++ linux-pm/include/acpi/acpi_bus.h @@ -481,6 +481,8 @@ void acpi_initialize_hp_context(struct a extern struct bus_type acpi_bus_type; int acpi_bus_for_each_dev(int (*fn)(struct device *, void *), void *data); +int acpi_dev_for_each_child(struct acpi_device *adev, + int (*fn)(struct device *, void *), void *data); /* * Events