From 973e9f133a6bbf1fdfe9110e529d15995867137a Mon Sep 17 00:00:00 2001 From: Harunobu Kurokawa Date: Tue, 24 Jan 2017 16:38:38 +0900 Subject: rcar-gen2: linux-renesas: backport r820t tuner driver to fix SPEC-418 Fix the issue that radio app using r820t tuner driver some times crash. Bug-AGL: SPEC-418 Change-Id: I1529ecba91c3988eea6b271d5f8ce6d2d8f1bb11 Signed-off-by: Harunobu Kurokawa --- ...-remove-redundant-initializations-in-r820.patch | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0002-media-r820t-remove-redundant-initializations-in-r820.patch (limited to 'meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0002-media-r820t-remove-redundant-initializations-in-r820.patch') diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0002-media-r820t-remove-redundant-initializations-in-r820.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0002-media-r820t-remove-redundant-initializations-in-r820.patch new file mode 100644 index 000000000..596dd6bee --- /dev/null +++ b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0002-media-r820t-remove-redundant-initializations-in-r820.patch @@ -0,0 +1,52 @@ +From e2e324d70defce7ffc4668085dc3c8ae580074e5 Mon Sep 17 00:00:00 2001 +From: Gianluca Gennari +Date: Sun, 2 Jun 2013 14:30:09 -0300 +Subject: [PATCH 2/3] [media] r820t: remove redundant initializations in + r820t_attach() + +fe->tuner_priv and fe->ops.tuner_ops are initialized twice in r820t_attach(). +Remove the redundant initializations and also move fe->ops.tuner_ops +initialization outside of the mutex lock (as in the xc4000 tuner code for example). + +Signed-off-by: Gianluca Gennari +Signed-off-by: Michael Krufky +Signed-off-by: Mauro Carvalho Chehab +--- + drivers/media/tuners/r820t.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c +index 64f9738..63062a9 100644 +--- a/drivers/media/tuners/r820t.c ++++ b/drivers/media/tuners/r820t.c +@@ -2310,8 +2310,6 @@ struct dvb_frontend *r820t_attach(struct dvb_frontend *fe, + break; + } + +- memcpy(&fe->ops.tuner_ops, &r820t_tuner_ops, sizeof(r820t_tuner_ops)); +- + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 1); + +@@ -2326,15 +2324,14 @@ struct dvb_frontend *r820t_attach(struct dvb_frontend *fe, + + tuner_info("Rafael Micro r820t successfully identified\n"); + +- fe->tuner_priv = priv; +- memcpy(&fe->ops.tuner_ops, &r820t_tuner_ops, +- sizeof(struct dvb_tuner_ops)); +- + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 0); + + mutex_unlock(&r820t_list_mutex); + ++ memcpy(&fe->ops.tuner_ops, &r820t_tuner_ops, ++ sizeof(struct dvb_tuner_ops)); ++ + return fe; + err: + if (fe->ops.i2c_gate_ctrl) +-- +2.9.2 + -- cgit 1.2.3-korg