]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
power: reset: ltc2952: remove global variable poweroff_panic
authorFrans Klaver <frans.klaver@xsens.com>
Wed, 14 Jan 2015 08:15:39 +0000 (09:15 +0100)
committerSebastian Reichel <sre@kernel.org>
Tue, 20 Jan 2015 12:58:28 +0000 (13:58 +0100)
commit818ca4c8c7be4910f896c702645009f09813347f
treef33234d6a4fb59ba8aa5750d6bacbcb1aaaad15d
parenta5f67be5200787aacc7143144bdab7efe7cd268a
power: reset: ltc2952: remove global variable poweroff_panic

As per Documentation/CodingStyle ch.4, we should keep global variables
to a mininum. Move the panic state into the driver data, regardless of
whether panic is a system state or not.

This removes the need for the custom _init and _exit functions, so
replace them with a call to the module_platform_driver() macro.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/reset/ltc2952-poweroff.c