[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200605162518.28099-13-florian.fainelli@broadcom.com>
Date: Fri, 5 Jun 2020 09:25:09 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: linux-kernel@...r.kernel.org
Cc: stable@...r.kernel.org,
Mauro Carvalho Chehab <mchehab@...pensource.com>,
Florian Fainelli <f.fainelli@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Michael Krufky <mkrufky@...uxtv.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Shuah Khan <shuah@...nel.org>,
Jaedon Shin <jaedon.shin@...il.com>,
Colin Ian King <colin.king@...onical.com>,
Katsuhiro Suzuki <suzuki.katsuhiro@...ionext.com>,
Satendra Singh Thakur <satendra.t@...sung.com>,
linux-media@...r.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE
(V4L/DVB)),
linux-fsdevel@...r.kernel.org (open list:FILESYSTEMS (VFS and
infrastructure))
Subject: [PATCH stable 4.9 12/21] media: dvb_frontend: get rid of property cache's state
From: Mauro Carvalho Chehab <mchehab@...pensource.com>
commit ef2cc27cf860b79874e9fde1419dd67c3372e41c 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: Shuah Khan <shuahkg@....samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@...pensource.com>
Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
drivers/media/dvb-core/dvb_frontend.c | 20 ++++++--------------
drivers/media/dvb-core/dvb_frontend.h | 5 -----
2 files changed, 6 insertions(+), 19 deletions(-)
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 5b06ac91420f..a7ba8e200b67 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -932,8 +932,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);
@@ -1760,13 +1758,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;
@@ -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_frontend *fe = dvbdev->priv;
- struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
int err;
@@ -1935,7 +1932,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);
@@ -2119,10 +2115,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;
}
diff --git a/drivers/media/dvb-core/dvb_frontend.h b/drivers/media/dvb-core/dvb_frontend.h
index f852f0a49f42..8a6267ad56d6 100644
--- a/drivers/media/dvb-core/dvb_frontend.h
+++ b/drivers/media/dvb-core/dvb_frontend.h
@@ -615,11 +615,6 @@ struct dtv_frontend_properties {
struct dtv_fe_stats post_bit_count;
struct dtv_fe_stats block_error;
struct dtv_fe_stats block_count;
-
- /* private: */
- /* Cache State */
- u32 state;
-
};
#define DVB_FE_NO_EXIT 0
--
2.17.1
Powered by blists - more mailing lists