* [PATCH] Add patch to allow compilation on versions < 3.5 with CONFIG_OF
@ 2014-06-12 15:45 Devin Heitmueller
2014-06-16 10:06 ` Hans Verkuil
0 siblings, 1 reply; 3+ messages in thread
From: Devin Heitmueller @ 2014-06-12 15:45 UTC (permalink / raw)
To: linux-media; +Cc: Devin Heitmueller
Support for Open Firmware was introduced in the V4L2 tree, but
it depends on features only found in 3.5+. Add a patch to disable
the support for earlier kernels.
Tested on Ubuntu 10.04 with kernel 3.2.0-030200-generic (which has
CONFIG_OF enabled by default).
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
---
backports/backports.txt | 1 +
backports/v3.4_openfirmware.patch | 13 +++++++++++++
2 files changed, 14 insertions(+)
create mode 100644 backports/v3.4_openfirmware.patch
diff --git a/backports/backports.txt b/backports/backports.txt
index 281c263..08908e6 100644
--- a/backports/backports.txt
+++ b/backports/backports.txt
@@ -43,6 +43,7 @@ add v3.6_i2c_add_mux_adapter.patch
[3.4.255]
add v3.4_i2c_add_mux_adapter.patch
+add v3.4_openfirmware.patch
[3.2.255]
add v3.2_devnode_uses_mode_t.patch
diff --git a/backports/v3.4_openfirmware.patch b/backports/v3.4_openfirmware.patch
new file mode 100644
index 0000000..f0a8d36
--- /dev/null
+++ b/backports/v3.4_openfirmware.patch
@@ -0,0 +1,13 @@
+--- a/drivers/media/v4l2-core/v4l2-of.c 2014-06-11 17:05:02.000000000 -0700
++++ b/drivers/media/v4l2-core/v4l2-of.c 2014-06-11 17:05:34.000000000 -0700
+@@ -1,3 +1,5 @@
++/* Depends on symbols not present until kernel 3.5 */
++#if 0
+ /*
+ * V4L2 OF binding parsing library
+ *
+@@ -142,3 +144,4 @@
+ return 0;
+ }
+ EXPORT_SYMBOL(v4l2_of_parse_endpoint);
++#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Add patch to allow compilation on versions < 3.5 with CONFIG_OF
2014-06-12 15:45 [PATCH] Add patch to allow compilation on versions < 3.5 with CONFIG_OF Devin Heitmueller
@ 2014-06-16 10:06 ` Hans Verkuil
2014-06-18 13:12 ` Devin Heitmueller
0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2014-06-16 10:06 UTC (permalink / raw)
To: Devin Heitmueller, linux-media
On 06/12/2014 05:45 PM, Devin Heitmueller wrote:
> Support for Open Firmware was introduced in the V4L2 tree, but
> it depends on features only found in 3.5+. Add a patch to disable
> the support for earlier kernels.
>
> Tested on Ubuntu 10.04 with kernel 3.2.0-030200-generic (which has
> CONFIG_OF enabled by default).
Doesn't this produce compiler warnings since the static v4l2_of_parse_*
functions are now never called?
I would patch v4l2-core/Makefile instead to just never compile v4l2-of.o.
Regards,
Hans
>
> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
> ---
> backports/backports.txt | 1 +
> backports/v3.4_openfirmware.patch | 13 +++++++++++++
> 2 files changed, 14 insertions(+)
> create mode 100644 backports/v3.4_openfirmware.patch
>
> diff --git a/backports/backports.txt b/backports/backports.txt
> index 281c263..08908e6 100644
> --- a/backports/backports.txt
> +++ b/backports/backports.txt
> @@ -43,6 +43,7 @@ add v3.6_i2c_add_mux_adapter.patch
>
> [3.4.255]
> add v3.4_i2c_add_mux_adapter.patch
> +add v3.4_openfirmware.patch
>
> [3.2.255]
> add v3.2_devnode_uses_mode_t.patch
> diff --git a/backports/v3.4_openfirmware.patch b/backports/v3.4_openfirmware.patch
> new file mode 100644
> index 0000000..f0a8d36
> --- /dev/null
> +++ b/backports/v3.4_openfirmware.patch
> @@ -0,0 +1,13 @@
> +--- a/drivers/media/v4l2-core/v4l2-of.c 2014-06-11 17:05:02.000000000 -0700
> ++++ b/drivers/media/v4l2-core/v4l2-of.c 2014-06-11 17:05:34.000000000 -0700
> +@@ -1,3 +1,5 @@
> ++/* Depends on symbols not present until kernel 3.5 */
> ++#if 0
> + /*
> + * V4L2 OF binding parsing library
> + *
> +@@ -142,3 +144,4 @@
> + return 0;
> + }
> + EXPORT_SYMBOL(v4l2_of_parse_endpoint);
> ++#endif
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add patch to allow compilation on versions < 3.5 with CONFIG_OF
2014-06-16 10:06 ` Hans Verkuil
@ 2014-06-18 13:12 ` Devin Heitmueller
0 siblings, 0 replies; 3+ messages in thread
From: Devin Heitmueller @ 2014-06-18 13:12 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Linux Media Mailing List
> Doesn't this produce compiler warnings since the static v4l2_of_parse_*
> functions are now never called?
Those functions are inside the "#if 0", so the compiler never sees them.
> I would patch v4l2-core/Makefile instead to just never compile v4l2-of.o.
Because the final Makefile is generated by a script, I didn't think
you actually could address it at the "make prepare" phase. That said,
now I see that I could have patched
linux/drivers/media/vl2-core/Makefile as you suggested.
I don't have time to regenerate/resubmit at this point. Take the
patch if you want it, feel free to recreate the patch slightly
differently with no discernible benefit, or eventually I will get
around to it the next time I'm working on that tree.
Cheers,
Devin
--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-18 13:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12 15:45 [PATCH] Add patch to allow compilation on versions < 3.5 with CONFIG_OF Devin Heitmueller
2014-06-16 10:06 ` Hans Verkuil
2014-06-18 13:12 ` Devin Heitmueller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.