Commit aa1fd9c
hwmon: Use device_show_string() helper for sysfs attributes
Deduplicate sysfs ->show() callbacks which expose a string at a static
memory location. Use the newly introduced device_show_string() helper
in the driver core instead by declaring those sysfs attributes with
DEVICE_STRING_ATTR_RO().
No functional change intended.
Signed-off-by: Lukas Wunner <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/23c2031acaa64f1c02f00e817c3f7e4466d17ab2.1713608122.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 3cc50d0 commit aa1fd9c
2 files changed
+8
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 104 | + | |
112 | 105 | | |
113 | 106 | | |
114 | 107 | | |
| |||
373 | 366 | | |
374 | 367 | | |
375 | 368 | | |
376 | | - | |
| 369 | + | |
377 | 370 | | |
378 | 371 | | |
379 | 372 | | |
| |||
386 | 379 | | |
387 | 380 | | |
388 | 381 | | |
389 | | - | |
| 382 | + | |
390 | 383 | | |
391 | 384 | | |
392 | 385 | | |
| |||
561 | 554 | | |
562 | 555 | | |
563 | 556 | | |
564 | | - | |
| 557 | + | |
565 | 558 | | |
566 | 559 | | |
567 | 560 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 259 | + | |
265 | 260 | | |
266 | 261 | | |
267 | 262 | | |
| |||
415 | 410 | | |
416 | 411 | | |
417 | 412 | | |
418 | | - | |
419 | | - | |
| 413 | + | |
420 | 414 | | |
421 | 415 | | |
422 | 416 | | |
| |||
425 | 419 | | |
426 | 420 | | |
427 | 421 | | |
428 | | - | |
| 422 | + | |
429 | 423 | | |
430 | 424 | | |
431 | 425 | | |
| |||
516 | 510 | | |
517 | 511 | | |
518 | 512 | | |
519 | | - | |
| 513 | + | |
520 | 514 | | |
521 | 515 | | |
522 | 516 | | |
| |||
0 commit comments