Commit 81da805
hwrng: exynos - Use devm_clk_get_enabled() to get the clock
Use devm_clk_get_enabled() helper instead of calling devm_clk_get() and
then clk_prepare_enable(). It simplifies the error handling and makes
the code more compact. Also use dev_err_probe() to handle possible
-EPROBE_DEFER errors if the clock is not available yet.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>1 parent 76536ca commit 81da805
1 file changed
Lines changed: 4 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 139 | + | |
| 140 | + | |
147 | 141 | | |
148 | 142 | | |
149 | 143 | | |
150 | 144 | | |
151 | 145 | | |
152 | 146 | | |
153 | | - | |
| 147 | + | |
154 | 148 | | |
155 | 149 | | |
156 | 150 | | |
157 | 151 | | |
158 | 152 | | |
159 | 153 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 154 | | |
164 | 155 | | |
165 | 156 | | |
| |||
171 | 162 | | |
172 | 163 | | |
173 | 164 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | 165 | | |
179 | 166 | | |
180 | 167 | | |
| |||
0 commit comments