davinci: vpif: Fix module build for capture and display
PATCH 1/1 davinci: vpif: Fix module build for capture and display
From: Lad, Prabhakar <[email protected]>
export the symbols which are used by two modules vpif_capture and vpif_display.
This patch fixes following error:
ERROR: "ch_params" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "ch_params" [drivers/media/platform/davinci/vpif_capture.ko] undefined!
ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_capture.ko] undefined!
ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_capture.ko] undefined! make[1]: *** [__modpost] Error 1
--- drivers/media/platform/davinci/vpif.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/media/platform/davinci/vpif.c +4 -0
@@ -44,6 +44,8 @@ static struct resource *res;spinlock_t vpif_lock;void __iomem *vpif_base; +EXPORT_SYMBOL (vpif_base); +struct clk *vpif_clk;/**
@@ -220,8 +222,10 @@ const struct vpif_channel_config_params ch_params[] = { .stdid = V4L2_STD_625_50, }, }; +EXPORT_SYMBOL (ch_params);const unsigned int vpif_ch_params_count =ARRAY_SIZE (ch_params); +EXPORT_SYMBOL (vpif_ch_params_count);static inline void vpif_wr_bit (u32 reg,u32 bit,u32 val) {
Signature · 1 line
1.7.4.1
Hi Prabhakar,
Quoted 25 lines · Prabhakar lad
From: Lad, Prabhakar <[email protected]>
export the symbols which are used by two modules
vpif_captureandvpif_display.This patch fixes following error:
ERROR: "ch_params" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "ch_params" [drivers/media/platform/davinci/vpif_capture.ko] undefined!
ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_capture.ko] undefined!
ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_capture.ko] undefined! make[1]: *** [__modpost] Error 1Reported-by Sekhar Nori <[email protected]>Signed-off-by Lad, Prabhakar <[email protected]>--- drivers/media/platform/davinci/vpif.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/media/platform/davinci/vpif.c +0
-0
drivers/media/platform/davinci/vpif.c static struct resource *res; · line 47
Quoted 4 lines
drivers/media/platform/davinci/vpif.c +1
-0@@ -44,6 +44,8 @@ static struct resource *res;spinlock_t vpif_lock;void __iomem *vpif_base; +EXPORT_SYMBOL (vpif_base);
Should be EXPORT_SYMBOL_GPL() as nothing except GPL code would be needing this internal symbol.
Also exporting this shows that the driver is written for only one instance. It seems to me that the driver modules can use much better abstractions so all these exports wont be needed but having broken module build is bad as well.
Thanks,
Sekhar
Sekhar,
Quoted 36 lines · Sekhar Nori
Hi Prabhakar,
Quoted 25 lines · Prabhakar lad
From: Lad, Prabhakar <[email protected]>
export the symbols which are used by two modules
vpif_captureandvpif_display.This patch fixes following error:
ERROR: "ch_params" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "ch_params" [drivers/media/platform/davinci/vpif_capture.ko] undefined!
ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_capture.ko] undefined!
ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_capture.ko] undefined! make[1]: *** [__modpost] Error 1Reported-by Sekhar Nori <[email protected]>Signed-off-by Lad, Prabhakar <[email protected]>--- drivers/media/platform/davinci/vpif.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/media/platform/davinci/vpif.c +0
-0drivers/media/platform/davinci/vpif.c static struct resource *res; · line 47
Quoted 4 lines
drivers/media/platform/davinci/vpif.c +1
-0@@ -44,6 +44,8 @@ static struct resource *res;spinlock_t vpif_lock;void __iomem *vpif_base; +EXPORT_SYMBOL (vpif_base);Should be
EXPORT_SYMBOL_GPL()as nothing except GPL code would be needing this internal symbol.
Quoted 5 lines
Also exporting this shows that the driver is written for only one instance. It seems to me that the driver modules can use much better abstractions so all these exports wont be needed but having broken module build is bad as well.
OK as of now I'll go with EXPORT_SYMBOL_GPL() and revisit this at later point of time.
Regards,
--Prabhakar
Quoted 2 lines
Thanks,
Sekhar