Release 4.12 drivers/uwb/umc-dev.c
  
  
  
/*
 * UWB Multi-interface Controller device management.
 *
 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
 *
 * This file is released under the GNU GPL v2.
 */
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/uwb/umc.h>
static void umc_device_release(struct device *dev)
{
	struct umc_dev *umc = to_umc_dev(dev);
	kfree(umc);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| David Vrabel | 26 | 100.00% | 1 | 100.00% | 
| Total | 26 | 100.00% | 1 | 100.00% | 
/**
 * umc_device_create - allocate a child UMC device
 * @parent: parent of the new UMC device.
 * @n:      index of the new device.
 *
 * The new UMC device will have a bus ID of the parent with '-n'
 * appended.
 */
struct umc_dev *umc_device_create(struct device *parent, int n)
{
	struct umc_dev *umc;
	umc = kzalloc(sizeof(struct umc_dev), GFP_KERNEL);
	if (umc) {
		dev_set_name(&umc->dev, "%s-%d", dev_name(parent), n);
		umc->dev.parent  = parent;
		umc->dev.bus     = &umc_bus_type;
		umc->dev.release = umc_device_release;
		umc->dev.dma_mask = parent->dma_mask;
	}
	return umc;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| David Vrabel | 89 | 94.68% | 1 | 50.00% | 
| Kay Sievers | 5 | 5.32% | 1 | 50.00% | 
| Total | 94 | 100.00% | 2 | 100.00% | 
EXPORT_SYMBOL_GPL(umc_device_create);
/**
 * umc_device_register - register a UMC device
 * @umc: pointer to the UMC device
 *
 * The memory resource for the UMC device is acquired and the device
 * registered with the system.
 */
int umc_device_register(struct umc_dev *umc)
{
	int err;
	err = request_resource(umc->resource.parent, &umc->resource);
	if (err < 0) {
		dev_err(&umc->dev, "can't allocate resource range %pR: %d\n",
			&umc->resource, err);
		goto error_request_resource;
	}
	err = device_register(&umc->dev);
	if (err < 0)
		goto error_device_register;
	return 0;
error_device_register:
	put_device(&umc->dev);
	release_resource(&umc->resource);
error_request_resource:
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| David Vrabel | 92 | 90.20% | 1 | 33.33% | 
| Levente Kurusa | 8 | 7.84% | 1 | 33.33% | 
| Joe Perches | 2 | 1.96% | 1 | 33.33% | 
| Total | 102 | 100.00% | 3 | 100.00% | 
EXPORT_SYMBOL_GPL(umc_device_register);
/**
 * umc_device_unregister - unregister a UMC device
 * @umc: pointer to the UMC device
 *
 * First we unregister the device, make sure the driver can do it's
 * resource release thing and then we try to release any left over
 * resources. We take a ref to the device, to make sure it doesn't
 * disappear under our feet.
 */
void umc_device_unregister(struct umc_dev *umc)
{
	struct device *dev;
	if (!umc)
		return;
	dev = get_device(&umc->dev);
	device_unregister(&umc->dev);
	release_resource(&umc->resource);
	put_device(dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| David Vrabel | 52 | 100.00% | 1 | 100.00% | 
| Total | 52 | 100.00% | 1 | 100.00% | 
EXPORT_SYMBOL_GPL(umc_device_unregister);
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| David Vrabel | 283 | 92.79% | 1 | 14.29% | 
| Levente Kurusa | 8 | 2.62% | 1 | 14.29% | 
| Kay Sievers | 5 | 1.64% | 1 | 14.29% | 
| Paul Gortmaker | 3 | 0.98% | 1 | 14.29% | 
| Tejun Heo | 3 | 0.98% | 1 | 14.29% | 
| Joe Perches | 2 | 0.66% | 1 | 14.29% | 
| Lucas De Marchi | 1 | 0.33% | 1 | 14.29% | 
| Total | 305 | 100.00% | 7 | 100.00% | 
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.