aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-core/dvb_frontend.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-18 07:29:19 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-10-11 12:54:52 -0400
commitef2cc27cf860b79874e9fde1419dd67c3372e41c (patch)
treecc1f1705bbdb7eac8f19c2b8cadeca92010f5dda /drivers/media/dvb-core/dvb_frontend.c
parentmedia: dvb_frontend: cleanup ioctl handling logic (diff)
downloadlinux-dev-ef2cc27cf860b79874e9fde1419dd67c3372e41c.tar.xz
linux-dev-ef2cc27cf860b79874e9fde1419dd67c3372e41c.zip
media: dvb_frontend: get rid of property cache's state
In the past, I guess the idea was to use state in order to allow an autofush logic. However, in the current code, it is used only for debug messages, on a poor man's solution, as there's already a debug message to indicate when the properties got flushed. So, just get rid of it for good. Reviewed-by: Shuah Khan <shuahkg@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-core/dvb_frontend.c')
-rw-r--r--drivers/media/dvb-core/dvb_frontend.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 9911dd91a84d..45d0d488dfcb 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -934,8 +934,6 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
memset(c, 0, offsetof(struct dtv_frontend_properties, strength));
c->delivery_system = delsys;
- c->state = DTV_CLEAR;
-
dev_dbg(fe->dvb->device, "%s: Clearing cache for delivery system %d\n",
__func__, c->delivery_system);
@@ -1758,13 +1756,13 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
dvb_frontend_clear_cache(fe);
break;
case DTV_TUNE:
- /* interpret the cache of data, build either a traditional frontend
- * tunerequest so we can pass validation in the FE_SET_FRONTEND
- * ioctl.
+ /*
+ * Use the cached Digital TV properties to tune the
+ * frontend
*/
- c->state = tvp->cmd;
- dev_dbg(fe->dvb->device, "%s: Finalised property cache\n",
- __func__);
+ dev_dbg(fe->dvb->device,
+ "%s: Setting the frontend from property cache\n",
+ __func__);
r = dtv_set_frontend(fe);
break;
@@ -1913,7 +1911,6 @@ static int dvb_frontend_ioctl(struct file *file, unsigned int cmd, void *parg)
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv;
- struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
int err;
@@ -1933,7 +1930,6 @@ static int dvb_frontend_ioctl(struct file *file, unsigned int cmd, void *parg)
return -EPERM;
}
- c->state = DTV_UNDEFINED;
err = dvb_frontend_handle_ioctl(file, cmd, parg);
up(&fepriv->sem);
@@ -2117,10 +2113,6 @@ static int dvb_frontend_handle_ioctl(struct file *file,
}
(tvp + i)->result = err;
}
-
- if (c->state == DTV_TUNE)
- dev_dbg(fe->dvb->device, "%s: Property cache is full, tuning\n", __func__);
-
kfree(tvp);
break;
}