class_for_each_device man page on Oracle

Printed from

CLASS_FOR_EACH_DEVIC(9)	 Device drivers infrastructure CLASS_FOR_EACH_DEVIC(9)

       class_for_each_device - device iterator

       int class_for_each_device(struct class * class, struct device * start,
				 void * data,
				 int (*fn) (struct device *, void *));

	   the class we're iterating

	   the device to start with in the list, if any.

	   data for the callback

	   function to be called for each device

       Iterate over class's list of devices, and call fn for each, passing it
       data. If start is set, the list iteration will start there, otherwise
       if it is NULL, the iteration starts at the beginning of the list.

       We check the return of fn each time. If it returns anything other than
       0, we break out and return that value.

       fn is allowed to do anything including calling back into class code.
       There's no locking restriction.

Kernel Hackers Manual 3.8.	   June 2014	       CLASS_FOR_EACH_DEVIC(9)

List of man pages available for Oracle

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net