mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 10:29:52 +00:00
media: tc358743: cleanup tc358743_cec_isr
[ Upstream commit877cb8a444] tc358743_cec_isr is misnammed, it is not the main isr. So rename it to be consistent with its siblings, tc358743_cec_handler. It also does not check if its input parameter 'handled' is is non NULL like its siblings, so add a check. Fixes:a0ec8d1dc4("media: tc358743: add CEC support") Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
665d45305a
commit
2e92a46fd7
@@ -919,7 +919,7 @@ static const struct cec_adap_ops tc358743_cec_adap_ops = {
|
|||||||
.adap_monitor_all_enable = tc358743_cec_adap_monitor_all_enable,
|
.adap_monitor_all_enable = tc358743_cec_adap_monitor_all_enable,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void tc358743_cec_isr(struct v4l2_subdev *sd, u16 intstatus,
|
static void tc358743_cec_handler(struct v4l2_subdev *sd, u16 intstatus,
|
||||||
bool *handled)
|
bool *handled)
|
||||||
{
|
{
|
||||||
struct tc358743_state *state = to_state(sd);
|
struct tc358743_state *state = to_state(sd);
|
||||||
@@ -953,6 +953,7 @@ static void tc358743_cec_isr(struct v4l2_subdev *sd, u16 intstatus,
|
|||||||
cec_transmit_attempt_done(state->cec_adap,
|
cec_transmit_attempt_done(state->cec_adap,
|
||||||
CEC_TX_STATUS_ERROR);
|
CEC_TX_STATUS_ERROR);
|
||||||
}
|
}
|
||||||
|
if (handled)
|
||||||
*handled = true;
|
*handled = true;
|
||||||
}
|
}
|
||||||
if ((intstatus & MASK_CEC_RINT) &&
|
if ((intstatus & MASK_CEC_RINT) &&
|
||||||
@@ -968,6 +969,7 @@ static void tc358743_cec_isr(struct v4l2_subdev *sd, u16 intstatus,
|
|||||||
msg.msg[i] = v & 0xff;
|
msg.msg[i] = v & 0xff;
|
||||||
}
|
}
|
||||||
cec_received_msg(state->cec_adap, &msg);
|
cec_received_msg(state->cec_adap, &msg);
|
||||||
|
if (handled)
|
||||||
*handled = true;
|
*handled = true;
|
||||||
}
|
}
|
||||||
i2c_wr16(sd, INTSTATUS,
|
i2c_wr16(sd, INTSTATUS,
|
||||||
@@ -1432,7 +1434,7 @@ static int tc358743_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
|
|||||||
|
|
||||||
#ifdef CONFIG_VIDEO_TC358743_CEC
|
#ifdef CONFIG_VIDEO_TC358743_CEC
|
||||||
if (intstatus & (MASK_CEC_RINT | MASK_CEC_TINT)) {
|
if (intstatus & (MASK_CEC_RINT | MASK_CEC_TINT)) {
|
||||||
tc358743_cec_isr(sd, intstatus, handled);
|
tc358743_cec_handler(sd, intstatus, handled);
|
||||||
i2c_wr16(sd, INTSTATUS,
|
i2c_wr16(sd, INTSTATUS,
|
||||||
intstatus & (MASK_CEC_RINT | MASK_CEC_TINT));
|
intstatus & (MASK_CEC_RINT | MASK_CEC_TINT));
|
||||||
intstatus &= ~(MASK_CEC_RINT | MASK_CEC_TINT);
|
intstatus &= ~(MASK_CEC_RINT | MASK_CEC_TINT);
|
||||||
|
|||||||
Reference in New Issue
Block a user