aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-18 10:22:16 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:54 -0400
commit674a323218ab0b0be100b51c251a72787b5c9e3a (patch)
tree6e69635ebea119dca9de7236550d5977220ce3f6 /drivers/media
parent10afbef15e7bba5e1008f583852077743d28c395 (diff)
V4L/DVB (10700): 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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/saa7115.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index a845582ca5d4..b1c5f63bb77a 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -1310,11 +1310,12 @@ static int saa711x_s_stream(struct v4l2_subdev *sd, int enable)
1310 v4l2_dbg(1, debug, sd, "%s output\n", 1310 v4l2_dbg(1, debug, sd, "%s output\n",
1311 enable ? "enable" : "disable"); 1311 enable ? "enable" : "disable");
1312 1312
1313 if (state->enable != enable) { 1313 if (state->enable == enable)
1314 state->enable = enable; 1314 return 0;
1315 saa711x_write(sd, R_87_I_PORT_I_O_ENA_OUT_CLK_AND_GATED, 1315 state->enable = enable;
1316 state->enable); 1316 if (!saa711x_has_reg(state->ident, R_87_I_PORT_I_O_ENA_OUT_CLK_AND_GATED))
1317 } 1317 return 0;
1318 saa711x_write(sd, R_87_I_PORT_I_O_ENA_OUT_CLK_AND_GATED, state->enable);
1318 return 0; 1319 return 0;
1319} 1320}
1320 1321