From bb485f9d7aac6f4f2a75e0c3bd48d3b55966afb6 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Tue, 1 Mar 2016 09:52:27 -0800 Subject: [PATCH] video: adf: Fix modular build Builds with ADF configured as module fail the following errors. ERROR: "adf_fops" [drivers/video/adf/adf_sysfs.ko] undefined! ERROR: "adf_obj_sysfs_find" [drivers/video/adf/adf_fops.ko] undefined! ERROR: "adf_buffer_cleanup" [drivers/video/adf/adf_fops.ko] undefined! ERROR: "adf_attachment_validate" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_attachment_find" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_buffer_mapping_cleanup" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_attachment_free" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_obj_find_event_refcount" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_file_queue_event" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_interface_sysfs_init" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_interface_sysfs_destroy" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_device_sysfs_init" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_device_sysfs_destroy" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_sysfs_destroy" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_overlay_engine_sysfs_init" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_overlay_engine_sysfs_destroy" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_sysfs_init" [drivers/video/adf/adf.ko] undefined! If ADF is configured as module, each of the object files ends up being a separate module. Since the functions are used across the various files but not exported, this results in the observed build errors. Modify the Makefile to create a single module instead. Fixes: 066a50cee536 ("video: add atomic display framework") Signed-off-by: Guenter Roeck --- drivers/video/adf/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/adf/Makefile b/drivers/video/adf/Makefile index 78d0915122f4..cdf34a666dc7 100644 --- a/drivers/video/adf/Makefile +++ b/drivers/video/adf/Makefile @@ -2,13 +2,15 @@ ccflags-y := -Idrivers/staging/android CFLAGS_adf.o := -I$(src) -obj-$(CONFIG_ADF) += adf.o \ +obj-$(CONFIG_ADF) += adf_core.o + +adf_core-y := adf.o \ adf_client.o \ adf_fops.o \ adf_format.o \ adf_sysfs.o -obj-$(CONFIG_COMPAT) += adf_fops32.o +adf_core-$(CONFIG_COMPAT) += adf_fops32.o obj-$(CONFIG_ADF_FBDEV) += adf_fbdev.o -- 2.34.1