'\" t .\" Title: platform_device_register_data .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Device drivers infrastructure .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "PLATFORM_DEVICE_REGI" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Device drivers infrastructure" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" platform_device_register_data \- add a platform\-level device with platform\-specific data .SH "SYNOPSIS" .HP \w'struct\ platform_device\ *\ platform_device_register_data('u .BI "struct platform_device * platform_device_register_data(struct\ device\ *\ " "parent" ", const\ char\ *\ " "name" ", int\ " "id" ", const\ void\ *\ " "data" ", size_t\ " "size" ");" .SH "ARGUMENTS" .PP \fIparent\fR .RS 4 parent device for the device we\*(Aqre adding .RE .PP \fIname\fR .RS 4 base name of the device we\*(Aqre adding .RE .PP \fIid\fR .RS 4 instance id .RE .PP \fIdata\fR .RS 4 platform specific data for this platform device .RE .PP \fIsize\fR .RS 4 size of platform specific data .RE .SH "DESCRIPTION" .PP 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\&. .PP Returns struct platform_device pointer on success, or \fBERR_PTR\fR on error\&. .SH "COPYRIGHT" .br