* [PATCH] davinci: vpif: Fix module build for capture and display
@ 2013-03-07 7:14 Prabhakar lad
2013-03-08 9:23 ` Sekhar Nori
0 siblings, 1 reply; 3+ messages in thread
From: Prabhakar lad @ 2013-03-07 7:14 UTC (permalink / raw)
To: LMML; +Cc: LKML, DLOS, Sekhar Nori, Lad, Prabhakar
From: Lad, Prabhakar <prabhakar.lad@ti.com>
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
Reported-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
---
drivers/media/platform/davinci/vpif.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
index 28638a8..8fbb4a2 100644
--- a/drivers/media/platform/davinci/vpif.c
+++ b/drivers/media/platform/davinci/vpif.c
@@ -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)
{
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] davinci: vpif: Fix module build for capture and display
2013-03-07 7:14 [PATCH] davinci: vpif: Fix module build for capture and display Prabhakar lad
@ 2013-03-08 9:23 ` Sekhar Nori
2013-03-08 9:26 ` Prabhakar Lad
0 siblings, 1 reply; 3+ messages in thread
From: Sekhar Nori @ 2013-03-08 9:23 UTC (permalink / raw)
To: Prabhakar lad; +Cc: LMML, LKML, DLOS, Lad, Prabhakar
Hi Prabhakar,
On 3/7/2013 12:44 PM, Prabhakar lad wrote:
> From: Lad, Prabhakar <prabhakar.lad@ti.com>
>
> 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
>
> Reported-by: Sekhar Nori <nsekhar@ti.com>
> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
> ---
> drivers/media/platform/davinci/vpif.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
> index 28638a8..8fbb4a2 100644
> --- a/drivers/media/platform/davinci/vpif.c
> +++ b/drivers/media/platform/davinci/vpif.c
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] davinci: vpif: Fix module build for capture and display
2013-03-08 9:23 ` Sekhar Nori
@ 2013-03-08 9:26 ` Prabhakar Lad
0 siblings, 0 replies; 3+ messages in thread
From: Prabhakar Lad @ 2013-03-08 9:26 UTC (permalink / raw)
To: Sekhar Nori; +Cc: LMML, LKML, DLOS
Sekhar,
On Fri, Mar 8, 2013 at 2:53 PM, Sekhar Nori <nsekhar@ti.com> wrote:
> Hi Prabhakar,
>
> On 3/7/2013 12:44 PM, Prabhakar lad wrote:
>> From: Lad, Prabhakar <prabhakar.lad@ti.com>
>>
>> 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
>>
>> Reported-by: Sekhar Nori <nsekhar@ti.com>
>> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
>> ---
>> drivers/media/platform/davinci/vpif.c | 4 ++++
>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
>> index 28638a8..8fbb4a2 100644
>> --- a/drivers/media/platform/davinci/vpif.c
>> +++ b/drivers/media/platform/davinci/vpif.c
>> @@ -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.
>
OK as of now I'll go with EXPORT_SYMBOL_GPL() and revisit this at later
point of time.
Regards,
--Prabhakar
> Thanks,
> Sekhar
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-08 9:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 7:14 [PATCH] davinci: vpif: Fix module build for capture and display Prabhakar lad
2013-03-08 9:23 ` Sekhar Nori
2013-03-08 9:26 ` Prabhakar Lad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox