Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
rio-driver.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/rio.h>
#include <linux/rio_ids.h>
#include "rio.h"

Go to the source code of this file.

Functions

struct rio_devrio_dev_get (struct rio_dev *rdev)
 
void rio_dev_put (struct rio_dev *rdev)
 
int rio_register_driver (struct rio_driver *rdrv)
 
void rio_unregister_driver (struct rio_driver *rdrv)
 
 postcore_initcall (rio_bus_init)
 
 EXPORT_SYMBOL_GPL (rio_register_driver)
 
 EXPORT_SYMBOL_GPL (rio_unregister_driver)
 
 EXPORT_SYMBOL_GPL (rio_bus_type)
 
 EXPORT_SYMBOL_GPL (rio_dev_get)
 
 EXPORT_SYMBOL_GPL (rio_dev_put)
 

Variables

struct device rio_bus
 
struct bus_type rio_bus_type
 

Function Documentation

EXPORT_SYMBOL_GPL ( rio_register_driver  )
EXPORT_SYMBOL_GPL ( rio_unregister_driver  )
EXPORT_SYMBOL_GPL ( rio_bus_type  )
EXPORT_SYMBOL_GPL ( rio_dev_get  )
EXPORT_SYMBOL_GPL ( rio_dev_put  )
postcore_initcall ( rio_bus_init  )
struct rio_dev* rio_dev_get ( struct rio_dev rdev)
read

rio_dev_get - Increments the reference count of the RIO device structure

: RIO device being referenced

Each live reference to a device should be refcounted.

Drivers for RIO devices should normally record such references in their probe() methods, when they bind to a device, and release them by calling rio_dev_put(), in their disconnect() methods.

Definition at line 57 of file rio-driver.c.

void rio_dev_put ( struct rio_dev rdev)

rio_dev_put - Release a use of the RIO device structure

: RIO device being disconnected

Must be called when a user of a device is finished with it. When the last user of the device calls this function, the memory of the device is freed.

Definition at line 74 of file rio-driver.c.

int rio_register_driver ( struct rio_driver rdrv)

rio_register_driver - register a new RIO driver : the RIO driver structure to register

Adds a &struct rio_driver to the list of registered drivers. Returns a negative value on error, otherwise 0. If no error occurred, the driver remains registered even if no device was claimed during registration.

Definition at line 143 of file rio-driver.c.

void rio_unregister_driver ( struct rio_driver rdrv)

rio_unregister_driver - unregister a RIO driver : the RIO driver structure to unregister

Deletes the &struct rio_driver from the list of registered RIO drivers, gives it a chance to clean up by calling its remove() function for each device it was responsible for, and marks those devices as driverless.

Definition at line 162 of file rio-driver.c.

Variable Documentation

struct device rio_bus
Initial value:
= {
.init_name = "rapidio",
}

Definition at line 195 of file rio-driver.c.

struct bus_type rio_bus_type
Initial value:
= {
.name = "rapidio",
.match = rio_match_bus,
.dev_attrs = rio_dev_attrs,
.probe = rio_device_probe,
.remove = rio_device_remove,
}

Definition at line 199 of file rio-driver.c.