From: Hanjun Guo <guohanjun@huawei.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: <linux-acpi@vger.kernel.org>, Hanjun Guo <guohanjun@huawei.com>
Subject: [PATCH 2/2] ACPI: SBS: Simplify the code using module_acpi_driver()
Date: Fri, 13 Nov 2020 10:25:11 +0800 [thread overview]
Message-ID: <1605234311-29912-2-git-send-email-guohanjun@huawei.com> (raw)
In-Reply-To: <1605234311-29912-1-git-send-email-guohanjun@huawei.com>
Using the module_acpi_driver() to simplify the code.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
drivers/acpi/sbs.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index cbd1af7..3b0b6dd 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -711,17 +711,4 @@ static int acpi_sbs_resume(struct device *dev)
},
.drv.pm = &acpi_sbs_pm,
};
-
-static int __init acpi_sbs_init(void)
-{
- return acpi_bus_register_driver(&acpi_sbs_driver);
-}
-
-static void __exit acpi_sbs_exit(void)
-{
- acpi_bus_unregister_driver(&acpi_sbs_driver);
- return;
-}
-
-module_init(acpi_sbs_init);
-module_exit(acpi_sbs_exit);
+module_acpi_driver(acpi_sbs_driver);
--
1.7.12.4
prev parent reply other threads:[~2020-11-13 2:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 2:25 [PATCH 1/2] ACPI: SBS: Simplify the driver init code Hanjun Guo
2020-11-13 2:25 ` Hanjun Guo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1605234311-29912-2-git-send-email-guohanjun@huawei.com \
--to=guohanjun@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox