int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_connector *connector);
 int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
                                       struct drm_connector *connector);
-static inline int
-drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
-                                             const char *name, bool primary)
-{
-       return remove_conflicting_framebuffers(a, name, primary);
-}
 #else
 static inline int drm_fb_helper_modinit(void)
 {
        return 0;
 }
 
+#endif
+
 static inline int
 drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
                                              const char *name, bool primary)
 {
+#if IS_ENABLED(CONFIG_FB)
+       return remove_conflicting_framebuffers(a, name, primary);
+#else
        return 0;
-}
 #endif
+}
+
 #endif