[PATCH] powerpc: Create "rom" (MTD) device prpmc2800

Segher Boessenkool segher at kernel.crashing.org
Sat Jun 2 18:46:41 EST 2007


> +static int __init prpmc2800_register_mtd(void)
> +{
> +	struct device_node *np;
> +
> +	np = of_find_compatible_node(NULL, "rom", "direct-mapped");
> +	of_platform_device_create(np, np->name, NULL);
> +}

Needs error checking -- what if the node doesn't exist.


Segher




More information about the Linuxppc-dev mailing list