DVB Update [PATCH 23/31] fix broken usage of get_frontend_algo

From: Manu Abraham
Date: Thu Sep 04 2008 - 16:31:27 EST


>From cb2ad43c376d891438ee5a963f574f0f0166100e Mon Sep 17 00:00:00 2001
From: Manu Abraham <manu@xxxxxxxxxxx>
Date: Thu, 4 Sep 2008 14:27:55 +0200
Subject: [PATCH] DVB Code review fix broken use get_frontend_algo

Code review #3 In legacy drivers, where get_frontend_algo is NULL,
dvb_frontend_swzigzag_update_delay won't be called.

Thanks to Oliver Endriss <o.endriss@xxxxxx> for the code review

From: Manu Abraham <abraham.manu@xxxxxxxxx>
Signed-off-by: Manu Abraham <manu@xxxxxxxxxxx>

dvb_frontend.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

>From cb2ad43c376d891438ee5a963f574f0f0166100e Mon Sep 17 00:00:00 2001
From: Manu Abraham <manu@xxxxxxxxxxx>
Date: Thu, 4 Sep 2008 14:27:55 +0200
Subject: [PATCH] DVB Code review fix broken use get_frontend_algo

Code review #3 In legacy drivers, where get_frontend_algo is NULL,
dvb_frontend_swzigzag_update_delay won't be called.

Thanks to Oliver Endriss <o.endriss@xxxxxx> for the code review

From: Manu Abraham <abraham.manu@xxxxxxxxx>
Signed-off-by: Manu Abraham <manu@xxxxxxxxxxx>

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 24ae622..7311f0c 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -995,11 +995,11 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
*/
/* Legacy */
if (fe->legacy) {
- if ((fepriv->state & FESTATE_LOSTLOCK) && (fepriv->max_drift == 0)) {
- if (fe->ops.get_frontend_algo)
- if (fe->ops.get_frontend_algo(fe) == DVBFE_ALGO_RECOVERY)
- dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK);
+ if ((fepriv->state & FESTATE_LOSTLOCK) &&
+ (fe->ops.info.caps & FE_CAN_RECOVER) &&
+ (fepriv->max_drift == 0)) {

+ dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK);
return 0;
}
} else {