Skip to contentSkip to conversation

davinci: vpif: Fix module build for capture and display

PATCH Superseded Prabhakar lad 2 participants 3 messages Mar 8, 2013 – Mar 20, 2013 Media (V4L/DVB)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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

---
Changes for v2:
1: use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL() as pointed by
Sekhar.

 drivers/media/platform/davinci/vpif.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/media/platform/davinci/vpif.c +4 -0
index 28638a8..42c7eba 100644
@@ -44,6 +44,8 @@ static struct resource	*res;
 spinlock_t vpif_lock;
 
 void __iomem *vpif_base;
+EXPORT_SYMBOL_GPL(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_GPL(ch_params);
 
 const unsigned int vpif_ch_params_count = ARRAY_SIZE(ch_params);
+EXPORT_SYMBOL_GPL(vpif_ch_params_count);
 
 static inline void vpif_wr_bit(u32 reg, u32 bit, u32 val)
 {
Signature · 1 line
1.7.4.1
#1 lore raw

Em Fri, 8 Mar 2013 16:19:07 +0530
Prabhakar lad <[email protected]> escreveu:

Quoted 38 lines

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

---
Changes for v2:
1: use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL() as pointed by
Sekhar.

 drivers/media/platform/davinci/vpif.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/media/platform/davinci/vpif.c +2 -0
index 28638a8..42c7eba 100644
@@ -44,6 +44,8 @@ static struct resource	*res;
 spinlock_t vpif_lock;
 
 void __iomem *vpif_base;
+EXPORT_SYMBOL_GPL(vpif_base);
+
 struct clk *vpif_clk;
 
 /**

drivers/media/platform/davinci/vpif.c const struct vpif_channel_config_params ch_params[] = { · line 225

Quoted 4 lines
drivers/media/platform/davinci/vpif.c +1 -0
@@ -220,8 +222,10 @@ const struct vpif_channel_config_params ch_params[] = {
 		.stdid = V4L2_STD_625_50,
 	},
 };
+EXPORT_SYMBOL_GPL(ch_params);

Please don't use simple names like that. It would be very easy that some other driver could try to declare the same symbol. Instead, prefix it with the driver name (vpif_ch_params).

drivers/media/platform/davinci/vpif.c const struct vpif_channel_config_params ch_params[] = { · line 231

Quoted 6 lines
drivers/media/platform/davinci/vpif.c +1 -0
 const unsigned int vpif_ch_params_count = ARRAY_SIZE(ch_params);
+EXPORT_SYMBOL_GPL(vpif_ch_params_count);
 
 static inline void vpif_wr_bit(u32 reg, u32 bit, u32 val)
 {

Regards,
Mauro

#2 lore raw

Hi Mauro,

Quoted 39 lines · Mauro Carvalho Chehab

Em Fri, 8 Mar 2013 16:19:07 +0530
Prabhakar lad <[email protected]> escreveu:

Quoted 36 lines

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

---
Changes for v2:
1: use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL() as pointed by
Sekhar.

 drivers/media/platform/davinci/vpif.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/media/platform/davinci/vpif.c +2 -0
index 28638a8..42c7eba 100644
@@ -44,6 +44,8 @@ static struct resource      *res;
 spinlock_t vpif_lock;
 
 void __iomem *vpif_base;
+EXPORT_SYMBOL_GPL(vpif_base);
+
 struct clk *vpif_clk;
 
Quoted 11 lines

drivers/media/platform/davinci/vpif.c const struct vpif_channel_config_params ch_params[] = { · line 225

Quoted 6 lines
drivers/media/platform/davinci/vpif.c +1 -0
 /**
@@ -220,8 +222,10 @@ const struct vpif_channel_config_params ch_params[] = {
              .stdid = V4L2_STD_625_50,
      },
 };
+EXPORT_SYMBOL_GPL(ch_params);

Please don't use simple names like that. It would be very easy that some other driver could try to declare the same symbol. Instead, prefix it with the driver name (vpif_ch_params).

Agreed, I'll respin a new version fixing it.

Cheers,
--Prabhakar

Quoted 9 lines

drivers/media/platform/davinci/vpif.c const struct vpif_channel_config_params ch_params[] = { · line 231

Quoted 6 lines
drivers/media/platform/davinci/vpif.c +1 -0
 const unsigned int vpif_ch_params_count = ARRAY_SIZE(ch_params);
+EXPORT_SYMBOL_GPL(vpif_ch_params_count);
 
 static inline void vpif_wr_bit(u32 reg, u32 bit, u32 val)
 {

Regards,
Mauro