Commit 2ce7b7f
pwm: bcm2835: Simplify using devm functions
With devm_clk_get_enabled() the call to clk_disable_unprepare() can be
dropped from the error path and the remove callback. With
devm_pwmchip_add() pwmchip_remove() can be dropped. Then the remove
callback is empty and can go away, too. With bcm2835_pwm_remove() the only
user of platform_get_drvdata() is gone and so platform_set_drvdata() can
be dropped from .probe(), too.
Also use dev_err_probe() for simplified (and improved) error reporting.
Link: https://lore.kernel.org/r/20230929161918.2410424-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>1 parent b498c14 commit 2ce7b7f
1 file changed
Lines changed: 4 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 154 | | |
159 | 155 | | |
160 | 156 | | |
161 | 157 | | |
162 | | - | |
163 | | - | |
164 | | - | |
| 158 | + | |
165 | 159 | | |
166 | | - | |
| 160 | + | |
| 161 | + | |
167 | 162 | | |
168 | 163 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | 164 | | |
183 | 165 | | |
184 | 166 | | |
| |||
193 | 175 | | |
194 | 176 | | |
195 | 177 | | |
196 | | - | |
197 | 178 | | |
198 | 179 | | |
199 | 180 | | |
| |||
0 commit comments