Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH -next] v4l: expose function outside of ifdef/endif block
       [not found] <20090612185601.be53b034.sfr@canb.auug.org.au>
@ 2009-06-12 18:47 ` Randy Dunlap
  2009-06-12 19:31   ` Trent Piepho
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2009-06-12 18:47 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, LKML, Mauro Carvalho Chehab, linux-media

From: Randy Dunlap <randy.dunlap@oracle.com>

Move v4l_bound_align_image() outside of an #ifdef CONFIG_I2C block
so that it is always built.  Fixes a build error:

vivi.c:(.text+0x48e26): undefined reference to `v4l_bound_align_image'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/media/video/v4l2-common.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-next-20090612.orig/drivers/media/video/v4l2-common.c
+++ linux-next-20090612/drivers/media/video/v4l2-common.c
@@ -915,6 +915,7 @@ const unsigned short *v4l2_i2c_tuner_add
 	return NULL;
 }
 EXPORT_SYMBOL_GPL(v4l2_i2c_tuner_addrs);
+#endif
 
 /* Clamp x to be between min and max, aligned to a multiple of 2^align.  min
  * and max don't have to be aligned, but there must be at least one valid
@@ -986,5 +987,3 @@ void v4l_bound_align_image(u32 *w, unsig
 	}
 }
 EXPORT_SYMBOL_GPL(v4l_bound_align_image);
-
-#endif


-- 
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] v4l: expose function outside of ifdef/endif block
  2009-06-12 18:47 ` [PATCH -next] v4l: expose function outside of ifdef/endif block Randy Dunlap
@ 2009-06-12 19:31   ` Trent Piepho
  0 siblings, 0 replies; 2+ messages in thread
From: Trent Piepho @ 2009-06-12 19:31 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, linux-next, LKML, Mauro Carvalho Chehab,
	linux-media

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1033 bytes --]

On Fri, 12 Jun 2009, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Move v4l_bound_align_image() outside of an #ifdef CONFIG_I2C block
> so that it is always built.  Fixes a build error:

clamp_align() should be moved as well, since it's only used by
v4l_bound_align_image().  I'm attaching an alternate version that fixes
this.  Labeled the endif too.

>  drivers/media/video/v4l2-common.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- linux-next-20090612.orig/drivers/media/video/v4l2-common.c
> +++ linux-next-20090612/drivers/media/video/v4l2-common.c
> @@ -915,6 +915,7 @@ const unsigned short *v4l2_i2c_tuner_add
>  	return NULL;
>  }
>  EXPORT_SYMBOL_GPL(v4l2_i2c_tuner_addrs);
> +#endif
>
>  /* Clamp x to be between min and max, aligned to a multiple of 2^align.  min
>   * and max don't have to be aligned, but there must be at least one valid
> @@ -986,5 +987,3 @@ void v4l_bound_align_image(u32 *w, unsig
>  	}
>  }
>  EXPORT_SYMBOL_GPL(v4l_bound_align_image);
> -
> -#endif

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1347 bytes --]

# HG changeset patch
# User Trent Piepho <xyzzy@speakeasy.org>
# Date 1244834958 25200
# Node ID 23bd6516eafcc06ffb590073e744c7e17382aef9
# Parent  01fd4e3bd1c0fb52cb15acbd22ca7f4857170e6e
v4l2: Move bounding code outside I2C ifdef block

From: Trent Piepho <xyzzy@speakeasy.org>

Move v4l_bound_align_image() and clamp_align() outside of an ifdef block
for I2C related code.  Can cause an undefined reference to
`v4l_bound_align_image' if I2C isn't enabled.

Priority: high

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>

diff -r 01fd4e3bd1c0 -r 23bd6516eafc linux/drivers/media/video/v4l2-common.c
--- a/linux/drivers/media/video/v4l2-common.c	Thu Jun 11 15:31:22 2009 -0700
+++ b/linux/drivers/media/video/v4l2-common.c	Fri Jun 12 12:29:18 2009 -0700
@@ -997,6 +997,8 @@ const unsigned short *v4l2_i2c_tuner_add
 }
 EXPORT_SYMBOL_GPL(v4l2_i2c_tuner_addrs);
 
+#endif /* defined(CONFIG_I2C) */
+
 /* Clamp x to be between min and max, aligned to a multiple of 2^align.  min
  * and max don't have to be aligned, but there must be at least one valid
  * value.  E.g., min=17,max=31,align=4 is not allowed as there are no multiples
@@ -1067,5 +1069,3 @@ void v4l_bound_align_image(u32 *w, unsig
 	}
 }
 EXPORT_SYMBOL_GPL(v4l_bound_align_image);
-
-#endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-12 19:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20090612185601.be53b034.sfr@canb.auug.org.au>
2009-06-12 18:47 ` [PATCH -next] v4l: expose function outside of ifdef/endif block Randy Dunlap
2009-06-12 19:31   ` Trent Piepho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox