From fdd0c051aff401925d7e6a7118931245052d434a Mon Sep 17 00:00:00 2001 From: Per-Daniel Olsson Date: Fri, 10 Feb 2012 18:30:04 +0100 Subject: misc: compdev: Updated for new kernel composition The compdev device has been updated for the new B2R2/MCDE composition in the kernel. All B2R2 work will now be done in the kernel. A callback interface has been added for potential listeners. Such listeners could for example be cloning for external devices. ST-Ericsson Linux next: NA ST-Ericsson ID: 404691 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I0c059fd6ef889356b1de77684c30721ce6b3ebbf Signed-off-by: Per-Daniel Olsson Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/49974 Reviewed-by: QATOOLS Reviewed-by: Robert FEKETE Reviewed-by: QABUILD --- arch/arm/mach-ux500/board-mop500-mcde.c | 2 +- drivers/misc/compdev/Makefile | 7 +- drivers/misc/compdev/compdev.c | 1126 +++++++++++++++++++++++++++---- include/linux/compdev.h | 88 ++- 4 files changed, 1058 insertions(+), 165 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500-mcde.c b/arch/arm/mach-ux500/board-mop500-mcde.c index 5400db27b7e..e60842c86e8 100644 --- a/arch/arm/mach-ux500/board-mop500-mcde.c +++ b/arch/arm/mach-ux500/board-mop500-mcde.c @@ -393,7 +393,7 @@ static int display_postregistered_callback(struct notifier_block *nb, #ifdef CONFIG_COMPDEV mfb = to_mcde_fb(fbi); /* Create a compdev overlay for this display */ - if (compdev_create(ddev, mfb->ovlys[0]) < 0) { + if (compdev_create(ddev, mfb->ovlys[0], true) < 0) { dev_warn(&ddev->dev, "Failed to create compdev for display %s\n", ddev->name); diff --git a/drivers/misc/compdev/Makefile b/drivers/misc/compdev/Makefile index 8d5cd14dc36..b8385848712 100644 --- a/drivers/misc/compdev/Makefile +++ b/drivers/misc/compdev/Makefile @@ -1 +1,6 @@ -obj-$(CONFIG_DISPDEV) += compdev.o +obj-$(CONFIG_COMPDEV) += compdev.o + +ifdef CONFIG_COMPDEV_DEBUG +EXTRA_CFLAGS += -DDEBUG +endif + diff --git a/drivers/misc/compdev/compdev.c b/drivers/misc/compdev/compdev.c index 4810e20d4cd..e0c34879f65 100644 --- a/drivers/misc/compdev/compdev.c +++ b/drivers/misc/compdev/compdev.c @@ -22,13 +22,22 @@ #include #include #include +#include #include #include +#include #include