<br><br><div class="gmail_quote">On Thu, Apr 21, 2011 at 4:56 PM, Haojian Zhuang <span dir="ltr"><<a href="mailto:haojian.zhuang@gmail.com">haojian.zhuang@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Thu, Apr 21, 2011 at 6:22 PM, Pankaj B <<a href="mailto:xpankajbx@gmail.com">xpankajbx@gmail.com</a>> wrote:<br>
> Hi,<br>
> Current INIT_WORK() macro takes just work_struct pointer and function<br>
> pointer.<br>
> In previous kernels there used to be a third parameter for data.<br>
> Is there a proper way to set data in work_struct?<br>
><br>
</div></div>Embed the work_struct into your structure. Then use container_of() to get the<br>
structure in work function. So you can add anything into your structure.<br></blockquote><div> </div><div>Good solution! Thanks!</div><div><br></div><div><br></div></div><br>