Commit 4723f16
module: sysfs: Add notes attributes through attribute_group
A kobject is meant to manage the lifecycle of some resource.
However the module sysfs code only creates a kobject to get a
"notes" subdirectory in sysfs.
This can be achieved easier and cheaper by using a sysfs group.
Switch the notes attribute code to such a group, similar to how the
section allocation in the same file already works.
Signed-off-by: Thomas Weißschuh <[email protected]>
Reviewed-by: Petr Pavlu <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/r/20241227-sysfs-const-bin_attr-module-v2-5-e267275f0f37@weissschuh.net
Signed-off-by: Petr Pavlu <[email protected]>1 parent f47c0be commit 4723f16
1 file changed
+28
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
| 141 | + | |
| 142 | + | |
144 | 143 | | |
145 | 144 | | |
146 | | - | |
147 | | - | |
| 145 | + | |
148 | 146 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 147 | + | |
155 | 148 | | |
156 | 149 | | |
157 | 150 | | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
161 | 154 | | |
| 155 | + | |
162 | 156 | | |
163 | 157 | | |
164 | 158 | | |
| |||
177 | 171 | | |
178 | 172 | | |
179 | 173 | | |
180 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
192 | | - | |
| 194 | + | |
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
197 | | - | |
198 | | - | |
199 | | - | |
| 199 | + | |
| 200 | + | |
200 | 201 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | 202 | | |
209 | 203 | | |
210 | 204 | | |
211 | 205 | | |
212 | 206 | | |
213 | | - | |
| 207 | + | |
214 | 208 | | |
215 | 209 | | |
216 | 210 | | |
217 | 211 | | |
218 | 212 | | |
219 | | - | |
220 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
0 commit comments