Commit 0e1bd49
ata: pata_imx: Use helper function devm_clk_get_enabled()
After the commit 7ef9651 ("clk: Provide new devm_clk helpers for
prepared and enabled clocks"), the pair of functions devm_clk_get() and
clk_prepare_enable() can be replaced with the single function
devm_clk_get_enabled(). Moreover, the driver will keep the clock
prepared (or enabled) during the whole lifetime of the device, so it is
unnecessary to unprepare and disable the clock explicitly when removing
the device or in the error handling path.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>1 parent caea958 commit 0e1bd49
1 file changed
Lines changed: 7 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | 150 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 151 | + | |
| 152 | + | |
159 | 153 | | |
160 | 154 | | |
161 | 155 | | |
| |||
165 | 159 | | |
166 | 160 | | |
167 | 161 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 162 | + | |
| 163 | + | |
172 | 164 | | |
173 | 165 | | |
174 | 166 | | |
| |||
194 | 186 | | |
195 | 187 | | |
196 | 188 | | |
197 | | - | |
| 189 | + | |
198 | 190 | | |
199 | 191 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | 192 | | |
205 | 193 | | |
206 | 194 | | |
| |||
211 | 199 | | |
212 | 200 | | |
213 | 201 | | |
214 | | - | |
215 | | - | |
216 | 202 | | |
217 | 203 | | |
218 | 204 | | |
| |||
0 commit comments