hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/mfd/wm831x-spi.c
....@@ -1,19 +1,14 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * wm831x-spi.c -- SPI access for Wolfson WM831x PMICs
34 *
45 * Copyright 2009,2010 Wolfson Microelectronics PLC.
56 *
67 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the
10
- * Free Software Foundation; either version 2 of the License, or (at your
11
- * option) any later version.
12
- *
138 */
149
1510 #include <linux/kernel.h>
16
-#include <linux/module.h>
11
+#include <linux/init.h>
1712 #include <linux/of.h>
1813 #include <linux/of_device.h>
1914 #include <linux/pm.h>
....@@ -67,15 +62,6 @@
6762 return wm831x_device_init(wm831x, spi->irq);
6863 }
6964
70
-static int wm831x_spi_remove(struct spi_device *spi)
71
-{
72
- struct wm831x *wm831x = spi_get_drvdata(spi);
73
-
74
- wm831x_device_exit(wm831x);
75
-
76
- return 0;
77
-}
78
-
7965 static int wm831x_spi_suspend(struct device *dev)
8066 {
8167 struct wm831x *wm831x = dev_get_drvdata(dev);
....@@ -108,17 +94,16 @@
10894 { "wm8326", WM8326 },
10995 { },
11096 };
111
-MODULE_DEVICE_TABLE(spi, wm831x_spi_ids);
11297
11398 static struct spi_driver wm831x_spi_driver = {
11499 .driver = {
115100 .name = "wm831x",
116101 .pm = &wm831x_spi_pm,
117102 .of_match_table = of_match_ptr(wm831x_of_match),
103
+ .suppress_bind_attrs = true,
118104 },
119105 .id_table = wm831x_spi_ids,
120106 .probe = wm831x_spi_probe,
121
- .remove = wm831x_spi_remove,
122107 };
123108
124109 static int __init wm831x_spi_init(void)
....@@ -132,13 +117,3 @@
132117 return 0;
133118 }
134119 subsys_initcall(wm831x_spi_init);
135
-
136
-static void __exit wm831x_spi_exit(void)
137
-{
138
- spi_unregister_driver(&wm831x_spi_driver);
139
-}
140
-module_exit(wm831x_spi_exit);
141
-
142
-MODULE_DESCRIPTION("SPI support for WM831x/2x AudioPlus PMICs");
143
-MODULE_LICENSE("GPL");
144
-MODULE_AUTHOR("Mark Brown");