summaryrefslogtreecommitdiff
path: root/drivers/dma/idxd/sysfs.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2021-07-15 21:44:41 +0300
committerVinod Koul <vkoul@kernel.org>2021-07-21 07:39:16 +0300
commitd9e5481fca74f870cf2fc2f90a0e77e85c0b5b86 (patch)
treeade36205b03f01058794b58b99db8d645e63520a /drivers/dma/idxd/sysfs.c
parent448c3de8ac8353fc4447738ae3c56c4eb6c2131d (diff)
downloadlinux-d9e5481fca74f870cf2fc2f90a0e77e85c0b5b86.tar.xz
dmaengine: dsa: move dsa_bus_type out of idxd driver to standalone
In preparation for dsa_drv compat support to be built-in, move the bus code to its own compilation unit. A follow-on patch adds the compat implementation. Recall that the compat implementation allows for the deprecated / omnibus dsa_drv binding scheme rather than the idiomatic organization of a full fledged bus driver per driver type. Reviewed-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/162637468142.744545.2811632736881720857.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/sysfs.c')
-rw-r--r--drivers/dma/idxd/sysfs.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
index 8d48903df131..633f4947ed32 100644
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@ -16,49 +16,6 @@ static char *idxd_wq_type_names[] = {
[IDXD_WQT_USER] = "user",
};
-static int idxd_config_bus_match(struct device *dev,
- struct device_driver *drv)
-{
- struct idxd_device_driver *idxd_drv =
- container_of(drv, struct idxd_device_driver, drv);
- struct idxd_dev *idxd_dev = confdev_to_idxd_dev(dev);
- int i = 0;
-
- while (idxd_drv->type[i] != IDXD_DEV_NONE) {
- if (idxd_dev->type == idxd_drv->type[i])
- return 1;
- i++;
- }
-
- return 0;
-}
-
-static int idxd_config_bus_probe(struct device *dev)
-{
- struct idxd_device_driver *idxd_drv =
- container_of(dev->driver, struct idxd_device_driver, drv);
- struct idxd_dev *idxd_dev = confdev_to_idxd_dev(dev);
-
- return idxd_drv->probe(idxd_dev);
-}
-
-static int idxd_config_bus_remove(struct device *dev)
-{
- struct idxd_device_driver *idxd_drv =
- container_of(dev->driver, struct idxd_device_driver, drv);
- struct idxd_dev *idxd_dev = confdev_to_idxd_dev(dev);
-
- idxd_drv->remove(idxd_dev);
- return 0;
-}
-
-struct bus_type dsa_bus_type = {
- .name = "dsa",
- .match = idxd_config_bus_match,
- .probe = idxd_config_bus_probe,
- .remove = idxd_config_bus_remove,
-};
-
static int idxd_dsa_drv_probe(struct idxd_dev *idxd_dev)
{
if (is_idxd_dev(idxd_dev))