Changes to of_device ?

Grant Likely grant.likely at secretlab.ca
Sat Jun 18 00:08:05 EST 2011


On Fri, Jun 17, 2011 at 7:53 AM, Guillaume Dargaud
<dargaud at lpsc.in2p3.fr> wrote:
>> I'm sorry, I should have mentioned that struct of_device was replaced by
>> struct platform_device. So in order to get your code compiled, you have
>> to change the probe function to
>>
>> static int xad_driver_probe(struct platform_device* dev, const struct
>> of_device_id *match) {
>
> Thanks, that worked...
>
> Side question: how do you guy find your way inside the kernel ? I spent hours trying to find the declarations of various
> basic structs like device, of_node, etc even with ack-grep and ctags (which I probably don't know how to use very well).

For finding structures, the following pattern tends to work well:

git grep 'struct device_node {'

I used to use cscope (make cscope in the kernel tree), but stopped
because the tags go out of date every time I change branches.

g.


More information about the Linuxppc-dev mailing list