drm/komeda: Remove in-code use of ifdef
authorMihail Atanassov <Mihail.Atanassov@arm.com>
Tue, 17 Sep 2019 15:05:08 +0000 (15:05 +0000)
committerjames qian wang (Arm Technology China) <james.qian.wang@arm.com>
Wed, 18 Sep 2019 08:27:16 +0000 (16:27 +0800)
Provide a dummy static inline function in the header instead.

Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Lowry Li (Arm Technology China) <Lowry.Li@arm.com>
Cc: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Fixes: 4d74b25ee395 ("drm/komeda: Adds error event print functionality")
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190917150314.20892-1-mihail.atanassov@arm.com
drivers/gpu/drm/arm/display/komeda/komeda_dev.h
drivers/gpu/drm/arm/display/komeda/komeda_kms.c

index e28e7e6..8acf8c0 100644 (file)
@@ -220,6 +220,8 @@ struct komeda_dev *dev_to_mdev(struct device *dev);
 
 #ifdef CONFIG_DRM_KOMEDA_ERROR_PRINT
 void komeda_print_events(struct komeda_events *evts);
+#else
+static inline void komeda_print_events(struct komeda_events *evts) {}
 #endif
 
 #endif /*_KOMEDA_DEV_H_*/
index 18d7e25..dc85c08 100644 (file)
@@ -47,9 +47,7 @@ static irqreturn_t komeda_kms_irq_handler(int irq, void *data)
        memset(&evts, 0, sizeof(evts));
        status = mdev->funcs->irq_handler(mdev, &evts);
 
-#ifdef CONFIG_DRM_KOMEDA_ERROR_PRINT
        komeda_print_events(&evts);
-#endif
 
        /* Notify the crtc to handle the events */
        for (i = 0; i < kms->n_crtcs; i++)