Lines Matching full:foo
24 struct foo {
31 struct foo *foo;
33 foo = devm_kzalloc(dev, sizeof(*foo), GFP_KERNEL);
34 if (!foo)
36 spin_lock_init(&foo->lock);
40 This will create an instance of struct foo in memory every time probe() is
46 pass around a pointer to struct foo like this::
50 struct foo *foo = arg;
56 struct foo *foo;
59 ret = request_irq(irq, foo_handler, 0, "foo", foo);
62 This way you always get a pointer back to the correct instance of foo in
71 struct foo {
80 struct foo *foo = container_of(work, struct foo, offload);
87 struct foo *foo = arg;
89 queue_work(foo->wq, &foo->offload);
95 struct foo *foo;
97 foo->wq = create_singlethread_workqueue("foo-wq");
98 INIT_WORK(&foo->offload, foo_work);
114 We can see here that we avoid having global pointers to our struct foo *