Skip to content

Commit

Permalink
powerpc/sysdev: Use module_platform_driver macro
Browse files Browse the repository at this point in the history
This patch removes some code duplication by using
module_platform_driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Srinivas Kandagatla authored and Benjamin Herrenschmidt committed Nov 15, 2012
1 parent b2bb65f commit 40c935a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions arch/powerpc/sysdev/pmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,7 @@ static struct platform_driver pmi_of_platform_driver = {
.of_match_table = pmi_match,
},
};

static int __init pmi_module_init(void)
{
return platform_driver_register(&pmi_of_platform_driver);
}
module_init(pmi_module_init);

static void __exit pmi_module_exit(void)
{
platform_driver_unregister(&pmi_of_platform_driver);
}
module_exit(pmi_module_exit);
module_platform_driver(pmi_of_platform_driver);

int pmi_send_message(pmi_message_t msg)
{
Expand Down

0 comments on commit 40c935a

Please sign in to comment.