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

From: Segher Boessenkool <[email-masked]>
Date: Sat, 2 Jun 2007 10:46:41 +0200

> +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