blob: b141d520efbfdea325937e8f529be3cf8b7aa5ce [file] [log] [blame]
Thomas Gleixneradf77482019-05-29 07:12:28 -07001// SPDX-License-Identifier: GPL-2.0-only
David Vrabelda389ea2008-09-17 16:34:12 +01002/*
3 * UWB Multi-interface Controller driver management.
4 *
5 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
David Vrabelda389ea2008-09-17 16:34:12 +01006 */
7#include <linux/kernel.h>
Paul Gortmaker475c0a62011-07-10 13:18:02 -04008#include <linux/export.h>
David Vrabelda389ea2008-09-17 16:34:12 +01009#include <linux/uwb/umc.h>
10
11int __umc_driver_register(struct umc_driver *umc_drv, struct module *module,
12 const char *mod_name)
13{
14 umc_drv->driver.name = umc_drv->name;
15 umc_drv->driver.owner = module;
16 umc_drv->driver.mod_name = mod_name;
17 umc_drv->driver.bus = &umc_bus_type;
18
19 return driver_register(&umc_drv->driver);
20}
21EXPORT_SYMBOL_GPL(__umc_driver_register);
22
23/**
24 * umc_driver_register - unregister a UMC capabiltity driver.
25 * @umc_drv: pointer to the driver.
26 */
27void umc_driver_unregister(struct umc_driver *umc_drv)
28{
29 driver_unregister(&umc_drv->driver);
30}
31EXPORT_SYMBOL_GPL(umc_driver_unregister);