Commit de74763
committed
ALSA: mpu401: Allocate resources with device-managed APIs
This patch converts the card object management with devres as a clean
up. The remove callback gets reduced by that.
This should give no user-visible functional changes.
Note that this converts only the mpu401 card driver. The mpu401_uart
component is still managed with snd_device. It's for the case where
the mpu401_uart component may be removed dynamically without the
actual device unbind.
Link: https://lore.kernel.org/r/20210715075941.23332-77-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>1 parent 60d03de commit de74763
1 file changed
Lines changed: 5 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 84 | | |
89 | 85 | | |
90 | 86 | | |
| |||
105 | 101 | | |
106 | 102 | | |
107 | 103 | | |
108 | | - | |
109 | | - | |
| 104 | + | |
110 | 105 | | |
111 | | - | |
112 | 106 | | |
113 | 107 | | |
114 | 108 | | |
115 | 109 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 110 | | |
123 | 111 | | |
124 | 112 | | |
125 | 113 | | |
126 | | - | |
127 | 114 | | |
128 | 115 | | |
129 | 116 | | |
| |||
184 | 171 | | |
185 | 172 | | |
186 | 173 | | |
187 | | - | |
188 | | - | |
| 174 | + | |
189 | 175 | | |
190 | | - | |
191 | 176 | | |
192 | 177 | | |
193 | 178 | | |
| |||
196 | 181 | | |
197 | 182 | | |
198 | 183 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | 184 | | |
208 | 185 | | |
209 | 186 | | |
210 | 187 | | |
211 | | - | |
212 | 188 | | |
213 | 189 | | |
214 | 190 | | |
| |||
0 commit comments