From mboxrd@z Thu Jan 1 00:00:00 1970 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-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: hadess@hadess.net X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduudelleehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeeurghsthhivghnucfpohgtvghrrgcuoehhrgguvghssheshhgruggvshhsrdhnvghtqeenucggtffrrghtthgvrhhnpeevtefhleevjeffteekleehheeujeelhfdvheethefggefhkefgvdefhfegkeeiteenucfkphepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefnecuvehluhhsthgvrhfuihiivgepkeenucfrrghrrghmpehinhgvthepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefpdhhvghlohepohhlihhmphhitgdpmhgrihhlfhhrohhmpehhrgguvghssheshhgruggvshhsrdhnvghtpdhqihgupedtvedtkeelgeeffeeuhfdpmhhouggvpehsmhhtphhouhhtpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqihhnphhuthesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehjihhkohhssehkvghrnhgvl hdrohhrghdprhgtphhtthhopegsvghnjhgrmhhinhdrthhishhsohhirhgvshesrhgvughhrghtrdgtohhmpdhrtghpthhtohephhgruggvshhssehhrgguvghsshdrnhgvth X-GND-State: clean X-GND-Score: -100 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); } -#ifdef CONFIG_PM 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; } -#endif - static const struct hid_device_id sony_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER), .driver_data = SIXAXIS_CONTROLLER_USB }, @@ -2284,12 +2281,9 @@ static struct hid_driver sony_driver = { .remove = sony_remove, .report_fixup = sony_report_fixup, .raw_event = sony_raw_event, - -#ifdef CONFIG_PM - .suspend = sony_suspend, - .resume = sony_resume, - .reset_resume = sony_resume, -#endif + .suspend = pm_ptr(sony_suspend), + .resume = pm_ptr(sony_resume), + .reset_resume = pm_ptr(sony_resume), }; static int __init sony_init(void) -- 2.52.0