From nobody Mon Feb 9 15:26:20 2026 Received: from mslow3.mail.gandi.net (mslow3.mail.gandi.net [217.70.178.249]) (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 99BF9389DEE; Tue, 13 Jan 2026 09:26:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.178.249 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768296376; cv=none; b=sMit0TnA/H2oyczK6AkecyWjWZUXtl4T5w4ckH3l1cLA/dg2pTPo3qZYF8Rq5ZuFT8mVWCnZh+W+hGpObxOnsguiz7aJQ8er0RQkQmuwdeDUnl3GiOgreGcjVsjo2Jha6edNuxQ1mG+xos9PmjmtageNt/afRpad3iLhgqRqym0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768296376; c=relaxed/simple; bh=6lXNvJ81Dwr/f+D756gI5rYghZhatj+5Pb+6HldUvoA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HJ0jvzqmge0YdHxJMqIO0UgEcTkJL/utS51P77yXFAnc/vz83WEDl3/uD+wqJIhzE09T9ySuaKboIJzTLec9a0i4osNtKQRe6LCNQ1Whlgf4gw0g+LbE+kq1sXPI5XRA1LPMRtpqT1PrsYG7YJFkJfBQjMbhscLDHIhHYzQac8g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net; spf=pass smtp.mailfrom=hadess.net; arc=none smtp.client-ip=217.70.178.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hadess.net Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by mslow3.mail.gandi.net (Postfix) with ESMTP id 86014580EEC; Tue, 13 Jan 2026 09:26:04 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id D051043388; Tue, 13 Jan 2026 09:25:56 +0000 (UTC) From: Bastien Nocera To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jiri Kosina , Benjamin Tissoires , Bastien Nocera Subject: [PATCH v2 02/11] HID: appletb-kbd: Use pm_ptr instead of #ifdef CONFIG_PM Date: Tue, 13 Jan 2026 10:24:50 +0100 Message-ID: <20260113092546.265734-3-hadess@hadess.net> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260113092546.265734-1-hadess@hadess.net> References: <20260113092546.265734-1-hadess@hadess.net> 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 X-GND-Sasl: hadess@hadess.net X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduudelleehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeeurghsthhivghnucfpohgtvghrrgcuoehhrgguvghssheshhgruggvshhsrdhnvghtqeenucggtffrrghtthgvrhhnpeevtefhleevjeffteekleehheeujeelhfdvheethefggefhkefgvdefhfegkeeiteenucfkphepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefpdhhvghlohepohhlihhmphhitgdpmhgrihhlfhhrohhmpehhrgguvghssheshhgruggvshhsrdhnvghtpdhqihgupefftdehuddtgeeffeekkedpmhhouggvpehsmhhtphhouhhtpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqihhnphhuthesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehjihhkohhssehkvghrnhgvl hdrohhrghdprhgtphhtthhopegsvghnjhgrmhhinhdrthhishhsohhirhgvshesrhgvughhrghtrdgtohhmpdhrtghpthhtohephhgruggvshhssehhrgguvghsshdrnhgvth X-GND-State: clean X-GND-Score: -100 Content-Type: text/plain; charset="utf-8" This increases build coverage and allows to drop an #ifdef. Signed-off-by: Bastien Nocera --- drivers/hid/hid-appletb-kbd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/hid/hid-appletb-kbd.c b/drivers/hid/hid-appletb-kbd.c index b00687e67ce8..a1db3b3d0667 100644 --- a/drivers/hid/hid-appletb-kbd.c +++ b/drivers/hid/hid-appletb-kbd.c @@ -466,7 +466,6 @@ static void appletb_kbd_remove(struct hid_device *hdev) hid_hw_stop(hdev); } =20 -#ifdef CONFIG_PM static int appletb_kbd_suspend(struct hid_device *hdev, pm_message_t msg) { struct appletb_kbd *kbd =3D hid_get_drvdata(hdev); @@ -485,7 +484,6 @@ static int appletb_kbd_reset_resume(struct hid_device *= hdev) =20 return 0; } -#endif =20 static const struct hid_device_id appletb_kbd_hid_ids[] =3D { /* MacBook Pro's 2018, 2019, with T2 chip: iBridge Display */ @@ -501,10 +499,8 @@ static struct hid_driver appletb_kbd_hid_driver =3D { .remove =3D appletb_kbd_remove, .event =3D appletb_kbd_hid_event, .input_configured =3D appletb_kbd_input_configured, -#ifdef CONFIG_PM - .suspend =3D appletb_kbd_suspend, - .reset_resume =3D appletb_kbd_reset_resume, -#endif + .suspend =3D pm_ptr(appletb_kbd_suspend), + .reset_resume =3D pm_ptr(appletb_kbd_reset_resume), .driver.dev_groups =3D appletb_kbd_groups, }; module_hid_driver(appletb_kbd_hid_driver); --=20 2.52.0