Commit b287a515 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Sasha Levin

media: dvb_frontend: get rid of property cache's state

commit ef2cc27c upstream

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: default avatarShuah Khan <shuahkg@osg.samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b2099467
...@@ -932,8 +932,6 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe) ...@@ -932,8 +932,6 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
memset(c, 0, offsetof(struct dtv_frontend_properties, strength)); memset(c, 0, offsetof(struct dtv_frontend_properties, strength));
c->delivery_system = delsys; c->delivery_system = delsys;
c->state = DTV_CLEAR;
dev_dbg(fe->dvb->device, "%s: Clearing cache for delivery system %d\n", dev_dbg(fe->dvb->device, "%s: Clearing cache for delivery system %d\n",
__func__, c->delivery_system); __func__, c->delivery_system);
...@@ -1760,13 +1758,13 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1760,13 +1758,13 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
dvb_frontend_clear_cache(fe); dvb_frontend_clear_cache(fe);
break; break;
case DTV_TUNE: case DTV_TUNE:
/* interpret the cache of data, build either a traditional frontend /*
* tunerequest so we can pass validation in the FE_SET_FRONTEND * Use the cached Digital TV properties to tune the
* ioctl. * frontend
*/ */
c->state = tvp->cmd; dev_dbg(fe->dvb->device,
dev_dbg(fe->dvb->device, "%s: Finalised property cache\n", "%s: Setting the frontend from property cache\n",
__func__); __func__);
r = dtv_set_frontend(fe); r = dtv_set_frontend(fe);
break; break;
...@@ -1915,7 +1913,6 @@ static int dvb_frontend_ioctl(struct file *file, unsigned int cmd, void *parg) ...@@ -1915,7 +1913,6 @@ static int dvb_frontend_ioctl(struct file *file, unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv; struct dvb_frontend *fe = dvbdev->priv;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv; struct dvb_frontend_private *fepriv = fe->frontend_priv;
int err; int err;
...@@ -1935,7 +1932,6 @@ static int dvb_frontend_ioctl(struct file *file, unsigned int cmd, void *parg) ...@@ -1935,7 +1932,6 @@ static int dvb_frontend_ioctl(struct file *file, unsigned int cmd, void *parg)
return -EPERM; return -EPERM;
} }
c->state = DTV_UNDEFINED;
err = dvb_frontend_handle_ioctl(file, cmd, parg); err = dvb_frontend_handle_ioctl(file, cmd, parg);
up(&fepriv->sem); up(&fepriv->sem);
...@@ -2119,10 +2115,6 @@ static int dvb_frontend_handle_ioctl(struct file *file, ...@@ -2119,10 +2115,6 @@ static int dvb_frontend_handle_ioctl(struct file *file,
} }
(tvp + i)->result = err; (tvp + i)->result = err;
} }
if (c->state == DTV_TUNE)
dev_dbg(fe->dvb->device, "%s: Property cache is full, tuning\n", __func__);
kfree(tvp); kfree(tvp);
break; break;
} }
......
...@@ -615,11 +615,6 @@ struct dtv_frontend_properties { ...@@ -615,11 +615,6 @@ struct dtv_frontend_properties {
struct dtv_fe_stats post_bit_count; struct dtv_fe_stats post_bit_count;
struct dtv_fe_stats block_error; struct dtv_fe_stats block_error;
struct dtv_fe_stats block_count; struct dtv_fe_stats block_count;
/* private: */
/* Cache State */
u32 state;
}; };
#define DVB_FE_NO_EXIT 0 #define DVB_FE_NO_EXIT 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment