Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/random.h>
#include <linux/kdev_t.h>
#include <linux/etherdevice.h>
#include <linux/usb.h>
#include <linux/slab.h>
#include <linux/export.h>
#include "uwb-internal.h"
Go to the source code of this file.
Functions | |
void | uwb_rc_init (struct uwb_rc *rc) |
EXPORT_SYMBOL_GPL (uwb_rc_init) | |
struct uwb_rc * | uwb_rc_alloc (void) |
EXPORT_SYMBOL_GPL (uwb_rc_alloc) | |
int | uwb_rc_add (struct uwb_rc *rc, struct device *parent_dev, void *priv) |
EXPORT_SYMBOL_GPL (uwb_rc_add) | |
void | uwb_rc_rm (struct uwb_rc *rc) |
EXPORT_SYMBOL_GPL (uwb_rc_rm) | |
struct uwb_rc * | __uwb_rc_try_get (struct uwb_rc *target_rc) |
EXPORT_SYMBOL_GPL (__uwb_rc_try_get) | |
struct uwb_rc * | uwb_rc_get_by_grandpa (const struct device *grandpa_dev) |
EXPORT_SYMBOL_GPL (uwb_rc_get_by_grandpa) | |
struct uwb_rc * | uwb_rc_get_by_dev (const struct uwb_dev_addr *addr) |
EXPORT_SYMBOL_GPL (uwb_rc_get_by_dev) | |
void | uwb_rc_put (struct uwb_rc *rc) |
EXPORT_SYMBOL_GPL (uwb_rc_put) | |
EXPORT_SYMBOL_GPL | ( | uwb_rc_init | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_alloc | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_add | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_rm | ) |
EXPORT_SYMBOL_GPL | ( | __uwb_rc_try_get | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_get_by_grandpa | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_get_by_dev | ) |
EXPORT_SYMBOL_GPL | ( | uwb_rc_put | ) |
Register a new UWB radio controller
Did you call uwb_rc_init() on your rc?
We assume that this is being called with a > 0 refcount on it [through ops->{get|put}_device(). We'll take our own, though.
is our real device, the one that provides the actual UWB device
|
read |
Locate and refcount a radio controller given a common grand-parent
Pointer to the 'grandparent' device structure.
The Radio Control interface (or the UWB Radio Controller) is always an interface of a device. The parent is the interface, the grandparent is the device that encapsulates the interface.
There is no need to lock around as the "grandpa" would be refcounted by the target, and to remove the referemes, the uwb_rc_class->sem would have to be taken–we hold it, ergo we should be safe.