Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261433
b: refs/heads/master
c: 686a948
h: refs/heads/master
i:
  261431: bb1f67e
v: v3
  • Loading branch information
Stefan Richter authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 38ab651 commit 10df0e1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a286cc1889f14c5c8dbf866718edde100527d8c
refs/heads/master: 686a9488cd23cce1fa8a6cddde0e7668ae2e74b4
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/firewire/firedtv-avc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length)
if (r->response != AVC_RESPONSE_ACCEPTED) {
dev_err(fdtv->device,
"CA PMT failed with response 0x%x\n", r->response);
ret = -EFAULT;
ret = -EACCES;
}
out:
mutex_unlock(&fdtv->avc_mutex);
Expand Down
34 changes: 16 additions & 18 deletions trunk/drivers/media/dvb/firewire/firedtv-ci.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ static int fdtv_get_ca_flags(struct firedtv_tuner_status *stat)
return flags;
}

static int fdtv_ca_reset(struct firedtv *fdtv)
{
return avc_ca_reset(fdtv) ? -EFAULT : 0;
}

static int fdtv_ca_get_caps(void *arg)
{
struct ca_caps *cap = arg;
Expand All @@ -65,12 +60,14 @@ static int fdtv_ca_get_slot_info(struct firedtv *fdtv, void *arg)
{
struct firedtv_tuner_status stat;
struct ca_slot_info *slot = arg;
int err;

if (avc_tuner_status(fdtv, &stat))
return -EFAULT;
err = avc_tuner_status(fdtv, &stat);
if (err)
return err;

if (slot->num != 0)
return -EFAULT;
return -EACCES;

slot->type = CA_CI;
slot->flags = fdtv_get_ca_flags(&stat);
Expand All @@ -81,21 +78,21 @@ static int fdtv_ca_app_info(struct firedtv *fdtv, void *arg)
{
struct ca_msg *reply = arg;

return avc_ca_app_info(fdtv, reply->msg, &reply->length) ? -EFAULT : 0;
return avc_ca_app_info(fdtv, reply->msg, &reply->length);
}

static int fdtv_ca_info(struct firedtv *fdtv, void *arg)
{
struct ca_msg *reply = arg;

return avc_ca_info(fdtv, reply->msg, &reply->length) ? -EFAULT : 0;
return avc_ca_info(fdtv, reply->msg, &reply->length);
}

static int fdtv_ca_get_mmi(struct firedtv *fdtv, void *arg)
{
struct ca_msg *reply = arg;

return avc_ca_get_mmi(fdtv, reply->msg, &reply->length) ? -EFAULT : 0;
return avc_ca_get_mmi(fdtv, reply->msg, &reply->length);
}

static int fdtv_ca_get_msg(struct firedtv *fdtv, void *arg)
Expand All @@ -111,14 +108,15 @@ static int fdtv_ca_get_msg(struct firedtv *fdtv, void *arg)
err = fdtv_ca_info(fdtv, arg);
break;
default:
if (avc_tuner_status(fdtv, &stat))
err = -EFAULT;
else if (stat.ca_mmi == 1)
err = avc_tuner_status(fdtv, &stat);
if (err)
break;
if (stat.ca_mmi == 1)
err = fdtv_ca_get_mmi(fdtv, arg);
else {
dev_info(fdtv->device, "unhandled CA message 0x%08x\n",
fdtv->ca_last_command);
err = -EFAULT;
err = -EACCES;
}
}
fdtv->ca_last_command = 0;
Expand All @@ -141,7 +139,7 @@ static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg)
data_length = msg->msg[3];
}

return avc_ca_pmt(fdtv, &msg->msg[data_pos], data_length) ? -EFAULT : 0;
return avc_ca_pmt(fdtv, &msg->msg[data_pos], data_length);
}

static int fdtv_ca_send_msg(struct firedtv *fdtv, void *arg)
Expand Down Expand Up @@ -170,7 +168,7 @@ static int fdtv_ca_send_msg(struct firedtv *fdtv, void *arg)
default:
dev_err(fdtv->device, "unhandled CA message 0x%08x\n",
fdtv->ca_last_command);
err = -EFAULT;
err = -EACCES;
}
return err;
}
Expand All @@ -184,7 +182,7 @@ static int fdtv_ca_ioctl(struct file *file, unsigned int cmd, void *arg)

switch (cmd) {
case CA_RESET:
err = fdtv_ca_reset(fdtv);
err = avc_ca_reset(fdtv);
break;
case CA_GET_CAP:
err = fdtv_ca_get_caps(arg);
Expand Down

0 comments on commit 10df0e1

Please sign in to comment.