---
name: "platform_device_register_data"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/platform_device_register_data"
---

# platform\_device\_register\_data(9)

add a platform-level device with platform-specific data

## NAME

platform\_device\_register\_data - add a platform-level device with platform-specific data

## SYNOPSIS

**struct platform\_device \* platform\_device\_register\_data(struct device \*** *parent***, const char \*** *name***, int** *id***, const void \*** *data***, size\_t** *size***);**

## ARGUMENTS

*parent*

parent device for the device we're adding

*name*

base name of the device we're adding

*id*

instance id

*data*

platform specific data for this platform device

*size*

size of platform specific data

## DESCRIPTION

This function creates a simple platform device that requires minimal resource and memory management. Canned release function freeing memory allocated for the device allows drivers using such devices to be unloaded without waiting for the last reference to the device to be dropped.

Returns struct platform\_device pointer on success, or **ERR\_PTR** on error.

## COPYRIGHT
