'\" t
.\"     Title: platform_device_register_simple
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\"      Date: May 2018
.\"    Manual: Device drivers infrastructure
.\"    Source: Kernel Hackers Manual 3.16.56
.\"  Language: English
.\"
.TH "PLATFORM_DEVICE_REGI" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "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_simple \- add a platform\-level device and its resources
.SH "SYNOPSIS"
.HP \w'struct\ platform_device\ *\ platform_device_register_simple('u
.BI "struct platform_device * platform_device_register_simple(const\ char\ *\ " "name" ", int\ " "id" ", const\ struct\ resource\ *\ " "res" ", unsigned\ int\ " "num" ");"
.SH "ARGUMENTS"
.PP
\fIname\fR
.RS 4
base name of the device we\*(Aqre adding
.RE
.PP
\fIid\fR
.RS 4
instance id
.RE
.PP
\fIres\fR
.RS 4
set of resources that needs to be allocated for the device
.RE
.PP
\fInum\fR
.RS 4
number of resources
.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
This interface is primarily intended for use with legacy drivers which probe hardware directly\&. Because such drivers create sysfs device nodes themselves, rather than letting system infrastructure handle such device enumeration tasks, they don\*(Aqt fully conform to the Linux driver model\&. In particular, when such drivers are built as modules, they can\*(Aqt be
\(lqhotplugged\(rq\&.
.PP
Returns
struct platform_device
pointer on success, or
\fBERR_PTR\fR
on error\&.
.SH "COPYRIGHT"
.br
