forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Spreadtrum pin controller driver
34 * Copyright (C) 2017 Spreadtrum - http://www.spreadtrum.com
4
- *
5
- * This program is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU General Public License
7
- * version 2 as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful, but
10
- * WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- * General Public License for more details.
135 */
146
157 #include <linux/module.h>
....@@ -948,25 +940,13 @@
948940 static struct platform_driver sprd_pinctrl_driver = {
949941 .driver = {
950942 .name = "sprd-pinctrl",
951
- .owner = THIS_MODULE,
952943 .of_match_table = sprd_pinctrl_of_match,
953944 },
954945 .probe = sprd_pinctrl_probe,
955946 .remove = sprd_pinctrl_remove,
956947 .shutdown = sprd_pinctrl_shutdown,
957948 };
958
-
959
-static int sprd_pinctrl_init(void)
960
-{
961
- return platform_driver_register(&sprd_pinctrl_driver);
962
-}
963
-module_init(sprd_pinctrl_init);
964
-
965
-static void sprd_pinctrl_exit(void)
966
-{
967
- platform_driver_unregister(&sprd_pinctrl_driver);
968
-}
969
-module_exit(sprd_pinctrl_exit);
949
+module_platform_driver(sprd_pinctrl_driver);
970950
971951 MODULE_DESCRIPTION("SPREADTRUM Pin Controller Driver");
972952 MODULE_AUTHOR("Baolin Wang <baolin.wang@spreadtrum.com>");