This is an OFW initrd module that would load the initrd from device tree
parameters and give the to the md driver.
With this patch, it is possible to pass as rootfs through kexec in PowerNV
Change OF_getencprop() to OF_hasprop() on probe() function.
This should be a ||, since both are needed.
Since only one initrd should be here, you can limit it here with:
if (device_find_child(parent, "initrd", -1) != NULL)
Adding Justin's suggestions and removing an unused variable.
Just one minor nit, but otherwise good to go.
One nit: add parentheses around the return value. Then good to go.