hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/wm8350-core.c
....@@ -1,19 +1,15 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * wm8350-core.c -- Device access for Wolfson WM8350
34 *
45 * Copyright 2007, 2008 Wolfson Microelectronics PLC.
56 *
67 * Author: Liam Girdwood, Mark Brown
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>
12
+#include <linux/export.h>
1713 #include <linux/slab.h>
1814 #include <linux/bug.h>
1915 #include <linux/device.h>
....@@ -135,6 +131,8 @@
135131 * The WM8350 has a hardware lock which can be used to prevent writes to
136132 * some registers (generally those which can cause particularly serious
137133 * problems if misused). This function enables that lock.
134
+ *
135
+ * @wm8350: pointer to local driver data structure
138136 */
139137 int wm8350_reg_lock(struct wm8350 *wm8350)
140138 {
....@@ -164,6 +162,8 @@
164162 * problems if misused). This function disables that lock so updates
165163 * can be performed. For maximum safety this should be done only when
166164 * required.
165
+ *
166
+ * @wm8350: pointer to local driver data structure
167167 */
168168 int wm8350_reg_unlock(struct wm8350 *wm8350)
169169 {
....@@ -442,30 +442,3 @@
442442 return ret;
443443 }
444444 EXPORT_SYMBOL_GPL(wm8350_device_init);
445
-
446
-void wm8350_device_exit(struct wm8350 *wm8350)
447
-{
448
- int i;
449
-
450
- for (i = 0; i < ARRAY_SIZE(wm8350->pmic.led); i++)
451
- platform_device_unregister(wm8350->pmic.led[i].pdev);
452
-
453
- for (i = 0; i < ARRAY_SIZE(wm8350->pmic.pdev); i++)
454
- platform_device_unregister(wm8350->pmic.pdev[i]);
455
-
456
- platform_device_unregister(wm8350->wdt.pdev);
457
- platform_device_unregister(wm8350->rtc.pdev);
458
- platform_device_unregister(wm8350->power.pdev);
459
- platform_device_unregister(wm8350->hwmon.pdev);
460
- platform_device_unregister(wm8350->gpio.pdev);
461
- platform_device_unregister(wm8350->codec.pdev);
462
-
463
- if (wm8350->irq_base)
464
- free_irq(wm8350->irq_base + WM8350_IRQ_AUXADC_DATARDY, wm8350);
465
-
466
- wm8350_irq_exit(wm8350);
467
-}
468
-EXPORT_SYMBOL_GPL(wm8350_device_exit);
469
-
470
-MODULE_DESCRIPTION("WM8350 AudioPlus PMIC core driver");
471
-MODULE_LICENSE("GPL");