Lines Matching refs:umc
10 #include <linux/uwb/umc.h>
14 struct umc_dev *umc = to_umc_dev(dev);
16 kfree(umc);
29 struct umc_dev *umc;
31 umc = kzalloc(sizeof(struct umc_dev), GFP_KERNEL);
32 if (umc) {
33 dev_set_name(&umc->dev, "%s-%d", dev_name(parent), n);
34 umc->dev.parent = parent;
35 umc->dev.bus = &umc_bus_type;
36 umc->dev.release = umc_device_release;
38 umc->dev.dma_mask = parent->dma_mask;
40 return umc;
46 * @umc: pointer to the UMC device
51 int umc_device_register(struct umc_dev *umc)
55 err = request_resource(umc->resource.parent, &umc->resource);
57 dev_err(&umc->dev, "can't allocate resource range "
59 (unsigned long long)umc->resource.start,
60 (unsigned long long)umc->resource.end,
65 err = device_register(&umc->dev);
71 release_resource(&umc->resource);
79 * @umc: pointer to the UMC device
86 void umc_device_unregister(struct umc_dev *umc)
89 if (!umc)
91 dev = get_device(&umc->dev);
92 device_unregister(&umc->dev);
93 release_resource(&umc->resource);