From nobody Mon Feb 9 23:15:45 2026 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.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 BA18E36C0D3; Tue, 13 Jan 2026 09:26:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768296374; cv=none; b=g1wgBWirzxCMITfqdmM6BuRUiNssxi3QnamV0g6kA4y2w8OISmQwqFrELKBoE5bQWOqWFqrVGp2ZGEwacid5vP/sexSbR4xXZuY7EkolcVyUy8QIo+yMwoysjLsLbp6AvfUeeyV3GAsRnWyGWqDSEwBEVcN53JlnFnnZ2Kw7pTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768296374; c=relaxed/simple; bh=AP3HTD5guyPD5/yYZSI2KJrHlN2laHw5Ah5N6pDQpKU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EYRYVfygXZb/Jv3jLhn3C+8LvqDnXqOGBXgh88rY6mYknNAwOJm1sJg9OLqoNAxI7VNsMKVSBKczko0eLiXFVPql0qVLKFM7+o9kazqY8J3VdGQmREDh/XQKtswA7iU0uoWKb8Rp64qR+Z4x6fBfluDPCEIh3TO8SbpR4AwaKz4= 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.183.201 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: by mail.gandi.net (Postfix) with ESMTPSA id 0C089433BF; Tue, 13 Jan 2026 09:26:02 +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 11/11] HID: sony: Use pm_ptr instead of #ifdef CONFIG_PM Date: Tue, 13 Jan 2026 10:24:59 +0100 Message-ID: <20260113092546.265734-12-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: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduudelleehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeeurghsthhivghnucfpohgtvghrrgcuoehhrgguvghssheshhgruggvshhsrdhnvghtqeenucggtffrrghtthgvrhhnpeevtefhleevjeffteekleehheeujeelhfdvheethefggefhkefgvdefhfegkeeiteenucfkphepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefnecuvehluhhsthgvrhfuihiivgepkeenucfrrghrrghmpehinhgvthepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefpdhhvghlohepohhlihhmphhitgdpmhgrihhlfhhrohhmpehhrgguvghssheshhgruggvshhsrdhnvghtpdhqihgupedtvedtkeelgeeffeeuhfdpmhhouggvpehsmhhtphhouhhtpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqihhnphhuthesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehjihhkohhssehkvghrnhgvl 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-sony.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index b966e4044238..de8135c1e3df 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -2179,7 +2179,6 @@ static void sony_remove(struct hid_device *hdev) hid_hw_stop(hdev); } =20 -#ifdef CONFIG_PM =20 static int sony_suspend(struct hid_device *hdev, pm_message_t message) { @@ -2214,8 +2213,6 @@ static int sony_resume(struct hid_device *hdev) return 0; } =20 -#endif - static const struct hid_device_id sony_devices[] =3D { { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER), .driver_data =3D SIXAXIS_CONTROLLER_USB }, @@ -2284,12 +2281,9 @@ static struct hid_driver sony_driver =3D { .remove =3D sony_remove, .report_fixup =3D sony_report_fixup, .raw_event =3D sony_raw_event, - -#ifdef CONFIG_PM - .suspend =3D sony_suspend, - .resume =3D sony_resume, - .reset_resume =3D sony_resume, -#endif + .suspend =3D pm_ptr(sony_suspend), + .resume =3D pm_ptr(sony_resume), + .reset_resume =3D pm_ptr(sony_resume), }; =20 static int __init sony_init(void) --=20 2.52.0