drm: omapdrm: Don't expose the omap_irq_(un)register() functions
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 18 Apr 2016 22:09:31 +0000 (01:09 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 19 Dec 2016 09:25:01 +0000 (11:25 +0200)
The IRQ registration functions are not used outside of their compilation
unit, make them static. As the __omap_irq_(un)register() functions are
only called by their omap_irq_(un)register() counterparts, merge them
together.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_drv.h
drivers/gpu/drm/omapdrm/omap_irq.c

index 9437acc1c541929de36e5c9b982a5c45b4dcb83e..56159992ba18758eee4ce70c78f7bc14d695da28 100644 (file)
@@ -127,10 +127,6 @@ int omap_gem_resume(struct device *dev);
 
 int omap_irq_enable_vblank(struct drm_device *dev, unsigned int pipe);
 void omap_irq_disable_vblank(struct drm_device *dev, unsigned int pipe);
-void __omap_irq_register(struct drm_device *dev, struct omap_drm_irq *irq);
-void __omap_irq_unregister(struct drm_device *dev, struct omap_drm_irq *irq);
-void omap_irq_register(struct drm_device *dev, struct omap_drm_irq *irq);
-void omap_irq_unregister(struct drm_device *dev, struct omap_drm_irq *irq);
 void omap_drm_irq_uninstall(struct drm_device *dev);
 int omap_drm_irq_install(struct drm_device *dev);
 
index 1c826907deadc1e116d5f360375c12b60214a2f3..2fda60105b3c167ef2062be995755c59aef6050c 100644 (file)
@@ -39,11 +39,12 @@ static void omap_irq_update(struct drm_device *dev)
        dispc_read_irqenable();        /* flush posted write */
 }
 
-void __omap_irq_register(struct drm_device *dev, struct omap_drm_irq *irq)
+static void omap_irq_register(struct drm_device *dev, struct omap_drm_irq *irq)
 {
        struct omap_drm_private *priv = dev->dev_private;
        unsigned long flags;
 
+       dispc_runtime_get();
        spin_lock_irqsave(&list_lock, flags);
 
        if (!WARN_ON(irq->registered)) {
@@ -53,21 +54,15 @@ void __omap_irq_register(struct drm_device *dev, struct omap_drm_irq *irq)
        }
 
        spin_unlock_irqrestore(&list_lock, flags);
-}
-
-void omap_irq_register(struct drm_device *dev, struct omap_drm_irq *irq)
-{
-       dispc_runtime_get();
-
-       __omap_irq_register(dev, irq);
-
        dispc_runtime_put();
 }
 
-void __omap_irq_unregister(struct drm_device *dev, struct omap_drm_irq *irq)
+static void omap_irq_unregister(struct drm_device *dev,
+                               struct omap_drm_irq *irq)
 {
        unsigned long flags;
 
+       dispc_runtime_get();
        spin_lock_irqsave(&list_lock, flags);
 
        if (!WARN_ON(!irq->registered)) {
@@ -77,14 +72,6 @@ void __omap_irq_unregister(struct drm_device *dev, struct omap_drm_irq *irq)
        }
 
        spin_unlock_irqrestore(&list_lock, flags);
-}
-
-void omap_irq_unregister(struct drm_device *dev, struct omap_drm_irq *irq)
-{
-       dispc_runtime_get();
-
-       __omap_irq_unregister(dev, irq);
-
        dispc_runtime_put();
 }