From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pdx-out-002.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-002.esa.us-west-2.outbound.mail-perimeter.amazon.com [44.246.1.125]) (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 BA18E286425; Sun, 26 Jul 2026 10:19:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=44.246.1.125 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785061197; cv=none; b=CuBaUxMlyXwYnWRrbd83GYeo4EJzsLJUhnAB2AWtVvKVsbp1CesxCYY4tfCDUib1HSAgF3r/Fy1OaJLaixxKczNKfkynOopZVOTk2aZN5JHYAh2cNQAuncOPOza7rBHNv7c5vCGkSGr+GNsMONsj+cAO/qXoQLe0p5tvEgoUcTI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785061197; c=relaxed/simple; bh=Au2jGWBQN/i2YaPgSzikwkAxqaVP4qGTpVegc2n7t+s=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uX5/po2qO6rxYjtCQFjGVtEl3A5vk3GbDrFMTdsqfd5q1aTP/7BrFRRBg4aNian/14JBxQfI1QkGt1oA027h9MYWXKoDafdOSJ/iSdULRfAj+Jq+S/cSSDmaPTYThvcUOfQHR2IvtCfOeSyPzxTu8CPAXDmYDevierU8OXoC/yY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=Et+edu4F; arc=none smtp.client-ip=44.246.1.125 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="Et+edu4F" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1785061196; x=1816597196; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=yps4lBc/RYwlxTR0dmczc+YOvWPbhS0zT2kuXNnrCAk=; b=Et+edu4Fr5EWJC6KZv2MYFT6ck+x1AvA5waOmkB7WjvJho93oGNo8duD hg22UarCdFPMyWSaK+T0eeQOhF3dZKHnFXY4bzqu21NVzIbi2TuIyq4Gs VBeuwNhpvSdy+Eve0HQhnfjvTRs5kIetw6duvPRxeou9WI99mcZAZ9Uz+ fyYvSWnwDrAJ0Q3SKcF4nihwX4pZ1GEO9dwp2C8WoVBgXhZRKAtLLphIi EuVcOaQP9CesOrKneFZVd+RQhteyPQOKDj2RVjRiNtelf9qDy3+Qz/dy3 6RoP5dQLse42po4nko1EJponhHAf8IZr3NSW46xBsxYbs6VC3X1AwWVWb w==; X-CSE-ConnectionGUID: AaK5DiqzSzaqUVCAN7Wyog== X-CSE-MsgGUID: tFDOGvPiSoW9YPVbNWeTsQ== X-IronPort-AV: E=Sophos;i="6.25,186,1779148800"; d="scan'208";a="24374917" Received: from ip-10-5-6-203.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.6.203]) by internal-pdx-out-002.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2026 10:19:56 +0000 Received: from EX19MTAUWC001.ant.amazon.com [205.251.233.105:30352] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.12.152:2525] with esmtp (Farcaster) id db353ba9-8767-4de2-bffd-67053e82dca0; Sun, 26 Jul 2026 10:19:56 +0000 (UTC) X-Farcaster-Flow-ID: db353ba9-8767-4de2-bffd-67053e82dca0 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC001.ant.amazon.com (10.250.64.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.43; Sun, 26 Jul 2026 10:19:55 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 26 Jul 2026 10:19:50 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v4 10/13] platform/x86: uniwill-wmi: use devm_blocking_notifier_chain_register() Date: Sun, 26 Jul 2026 10:17:36 +0000 Message-ID: <20260726101739.33170-11-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260726101739.33170-1-farbere@amazon.com> References: <20260726101739.33170-1-farbere@amazon.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EX19D044UWA003.ant.amazon.com (10.13.139.43) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the devm_uniwill_wmi_unregister_notifier() callback. Signed-off-by: Eliav Farber --- drivers/platform/x86/uniwill/uniwill-wmi.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/platform/x86/uniwill/uniwill-wmi.c b/drivers/platform/x86/uniwill/uniwill-wmi.c index afcbfa4f7552..2ffa29a829ee 100644 --- a/drivers/platform/x86/uniwill/uniwill-wmi.c +++ b/drivers/platform/x86/uniwill/uniwill-wmi.c @@ -26,22 +26,11 @@ static BLOCKING_NOTIFIER_HEAD(uniwill_wmi_chain_head); -static void devm_uniwill_wmi_unregister_notifier(void *data) -{ - struct notifier_block *nb = data; - - blocking_notifier_chain_unregister(&uniwill_wmi_chain_head, nb); -} - int devm_uniwill_wmi_register_notifier(struct device *dev, struct notifier_block *nb) { - int ret; - - ret = blocking_notifier_chain_register(&uniwill_wmi_chain_head, nb); - if (ret < 0) - return ret; - - return devm_add_action_or_reset(dev, devm_uniwill_wmi_unregister_notifier, nb); + return devm_blocking_notifier_chain_register(dev, + &uniwill_wmi_chain_head, + nb); } static void uniwill_wmi_notify(struct wmi_device *wdev, union acpi_object *obj) -- 2.47.3