2007-02-20 00:09:41

by Adrian Bunk

[permalink] [raw]
Subject: BACKLIGHT_CLASS_DEVICE=y, SYSFS=n compile error

CONFIG_BACKLIGHT_CLASS_DEVICE=y, CONFIG_SYSFS=n results int he
following compile error:

<-- snip -->

...
LD .tmp_vmlinux1
drivers/built-in.o: In function `nvidia_bl_exit':
(.text+0x27d01): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `nvidia_bl_init':
(.text+0x27e3c): undefined reference to `backlight_device_register'
drivers/built-in.o: In function `radeonfb_bl_exit':
(.text+0x3b64e): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `radeonfb_bl_init':
(.text+0x3b6d1): undefined reference to `backlight_device_register'
drivers/built-in.o: In function `acpi_video_bus_put_devices':
video.c:(.text+0x9a798): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `brightness_exit':
ibm_acpi.c:(.text+0xa393f): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `brightness_init':
ibm_acpi.c:(.text+0xa569c): undefined reference to `backlight_device_register'
drivers/built-in.o: In function `sony_acpi_add':
sony-laptop.c:(.text+0x183c4e): undefined reference to `backlight_device_register'
sony-laptop.c:(.text+0x183da1): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `sony_acpi_remove':
sony-laptop.c:(.text+0x183de5): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `appledisplay_disconnect':
appledisplay.c:(.text+0x6a4d18): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `appledisplay_probe':
appledisplay.c:(.text+0x6a4f17): undefined reference to `backlight_device_register'
appledisplay.c:(.text+0x6a4f88): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `rivafb_probe':
fbdev.c:(.init.text+0x4e23): undefined reference to `backlight_device_register'
drivers/built-in.o: In function `atyfb_pci_probe':
atyfb_base.c:(.init.text+0x6eb2): undefined reference to `backlight_device_register'
drivers/built-in.o: In function `aty128_probe':
aty128fb.c:(.init.text+0x7f57): undefined reference to `backlight_device_register'
drivers/built-in.o: In function `toshiba_acpi_init':
toshiba_acpi.c:(.init.text+0x1b315): undefined reference to `backlight_device_register'
drivers/built-in.o: In function `msi_init':
msi-laptop.c:(.init.text+0x34c67): undefined reference to `backlight_device_register'
msi-laptop.c:(.init.text+0x34ce1): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `rivafb_remove':
fbdev.c:(.exit.text+0x18d): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `atyfb_remove':
atyfb_base.c:(.exit.text+0x2e0): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `aty128_remove':
aty128fb.c:(.exit.text+0x3eb): undefined reference to `backlight_device_unregister'
drivers/built-in.o: In function `asus_acpi_exit':
asus_acpi.c:(.exit.text+0x109b): undefined reference to `backlight_device_unregister'
drivers/built-in.o:toshiba_acpi.c:(.exit.text+0x10cc): more undefined
references to `backlight_device_unregister' follow
make[1]: *** [.tmp_vmlinux1] Error 1

<-- snip -->

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed


2007-02-20 12:39:46

by Richard Purdie

[permalink] [raw]
Subject: Re: BACKLIGHT_CLASS_DEVICE=y, SYSFS=n compile error

On Tue, 2007-02-20 at 01:08 +0100, Adrian Bunk wrote:
> CONFIG_BACKLIGHT_CLASS_DEVICE=y, CONFIG_SYSFS=n results int he
> following compile error:
> ...
> LD .tmp_vmlinux1
> drivers/built-in.o: In function `nvidia_bl_exit':
> (.text+0x27d01): undefined reference to `backlight_device_unregister'
> drivers/built-in.o: In function `nvidia_bl_init':
> (.text+0x27e3c): undefined reference to `backlight_device_register'

I've added the patch below to the git backlight tree to resolve this.

Cheers,

Richard


backlight: Remove bogus SYSFS dependency

Remove a bogus SYSFS dependency from the backlight class

Signed-off-by: Richard Purdie <[email protected]>

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index cd2ef0a..f8bc43c 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -4,9 +4,7 @@

menu "Graphics support"

-if SYSFS
- source "drivers/video/backlight/Kconfig"
-endif
+source "drivers/video/backlight/Kconfig"

config FB
tristate "Support for frame buffer devices"
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 6801edf..1b79a6f 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -12,7 +12,7 @@ fb-objs := $(fb-y)

obj-$(CONFIG_VT) += console/
obj-$(CONFIG_LOGO) += logo/
-obj-$(CONFIG_SYSFS) += backlight/
+obj-y += backlight/

obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o
obj-$(CONFIG_FB_CFB_COPYAREA) += cfbcopyarea.o





2007-02-20 13:19:11

by Adrian Bunk

[permalink] [raw]
Subject: Re: BACKLIGHT_CLASS_DEVICE=y, SYSFS=n compile error

On Tue, Feb 20, 2007 at 12:38:40PM +0000, Richard Purdie wrote:
> On Tue, 2007-02-20 at 01:08 +0100, Adrian Bunk wrote:
> > CONFIG_BACKLIGHT_CLASS_DEVICE=y, CONFIG_SYSFS=n results int he
> > following compile error:
> > ...
> > LD .tmp_vmlinux1
> > drivers/built-in.o: In function `nvidia_bl_exit':
> > (.text+0x27d01): undefined reference to `backlight_device_unregister'
> > drivers/built-in.o: In function `nvidia_bl_init':
> > (.text+0x27e3c): undefined reference to `backlight_device_register'
>
> I've added the patch below to the git backlight tree to resolve this.

Thanks, I can confirm this fixes it.

> Cheers,
>
> Richard
>...

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed