aboutsummaryrefslogtreecommitdiff
path: root/scripts/bpf_doc.py
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2023-03-31 11:33:13 +0200
committerGreg Kroah-Hartman <[email protected]>2023-03-31 17:44:54 +0200
commit6f14c02220c791d5c46b0f965b9340c58f3d503d (patch)
tree47548e187c398cc563fca7e15121e56b6e46c93d /scripts/bpf_doc.py
parent7d90e81a2d5edbd04037100bdd54d955bdd9b0d0 (diff)
driver core: create class_is_registered()
Some classes (i.e. gpio), want to know if they have been registered or not, and poke around in the class's internal structures to try to figure this out. Because this is not really a good idea, provide a function for classes to call to try to figure this out. Note, this is racy as the state of the class could change at any moment in time after the call is made, but as usually a class only wants to know if it has been registered yet or not, it should be fairly safe to use, and is just as safe as the previous "poke at the class internals" check was. Move the gpiolib code to use this function as proof that it works properly. Cc: Bartosz Golaszewski <[email protected]> Cc: Sebastian Reichel <[email protected]> Cc: Benjamin Tissoires <[email protected]> Cc: [email protected] Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions