summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-10-06 20:44:04 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-13 12:25:35 -0200
commit82d7669dc3c0e795c24111fed88e9d5d70f209e0 (patch)
tree89b01d5e4613699de62ed32744f0f78bce2c433f /drivers/media
parente5cefa82ce31b14574947e570d638a6d58225338 (diff)
downloadlinux-3.10-82d7669dc3c0e795c24111fed88e9d5d70f209e0.tar.gz
linux-3.10-82d7669dc3c0e795c24111fed88e9d5d70f209e0.tar.bz2
linux-3.10-82d7669dc3c0e795c24111fed88e9d5d70f209e0.zip
V4L/DVB (9173): S2API: Remove the hardcoded command limit during validation
This means that when developers add new commands then they'll be see the DTV_MAX_COMMAND define and will be more likely to modify it, without having to modify the command validation code. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index ff8cda0ac33..7fe9b3fb1e3 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -848,8 +848,7 @@ void dtv_property_dump(struct dtv_property *tvp)
{
int i;
- if( (tvp->cmd <= 0 || tvp->cmd > DTV_DELIVERY_SYSTEM) &&
- tvp->cmd != DTV_API_VERSION) {
+ if (tvp->cmd <= 0 || tvp->cmd > DTV_MAX_COMMAND) {
printk("%s: tvp.cmd = 0x%08x (undefined/unknown/invalid)\n",
__func__, tvp->cmd);
return;