mdev_driver.c (c441bfb5f2866de71e092c1b9d866a65978dfe1a) | mdev_driver.c (88a21f265ce50a17e6e71e3fb4467625cf234c5a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * MDEV driver 4 * 5 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 6 * Author: Neo Jia <cjia@nvidia.com> 7 * Kirti Wankhede <kwankhede@nvidia.com> 8 */ --- 57 unchanged lines hidden (view full) --- 66 if (drv->remove) 67 drv->remove(mdev); 68 69 mdev_detach_iommu(mdev); 70 71 return 0; 72} 73 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * MDEV driver 4 * 5 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 6 * Author: Neo Jia <cjia@nvidia.com> 7 * Kirti Wankhede <kwankhede@nvidia.com> 8 */ --- 57 unchanged lines hidden (view full) --- 66 if (drv->remove) 67 drv->remove(mdev); 68 69 mdev_detach_iommu(mdev); 70 71 return 0; 72} 73 |
74static int mdev_match(struct device *dev, struct device_driver *drv) 75{ 76 /* 77 * No drivers automatically match. Drivers are only bound by explicit 78 * device_driver_attach() 79 */ 80 return 0; 81} 82 |
|
74struct bus_type mdev_bus_type = { 75 .name = "mdev", 76 .probe = mdev_probe, 77 .remove = mdev_remove, | 83struct bus_type mdev_bus_type = { 84 .name = "mdev", 85 .probe = mdev_probe, 86 .remove = mdev_remove, |
87 .match = mdev_match, |
|
78}; 79EXPORT_SYMBOL_GPL(mdev_bus_type); 80 81/** 82 * mdev_register_driver - register a new MDEV driver 83 * @drv: the driver to register 84 * 85 * Returns a negative value on error, otherwise 0. --- 30 unchanged lines hidden --- | 88}; 89EXPORT_SYMBOL_GPL(mdev_bus_type); 90 91/** 92 * mdev_register_driver - register a new MDEV driver 93 * @drv: the driver to register 94 * 95 * Returns a negative value on error, otherwise 0. --- 30 unchanged lines hidden --- |