The patch number 10700 was added via Hans Verkuil <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Hans Verkuil  <[email protected]>
saa7115: don't access reg 0x87 if it is not present.


Devices like the saa7111 do not have this register, so check for this
before using it.

Priority: normal

Signed-off-by: Hans Verkuil <[email protected]>


---

 linux/drivers/media/video/saa7115.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff -r e471b963bef6 -r fbc8d2c9b6cf linux/drivers/media/video/saa7115.c
--- a/linux/drivers/media/video/saa7115.c       Tue Feb 17 23:44:45 2009 -0300
+++ b/linux/drivers/media/video/saa7115.c       Wed Feb 18 16:22:16 2009 +0100
@@ -1309,11 +1309,12 @@ static int saa711x_s_stream(struct v4l2_
        v4l2_dbg(1, debug, sd, "%s output\n",
                        enable ? "enable" : "disable");
 
-       if (state->enable != enable) {
-               state->enable = enable;
-               saa711x_write(sd, R_87_I_PORT_I_O_ENA_OUT_CLK_AND_GATED,
-                               state->enable);
-       }
+       if (state->enable == enable)
+               return 0;
+       state->enable = enable;
+       if (!saa711x_has_reg(state->ident, 
R_87_I_PORT_I_O_ENA_OUT_CLK_AND_GATED))
+               return 0;
+       saa711x_write(sd, R_87_I_PORT_I_O_ENA_OUT_CLK_AND_GATED, state->enable);
        return 0;
 }
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/fbc8d2c9b6cf62855bbc94b1a9e8c4fde4a3e051

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to