lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250114153726.11802-14-kuurtb@gmail.com>
Date: Tue, 14 Jan 2025 10:37:21 -0500
From: Kurt Borja <kuurtb@...il.com>
To: platform-driver-x86@...r.kernel.org
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
	"Len Brown" <lenb@...nel.org>,
	linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	"Mario Limonciello" <mario.limonciello@....com>,
	"Armin Wolf" <W_Armin@....de>,
	"Joshua Grisham" <josh@...huagrisham.com>,
	"Derek J. Clark" <derekjohn.clark@...il.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	"Hans de Goede" <hdegoede@...hat.com>,
	"Kurt Borja" <kuurtb@...il.com>,
	"Maximilian Luz" <luzmaximilian@...il.com>,
	"Lee, Chun-Yi" <jlee@...e.com>,
	"Shyam Sundar S K" <Shyam-sundar.S-k@....com>,
	"Corentin Chary" <corentin.chary@...il.com>,
	"Luke D. Jones" <luke@...nes.dev>,
	"Lyndon Sanche" <lsanche@...deno.ca>,
	"Ike Panhc" <ike.pan@...onical.com>,
	"Henrique de Moraes Holschuh" <hmh@....eng.br>,
	"Mark Pearson" <mpearson-lenovo@...ebb.ca>,
	"Alexis Belmonte" <alexbelm48@...il.com>,
	"Ai Chao" <aichao@...inos.cn>,
	"Gergo Koteles" <soyer@....hu>,
	Dell.Client.Kernel@...l.com,
	ibm-acpi-devel@...ts.sourceforge.net
Subject: [PATCH v2 13/18] platform/x86: inspur_platform_profile: Use devm_platform_profile_register()

Replace platform_profile_register() with it's device managed version.
While at it, pass inspur_wmi_priv to the class device as drvdata and
replace uses of container_of() with dev_get_drvdata().

Reviewed-by: Mario Limonciello <mario.limonciello@....com>
Signed-off-by: Kurt Borja <kuurtb@...il.com>
---
 drivers/platform/x86/inspur_platform_profile.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/platform/x86/inspur_platform_profile.c b/drivers/platform/x86/inspur_platform_profile.c
index 06df3aae9a56..e1631de6ad86 100644
--- a/drivers/platform/x86/inspur_platform_profile.c
+++ b/drivers/platform/x86/inspur_platform_profile.c
@@ -194,15 +194,7 @@ static int inspur_wmi_probe(struct wmi_device *wdev, const void *context)
 	priv->handler.dev = &wdev->dev;
 	priv->handler.ops = &inspur_platform_profile_ops;
 
-	return platform_profile_register(&priv->handler, priv);
-}
-
-static void inspur_wmi_remove(struct wmi_device *wdev)
-{
-	struct inspur_wmi_priv *priv;
-
-	priv = dev_get_drvdata(&wdev->dev);
-	platform_profile_remove(&priv->handler);
+	return devm_platform_profile_register(&priv->handler, priv);
 }
 
 static const struct wmi_device_id inspur_wmi_id_table[] = {
@@ -219,7 +211,6 @@ static struct wmi_driver inspur_wmi_driver = {
 	},
 	.id_table = inspur_wmi_id_table,
 	.probe = inspur_wmi_probe,
-	.remove = inspur_wmi_remove,
 	.no_singleton = true,
 };
 
-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ