Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933361AbdC3Gw0 (ORCPT ); Thu, 30 Mar 2017 02:52:26 -0400 Received: from mga01.intel.com ([192.55.52.88]:10575 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933171AbdC3GtZ (ORCPT ); Thu, 30 Mar 2017 02:49:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,245,1486454400"; d="scan'208";a="839936351" From: Jani Nikula To: Tobias Regnery , daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Tobias Regnery Subject: Re: [PATCH] drm/i915: fix build error without CONFIG_BACKLIGHT_CLASS_DEVICE In-Reply-To: <20170329092722.6352-1-tobias.regnery@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20170329092722.6352-1-tobias.regnery@gmail.com> Date: Thu, 30 Mar 2017 09:49:21 +0300 Message-ID: <87a88345u6.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1697 Lines: 48 On Wed, 29 Mar 2017, Tobias Regnery wrote: > With CONFIG_ACPI=n and CONFIG_BACKLIGHT_CLASS_DEVICE=n we see the following > link error in the i915 driver: > > drivers/built-in.o: In function 'intel_backlight_device_register': > (.text+0x2a921d): undefined reference to 'backlight_device_register' > > Fix this by removing the condition on ACPI from the appropriate select > statement. The right fix for the build problem is to add empty stub functions for BACKLIGHT_CLASS_DEVICE=n in include/linux/backlight.h. I'm frankly surprised nobody's done that yet. It's another question whether we should support and select backlight for ACPI=n, and yet another question whether we should support ACPI=n. Also, selecting BACKLIGHT_CLASS_DEVICE is fundamentally broken, but people aren't interested [1]. BR, Jani. [1] http://mid.mail-archive.com/1413580403-16225-1-git-send-email-jani.nikula@intel.com > > Signed-off-by: Tobias Regnery > --- > drivers/gpu/drm/i915/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig > index a5cd5dacf055..532df4bb9283 100644 > --- a/drivers/gpu/drm/i915/Kconfig > +++ b/drivers/gpu/drm/i915/Kconfig > @@ -15,7 +15,7 @@ config DRM_I915 > # i915 depends on ACPI_VIDEO when ACPI is enabled > # but for select to work, need to select ACPI_VIDEO's dependencies, ick > select BACKLIGHT_LCD_SUPPORT if ACPI > - select BACKLIGHT_CLASS_DEVICE if ACPI > + select BACKLIGHT_CLASS_DEVICE > select INPUT if ACPI > select ACPI_VIDEO if ACPI > select ACPI_BUTTON if ACPI -- Jani Nikula, Intel Open Source Technology Center