Lines Matching +full:in +full:- +full:and +full:- +full:around
5 This document describes a few common design patterns found in device drivers.
18 that the device the driver binds to will appear in several instances. This
19 means that the probe() function and all callbacks need to be reentrant.
35 return -ENOMEM;
36 spin_lock_init(&foo->lock);
40 This will create an instance of struct foo in memory every time probe() is
43 state around to all functions that need access to the state and its members.
46 pass around a pointer to struct foo like this::
62 This way you always get a pointer back to the correct instance of foo in
89 queue_work(foo->wq, &foo->offload);
97 foo->wq = create_singlethread_workqueue("foo-wq");
98 INIT_WORK(&foo->offload, foo_work);
103 return a single argument which is a pointer to a struct member in the
106 container_of() is a macro defined in <linux/kernel.h>