.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * drivers/mfd/ab3100_otp.c |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2007-2009 ST-Ericsson AB |
---|
5 | | - * License terms: GNU General Public License (GPL) version 2 |
---|
6 | 6 | * Driver to read out OTP from the AB3100 Mixed-signal circuit |
---|
7 | 7 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
---|
8 | 8 | */ |
---|
.. | .. |
---|
29 | 29 | |
---|
30 | 30 | /** |
---|
31 | 31 | * 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 |
---|
34 | 34 | * can be changed but before locking it is still possible |
---|
35 | 35 | * 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 |
---|
37 | 37 | * 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 |
---|
39 | 39 | * 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 |
---|
41 | 41 | * IMEI number found in the tac, fac and svn fields with |
---|
42 | 42 | * (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 |
---|
48 | 48 | */ |
---|
49 | 49 | struct ab3100_otp { |
---|
50 | 50 | struct device *dev; |
---|
.. | .. |
---|
122 | 122 | .release = single_release, |
---|
123 | 123 | }; |
---|
124 | 124 | |
---|
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) |
---|
127 | 127 | { |
---|
128 | 128 | 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); |
---|
136 | 130 | } |
---|
137 | 131 | |
---|
138 | 132 | static void __exit ab3100_otp_exit_debugfs(struct ab3100_otp *otp) |
---|
.. | .. |
---|
141 | 135 | } |
---|
142 | 136 | #else |
---|
143 | 137 | /* 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) |
---|
146 | 140 | { |
---|
147 | | - return 0; |
---|
148 | 141 | } |
---|
149 | 142 | |
---|
150 | 143 | static inline void __exit ab3100_otp_exit_debugfs(struct ab3100_otp *otp) |
---|
.. | .. |
---|
211 | 204 | } |
---|
212 | 205 | |
---|
213 | 206 | /* 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); |
---|
217 | 208 | |
---|
218 | 209 | return 0; |
---|
219 | 210 | |
---|