Name

of_device_alloc — Allocate and initialize a platform device

Synopsis

struct platform_device * of_device_alloc (struct device_node * np,
 const char * bus_id,
 struct device * parent);
 

Arguments

np

Pointer to device node to assign to device

bus_id

NULL or name to assign to the device

parent

Parent device

Description

Allocate a platform device, associate np to the device. Populate the device's resource table.

If bus_id is NULL use default name.

Also see

of_device_make_bus_id

Return

Pointer to platform device on success, NULL on error.