From nobody Mon Feb 9 13:00:27 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 4316838B9B6; Tue, 13 Jan 2026 09:26:19 +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=1768296388; cv=none; b=QgpoelcSQeh4w3gXmJIjGVxwCbHaGetgy9d6NtHAI6YXOrvdQdcnZlgIoeYkuSTRy2FuIBQxqr53uSmSGFrb8dXjq7x01/AYsgIl2GJDUnF9cDzk8sgAuXB8o1jISe3fLQNITlltffaFKP7qe2PU1s7ac42k8YzEiKLIT4ZfC0I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768296388; c=relaxed/simple; bh=gOcdYD0n5Tc/jmGc9RKtrnLaXwYhiHJ+PGHcnImXMp0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EgAIRQ+gLOWJvBFGf1ywCtaQQUI3zdOnG7R4S5vy41ckpTOSPxrVmAFyqVva/XlTx70NsYtYtHAe9/A6wl7bv48p+Y/Yd3DARe3al7DVHmwlKOWztk9ht8+4A7EZJp1U4KzTXYse5zbmHdHUxJJ+l1KyON1HGoOpiIFNs3G1zUc= 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 9F686580F21; Tue, 13 Jan 2026 09:26:08 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1BDFF41DF3; Tue, 13 Jan 2026 09:26:00 +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 08/11] HID: hid-sensor-hub: Use pm_ptr instead of #ifdef CONFIG_PM Date: Tue, 13 Jan 2026 10:24:56 +0100 Message-ID: <20260113092546.265734-9-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: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduudelleehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeeurghsthhivghnucfpohgtvghrrgcuoehhrgguvghssheshhgruggvshhsrdhnvghtqeenucggtffrrghtthgvrhhnpeevtefhleevjeffteekleehheeujeelhfdvheethefggefhkefgvdefhfegkeeiteenucfkphepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefpdhhvghlohepohhlihhmphhitgdpmhgrihhlfhhrohhmpehhrgguvghssheshhgruggvshhsrdhnvghtpdhqihgupeduueffhffhgedufffhfedpmhhouggvpehsmhhtphhouhhtpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqihhnphhuthesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehjihhkohhssehkvghrnhgvl 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-sensor-hub.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 4c94c03cb573..0edec902be41 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -422,7 +422,6 @@ int sensor_hub_input_get_attribute_info(struct hid_sens= or_hub_device *hsdev, } EXPORT_SYMBOL_GPL(sensor_hub_input_get_attribute_info); =20 -#ifdef CONFIG_PM static int sensor_hub_suspend(struct hid_device *hdev, pm_message_t messag= e) { struct sensor_hub_data *pdata =3D hid_get_drvdata(hdev); @@ -463,7 +462,6 @@ static int sensor_hub_reset_resume(struct hid_device *h= dev) { return 0; } -#endif =20 /* * Handle raw report as sent by device @@ -772,11 +770,9 @@ static struct hid_driver sensor_hub_driver =3D { .remove =3D sensor_hub_remove, .raw_event =3D sensor_hub_raw_event, .report_fixup =3D sensor_hub_report_fixup, -#ifdef CONFIG_PM - .suspend =3D sensor_hub_suspend, - .resume =3D sensor_hub_resume, - .reset_resume =3D sensor_hub_reset_resume, -#endif + .suspend =3D pm_ptr(sensor_hub_suspend), + .resume =3D pm_ptr(sensor_hub_resume), + .reset_resume =3D pm_ptr(sensor_hub_reset_resume), }; module_hid_driver(sensor_hub_driver); =20 --=20 2.52.0