summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tegra/bus.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-05-22 11:57:15 +0400
committerThierry Reding <treding@nvidia.com>2014-06-06 01:14:46 +0400
commit9910f5c455de10f0eb2559093a7adad65f6c05cd (patch)
treed1858225e96d9861c43900141dcf09a08e8f82c0 /drivers/gpu/drm/tegra/bus.c
parentb528ae7190867cd079bae5d6cf48c17d673428ae (diff)
downloadlinux-9910f5c455de10f0eb2559093a7adad65f6c05cd.tar.xz
drm/tegra: Remove host1x drm_bus implementation
The DRM core can now cope with drivers that don't have an associated struct drm_bus, so the host1x implementation is no longer useful. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/bus.c')
-rw-r--r--drivers/gpu/drm/tegra/bus.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/drivers/gpu/drm/tegra/bus.c b/drivers/gpu/drm/tegra/bus.c
deleted file mode 100644
index b3a66d65cb53..000000000000
--- a/drivers/gpu/drm/tegra/bus.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2013 NVIDIA Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include "drm.h"
-
-static int drm_host1x_set_busid(struct drm_device *dev,
- struct drm_master *master)
-{
- const char *device = dev_name(dev->dev);
- const char *bus = dev->dev->bus->name;
-
- master->unique_len = strlen(bus) + 1 + strlen(device);
- master->unique_size = master->unique_len;
-
- master->unique = kmalloc(master->unique_len + 1, GFP_KERNEL);
- if (!master->unique)
- return -ENOMEM;
-
- snprintf(master->unique, master->unique_len + 1, "%s:%s", bus, device);
-
- return 0;
-}
-
-static struct drm_bus drm_host1x_bus = {
- .set_busid = drm_host1x_set_busid,
-};
-
-int drm_host1x_init(struct drm_driver *driver, struct host1x_device *device)
-{
- struct drm_device *drm;
- int ret;
-
- driver->bus = &drm_host1x_bus;
-
- drm = drm_dev_alloc(driver, &device->dev);
- if (!drm)
- return -ENOMEM;
-
- ret = drm_dev_register(drm, 0);
- if (ret)
- goto err_free;
-
- DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n", driver->name,
- driver->major, driver->minor, driver->patchlevel,
- driver->date, drm->primary->index);
-
- return 0;
-
-err_free:
- drm_dev_unref(drm);
- return ret;
-}
-
-void drm_host1x_exit(struct drm_driver *driver, struct host1x_device *device)
-{
- struct tegra_drm *tegra = dev_get_drvdata(&device->dev);
-
- drm_put_dev(tegra->drm);
-}