From nobody Mon Feb 9 15:26:21 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 156DC34575A; Tue, 13 Jan 2026 09:26:15 +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=1768296381; cv=none; b=TileVnMkLujf3dnGcIeFG0x0H7VI4p1U5V2hRiWs02E4XvzwP6dOiAkQCgULni4PGuCvG8BkxEomZlqoDQYyENxrVVlTLn4Q8/Juvo9fDBoz4kPaJfcm/0fP67BqJ4p9MWrW5KCHEfUVjuDVHCOVMSn7UhAeMdP75vDrQzV49ro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768296381; c=relaxed/simple; bh=oTnqWe+/dcJEpnq2L5dMa15m0zfxhkVVoTpvJxcHD0w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Imfta0a5JLIkmX71xjx/b5QepnbIfBIdMQW4H4IH7HQzJ5mWI1EDwtzuQse6nMVpX13KBeIHi5v4fLDnTtdLk440kHwtAi0fJq6AKxf8JD2gTcsPtlWoDIFInCqayIhizxUJdVN4Ufy9Q+pLJwGCfIAsWJ3s0bytIyTQpTxcrMM= 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 [IPv6:2001:4b98:dc4:8::228]) by mslow3.mail.gandi.net (Postfix) with ESMTP id 7D47F580EE0; Tue, 13 Jan 2026 09:26:07 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id B8FC043379; Tue, 13 Jan 2026 09:25:59 +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 06/11] HID: nintendo: Use pm_ptr instead of #ifdef CONFIG_PM Date: Tue, 13 Jan 2026 10:24:54 +0100 Message-ID: <20260113092546.265734-7-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: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduudelleehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeeurghsthhivghnucfpohgtvghrrgcuoehhrgguvghssheshhgruggvshhsrdhnvghtqeenucggtffrrghtthgvrhhnpeevtefhleevjeffteekleehheeujeelhfdvheethefggefhkefgvdefhfegkeeiteenucfkphepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefpdhhvghlohepohhlihhmphhitgdpmhgrihhlfhhrohhmpehhrgguvghssheshhgruggvshhsrdhnvghtpdhqihgupeeukefhvedtgeeffeejledpmhhouggvpehsmhhtphhouhhtpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqihhnphhuthesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehjihhkohhssehkvghrnhgvl 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-nintendo.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c index 7ac9217d9096..29008c2cc530 100644 --- a/drivers/hid/hid-nintendo.c +++ b/drivers/hid/hid-nintendo.c @@ -2748,8 +2748,6 @@ static void nintendo_hid_remove(struct hid_device *hd= ev) hid_hw_stop(hdev); } =20 -#ifdef CONFIG_PM - static int nintendo_hid_resume(struct hid_device *hdev) { struct joycon_ctlr *ctlr =3D hid_get_drvdata(hdev); @@ -2792,8 +2790,6 @@ static int nintendo_hid_suspend(struct hid_device *hd= ev, pm_message_t message) return 0; } =20 -#endif - static const struct hid_device_id nintendo_hid_devices[] =3D { { HID_USB_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_PROCON) }, @@ -2827,11 +2823,8 @@ static struct hid_driver nintendo_hid_driver =3D { .probe =3D nintendo_hid_probe, .remove =3D nintendo_hid_remove, .raw_event =3D nintendo_hid_event, - -#ifdef CONFIG_PM - .resume =3D nintendo_hid_resume, - .suspend =3D nintendo_hid_suspend, -#endif + .resume =3D pm_ptr(nintendo_hid_resume), + .suspend =3D pm_ptr(nintendo_hid_suspend), }; static int __init nintendo_init(void) { --=20 2.52.0