From nobody Mon Feb 9 19:25:24 2026 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 4F34034FF5B; Mon, 12 Jan 2026 10:55:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768215324; cv=none; b=Oy44T7Jbf0Rp0xUTzOhGi8WPI5fKbRxm2eUdUVEUoXmstDlzcC33TP2yminjwMP48UAsSw34+CuC58VgJQn8cOUzeWi+ynq7EMA32RFvEjQz8NEdQGIazTCg8JW9/123gH0I1O545fDE/atrY5FX7aLXfl49KLvv5ND2AlsWvL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768215324; c=relaxed/simple; bh=NPS4h5UvRAYFBw42aePxoXZazbahXZQnvthTWw47lPM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aSNrruqorRIIIm8MmZ0jfF6D6CXUO/VII0V7oWUy8Fp86C6dRVdyj4xs/7d30M5rKyhK++s6fhybJAfAGHdGGB0lW4zHcq0jhcBzkotHAX+cI5fiIdRaod+6vlcy8+AAOWFJ4ZdQFACs/+KpQVAfghHl9n+6HSpxJWYyfIHjiys= 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.196 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 9FD6243E8C; Mon, 12 Jan 2026 10:55:16 +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 12/12] HID: surface: Use pm_ptr_sleep instead of #ifdef CONFIG_PM_SLEEP Date: Mon, 12 Jan 2026 11:53:01 +0100 Message-ID: <20260112105500.3664834-13-hadess@hadess.net> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112105500.3664834-1-hadess@hadess.net> References: <20260112105500.3664834-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-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduudejvdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeeurghsthhivghnucfpohgtvghrrgcuoehhrgguvghssheshhgruggvshhsrdhnvghtqeenucggtffrrghtthgvrhhnpeevtefhleevjeffteekleehheeujeelhfdvheethefggefhkefgvdefhfegkeeiteenucfkphepvdgrtddumegvfeegmegvtgejfeemtghfvddtmegsrgegfeemrgeijeeimegtvdgufeemjegrheefnecuvehluhhsthgvrhfuihiivgepuddtnecurfgrrhgrmhepihhnvghtpedvrgdtudemvgefgeemvggtjeefmegtfhdvtdemsggrgeefmegrieejieemtgdvugefmeejrgehfedphhgvlhhopeholhhimhhpihgtpdhmrghilhhfrhhomhephhgruggvshhssehhrgguvghsshdrnhgvthdpqhhiugeplefhffeivdegfefgkeevpdhmohguvgepshhmthhpohhuthdpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdhinhhpuhhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepjhhikhhosheskhgvrhhnv ghlrdhorhhgpdhrtghpthhtohepsggvnhhjrghmihhnrdhtihhsshhoihhrvghssehrvgguhhgrthdrtghomhdprhgtphhtthhopehhrgguvghssheshhgruggvshhsrdhnvght Content-Type: text/plain; charset="utf-8" This increases build coverage and allows to drop an #ifdef. Signed-off-by: Bastien Nocera --- drivers/hid/surface-hid/surface_hid.c | 2 +- drivers/hid/surface-hid/surface_hid_core.c | 5 ----- drivers/hid/surface-hid/surface_kbd.c | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/hid/surface-hid/surface_hid.c b/drivers/hid/surface-hi= d/surface_hid.c index eae47e0d95ed..21904612b5ad 100644 --- a/drivers/hid/surface-hid/surface_hid.c +++ b/drivers/hid/surface-hid/surface_hid.c @@ -241,7 +241,7 @@ static struct ssam_device_driver surface_hid_driver =3D= { .match_table =3D surface_hid_match, .driver =3D { .name =3D "surface_hid", - .pm =3D &surface_hid_pm_ops, + .pm =3D pm_ptr_sleep(&surface_hid_pm_ops), .probe_type =3D PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/hid/surface-hid/surface_hid_core.c b/drivers/hid/surfa= ce-hid/surface_hid_core.c index 6690c24f28f0..33fe15fbcf6c 100644 --- a/drivers/hid/surface-hid/surface_hid_core.c +++ b/drivers/hid/surface-hid/surface_hid_core.c @@ -281,11 +281,6 @@ const struct dev_pm_ops surface_hid_pm_ops =3D { }; EXPORT_SYMBOL_GPL(surface_hid_pm_ops); =20 -#else /* CONFIG_PM_SLEEP */ - -const struct dev_pm_ops surface_hid_pm_ops =3D { }; -EXPORT_SYMBOL_GPL(surface_hid_pm_ops); - #endif /* CONFIG_PM_SLEEP */ =20 MODULE_AUTHOR("Maximilian Luz "); diff --git a/drivers/hid/surface-hid/surface_kbd.c b/drivers/hid/surface-hi= d/surface_kbd.c index 0be01b5e7425..6ab6870f10e8 100644 --- a/drivers/hid/surface-hid/surface_kbd.c +++ b/drivers/hid/surface-hid/surface_kbd.c @@ -288,7 +288,7 @@ static struct platform_driver surface_kbd_driver =3D { .driver =3D { .name =3D "surface_keyboard", .acpi_match_table =3D surface_kbd_match, - .pm =3D &surface_hid_pm_ops, + .pm =3D pm_ptr_sleep(&surface_hid_pm_ops), .probe_type =3D PROBE_PREFER_ASYNCHRONOUS, }, }; --=20 2.52.0