aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2017-11-23 04:27:57 -0500
committerInki Dae <inki.dae@samsung.com>2017-12-06 20:34:40 -0500
commit1cd6ae355bb2092a6a511558334564cb1f4ffd43 (patch)
tree4c4cb56c38e3caa6abd5a72f3d168a35cb040328
parent2f0f6dfcf925c3bdc6468599fa33b729fbd9247d (diff)
drm/exynos: remove unnecessary function declaration
Removed exynos_drm_get_dma_device funtion declaration on top of exynos_drm_drv.c file. We can remove this declaration by moving the implementation of this function upwards. Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index a6ff3a538c8a..27e423b87266 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -37,8 +37,6 @@
37#define DRIVER_MAJOR 1 37#define DRIVER_MAJOR 1
38#define DRIVER_MINOR 0 38#define DRIVER_MINOR 0
39 39
40static struct device *exynos_drm_get_dma_device(void);
41
42int exynos_atomic_check(struct drm_device *dev, 40int exynos_atomic_check(struct drm_device *dev,
43 struct drm_atomic_state *state) 41 struct drm_atomic_state *state)
44{ 42{
@@ -301,6 +299,27 @@ static struct component_match *exynos_drm_match_add(struct device *dev)
301 return match ?: ERR_PTR(-ENODEV); 299 return match ?: ERR_PTR(-ENODEV);
302} 300}
303 301
302static struct device *exynos_drm_get_dma_device(void)
303{
304 int i;
305
306 for (i = 0; i < ARRAY_SIZE(exynos_drm_drivers); ++i) {
307 struct exynos_drm_driver_info *info = &exynos_drm_drivers[i];
308 struct device *dev;
309
310 if (!info->driver || !(info->flags & DRM_DMA_DEVICE))
311 continue;
312
313 while ((dev = bus_find_device(&platform_bus_type, NULL,
314 &info->driver->driver,
315 (void *)platform_bus_type.match))) {
316 put_device(dev);
317 return dev;
318 }
319 }
320 return NULL;
321}
322
304static int exynos_drm_bind(struct device *dev) 323static int exynos_drm_bind(struct device *dev)
305{ 324{
306 struct exynos_drm_private *private; 325 struct exynos_drm_private *private;
@@ -469,27 +488,6 @@ static struct platform_driver exynos_drm_platform_driver = {
469 }, 488 },
470}; 489};
471 490
472static struct device *exynos_drm_get_dma_device(void)
473{
474 int i;
475
476 for (i = 0; i < ARRAY_SIZE(exynos_drm_drivers); ++i) {
477 struct exynos_drm_driver_info *info = &exynos_drm_drivers[i];
478 struct device *dev;
479
480 if (!info->driver || !(info->flags & DRM_DMA_DEVICE))
481 continue;
482
483 while ((dev = bus_find_device(&platform_bus_type, NULL,
484 &info->driver->driver,
485 (void *)platform_bus_type.match))) {
486 put_device(dev);
487 return dev;
488 }
489 }
490 return NULL;
491}
492
493static void exynos_drm_unregister_devices(void) 491static void exynos_drm_unregister_devices(void)
494{ 492{
495 int i; 493 int i;