hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/ab3100-otp.c
....@@ -1,8 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * drivers/mfd/ab3100_otp.c
34 *
45 * Copyright (C) 2007-2009 ST-Ericsson AB
5
- * License terms: GNU General Public License (GPL) version 2
66 * Driver to read out OTP from the AB3100 Mixed-signal circuit
77 * Author: Linus Walleij <linus.walleij@stericsson.com>
88 */
....@@ -29,22 +29,22 @@
2929
3030 /**
3131 * struct ab3100_otp
32
- * @dev containing device
33
- * @locked whether the OTP is locked, after locking, no more bits
32
+ * @dev: containing device
33
+ * @locked: whether the OTP is locked, after locking, no more bits
3434 * can be changed but before locking it is still possible
3535 * to change bits from 1->0.
36
- * @freq clocking frequency for the OTP, this frequency is either
36
+ * @freq: clocking frequency for the OTP, this frequency is either
3737 * 32768Hz or 1MHz/30
38
- * @paf product activation flag, indicates whether this is a real
38
+ * @paf: product activation flag, indicates whether this is a real
3939 * product (paf true) or a lab board etc (paf false)
40
- * @imeich if this is set it is possible to override the
40
+ * @imeich: if this is set it is possible to override the
4141 * IMEI number found in the tac, fac and svn fields with
4242 * (secured) software
43
- * @cid customer ID
44
- * @tac type allocation code of the IMEI
45
- * @fac final assembly code of the IMEI
46
- * @svn software version number of the IMEI
47
- * @debugfs a debugfs file used when dumping to file
43
+ * @cid: customer ID
44
+ * @tac: type allocation code of the IMEI
45
+ * @fac: final assembly code of the IMEI
46
+ * @svn: software version number of the IMEI
47
+ * @debugfs: a debugfs file used when dumping to file
4848 */
4949 struct ab3100_otp {
5050 struct device *dev;
....@@ -122,17 +122,11 @@
122122 .release = single_release,
123123 };
124124
125
-static int __init ab3100_otp_init_debugfs(struct device *dev,
126
- struct ab3100_otp *otp)
125
+static void __init ab3100_otp_init_debugfs(struct device *dev,
126
+ struct ab3100_otp *otp)
127127 {
128128 otp->debugfs = debugfs_create_file("ab3100_otp", S_IFREG | S_IRUGO,
129
- NULL, otp,
130
- &ab3100_otp_operations);
131
- if (!otp->debugfs) {
132
- dev_err(dev, "AB3100 debugfs OTP file registration failed!\n");
133
- return -ENOENT;
134
- }
135
- return 0;
129
+ NULL, otp, &ab3100_otp_operations);
136130 }
137131
138132 static void __exit ab3100_otp_exit_debugfs(struct ab3100_otp *otp)
....@@ -141,10 +135,9 @@
141135 }
142136 #else
143137 /* Compile this out if debugfs not selected */
144
-static inline int __init ab3100_otp_init_debugfs(struct device *dev,
145
- struct ab3100_otp *otp)
138
+static inline void __init ab3100_otp_init_debugfs(struct device *dev,
139
+ struct ab3100_otp *otp)
146140 {
147
- return 0;
148141 }
149142
150143 static inline void __exit ab3100_otp_exit_debugfs(struct ab3100_otp *otp)
....@@ -211,9 +204,7 @@
211204 }
212205
213206 /* debugfs entries */
214
- err = ab3100_otp_init_debugfs(&pdev->dev, otp);
215
- if (err)
216
- goto err;
207
+ ab3100_otp_init_debugfs(&pdev->dev, otp);
217208
218209 return 0;
219210