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: <ksot2xs4vecqpjrx36z3zbpoasukor2bzh7gzwtbf7in3sudjk@pdmjlr4ythve>
Date: Thu, 6 Jun 2024 00:14:57 +0200
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: Benson Leung <bleung@...omium.org>, 
	Guenter Roeck <groeck@...omium.org>, Lee Jones <lee@...nel.org>, 
	Thomas Weißschuh <thomas@...ssschuh.net>, chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org, 
	linux-pm@...r.kernel.org, Mario Limonciello <mario.limonciello@....com>, 
	Dustin Howett <dustin@...ett.net>, Stephen Horvath <s.horvath@...look.com.au>, 
	Rajas Paranjpe <paranjperajas@...il.com>
Subject: Re: [PATCH v2 2/3] power: supply: add ChromeOS EC based charge
 control driver

Hi,

On Tue, May 28, 2024 at 10:04:11PM +0200, Thomas Weißschuh wrote:
> +	battery_hook_register(&priv->battery_hook);
> +
> +	platform_set_drvdata(pdev, priv);
> +
> +	return 0;
> +}
> +
> +static int cros_chctl_remove(struct platform_device *pdev)
> +{
> +	struct cros_chctl_priv *priv = platform_get_drvdata(pdev);
> +
> +	battery_hook_unregister(&priv->battery_hook);
> +
> +	return 0;
> +}

Please use devm_add_action_or_reset() or introduce
devm_battery_hook_register(), which could also be used by
dell-wmi-ddv. Otherwise LGTM.

-- Sebastian

> +
> +static const struct platform_device_id cros_chctl_id[] = {
> +	{ DRV_NAME, 0 },
> +	{ }
> +};
> +
> +static struct platform_driver cros_chctl_driver = {
> +	.driver.name	= DRV_NAME,
> +	.probe		= cros_chctl_probe,
> +	.remove		= cros_chctl_remove,
> +	.id_table	= cros_chctl_id,
> +};
> +module_platform_driver(cros_chctl_driver);
> +
> +MODULE_DEVICE_TABLE(platform, cros_chctl_id);
> +MODULE_DESCRIPTION("ChromeOS EC charge control");
> +MODULE_AUTHOR("Thomas Weißschuh <linux@...ssschuh.net>");
> +MODULE_LICENSE("GPL");
> 
> -- 
> 2.45.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ