From nobody Thu Apr 9 20:25:36 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 542D21FF7B3; Thu, 5 Mar 2026 20:29:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772742577; cv=none; b=QFYequoZvtck6AFJiwW51zRYTxayZZ9MSnWveIvjOUk0An7/1UNPpO3if5ll/4zHqR1ezZdlpeeJ/0hIO0orKWs/6w5ODTU8laqN5wU+D3tq375iICsrKAiRMUtTurZOs4vT+VhgUMPo1mO5G7p/yKsdwyIoD3lLVdJSfH8N+yM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772742577; c=relaxed/simple; bh=ziGtucL7M4e6LU2C4HHhwkolvBS+6+KksO9rwe9mBuk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DAAi89L/3LGHdH9qK24KKxEDYWM6lwsfDb4TN81djKjr3W5L9oj/F5hleMifK+gNKaoijUQSPgrnTfKMVAGzn4we0XvlEfJJArHlKKzRb3r2QE/heP2YttrtYrANAd/3WqT9JeuqQF/mD6XscVk8jSnFoy/4SQUEm8gJZ+oewT4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kM36gVx3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kM36gVx3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22A52C19422; Thu, 5 Mar 2026 20:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772742576; bh=ziGtucL7M4e6LU2C4HHhwkolvBS+6+KksO9rwe9mBuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kM36gVx3YZsXg07uloYpmFXg6n0UUOorc5SnkJmXsP2CIZ2C6vKX7bOPGpqZdND0f TGq+HJwVxGwDwWNRZdmgjG9e2D+klm9UB8XUjnv5ORivMp0uNFoWQp2l+sGjOOP4Fz dAjRc6EbLbdoQqDCT+9DkKBwOPA/jms31LHSm92PobCajnqZbU52SO2CqR2mj0l07T //HGp3nZD+cs0e27x9Cne5uasdZ8XcjgpT56BFXSwb2GsT1/AhHLcM8ggN8RRBy3vD iwYBsB1riGsGtIAmJmSHHiUKOUJ/dh7G4Bk/BW0tYXld+xasBQBTaiPOkxl0sHCRHH ysP2iHkGu6EXQ== From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Hans de Goede Subject: [PATCH v1 2/9] ACPI: PAD: Rearrange notify handler installation and removal Date: Thu, 05 Mar 2026 21:11:22 +0100 Message-ID: <2011993.taCxCBeP46@rafael.j.wysocki> Organization: Linux Kernel Development In-Reply-To: <4505861.ejJDZkT8p0@rafael.j.wysocki> References: <4505861.ejJDZkT8p0@rafael.j.wysocki> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Rafael J. Wysocki" Use acpi_dev_install_notify_handler() and acpi_dev_remove_notify_handler() for installing and removing the ACPI notify handler, respectively, which allows acpi_pad_notify() and acpi_pad_remove() to be simplified quite a bit. No intentional functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_pad.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index c9a0bcaba2e4..407a0d68525c 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c @@ -407,8 +407,7 @@ static void acpi_pad_handle_notify(acpi_handle handle) mutex_unlock(&isolated_cpus_lock); } =20 -static void acpi_pad_notify(acpi_handle handle, u32 event, - void *data) +static void acpi_pad_notify(acpi_handle handle, u32 event, void *data) { struct acpi_device *adev =3D data; =20 @@ -427,30 +426,22 @@ static void acpi_pad_notify(acpi_handle handle, u32 e= vent, static int acpi_pad_probe(struct platform_device *pdev) { struct acpi_device *adev =3D ACPI_COMPANION(&pdev->dev); - acpi_status status; =20 strscpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME); strscpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS); =20 - status =3D acpi_install_notify_handler(adev->handle, - ACPI_DEVICE_NOTIFY, acpi_pad_notify, adev); - - if (ACPI_FAILURE(status)) - return -ENODEV; - - return 0; + return acpi_dev_install_notify_handler(adev, ACPI_DEVICE_NOTIFY, + acpi_pad_notify, adev); } =20 static void acpi_pad_remove(struct platform_device *pdev) { - struct acpi_device *adev =3D ACPI_COMPANION(&pdev->dev); - mutex_lock(&isolated_cpus_lock); acpi_pad_idle_cpus(0); mutex_unlock(&isolated_cpus_lock); =20 - acpi_remove_notify_handler(adev->handle, - ACPI_DEVICE_NOTIFY, acpi_pad_notify); + acpi_dev_remove_notify_handler(ACPI_COMPANION(&pdev->dev), + ACPI_DEVICE_NOTIFY, acpi_pad_notify); } =20 static const struct acpi_device_id pad_device_ids[] =3D { --=20 2.51.0