umc-drv.c 845 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * UWB Multi-interface Controller driver management.
  3. *
  4. * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
  5. *
  6. * This file is released under the GNU GPL v2.
  7. */
  8. #include <linux/kernel.h>
  9. #include <linux/export.h>
  10. #include <linux/uwb/umc.h>
  11. int __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. return driver_register(&umc_drv->driver);
  19. }
  20. EXPORT_SYMBOL_GPL(__umc_driver_register);
  21. /**
  22. * umc_driver_register - unregister a UMC capabiltity driver.
  23. * @umc_drv: pointer to the driver.
  24. */
  25. void umc_driver_unregister(struct umc_driver *umc_drv)
  26. {
  27. driver_unregister(&umc_drv->driver);
  28. }
  29. EXPORT_SYMBOL_GPL(umc_driver_unregister);