Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26698
b: refs/heads/master
c: 73d5858
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed May 15, 2006
1 parent 745040e commit 60f5108
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 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: 94585136606e0598a93ec145d9a899c8ec9b2208
refs/heads/master: 73d58588091e81e5ee4266488e2fb09a410f1512
23 changes: 16 additions & 7 deletions trunk/drivers/pcmcia/pcmcia_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ static int ds_open(struct inode *inode, struct file *file)

if (!warning_printed) {
printk(KERN_INFO "pcmcia: Detected deprecated PCMCIA ioctl "
"usage.\n");
"usage from process: %s.\n", current->comm);
printk(KERN_INFO "pcmcia: This interface will soon be removed from "
"the kernel; please expect breakage unless you upgrade "
"to new tools.\n");
Expand Down Expand Up @@ -601,8 +601,12 @@ static int ds_ioctl(struct inode * inode, struct file * file,
ret = CS_BAD_ARGS;
else {
struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function);
ret = pccard_get_configuration_info(s, p_dev, &buf->config);
pcmcia_put_dev(p_dev);
if (p_dev == NULL)
ret = CS_BAD_ARGS;
else {
ret = pccard_get_configuration_info(s, p_dev, &buf->config);
pcmcia_put_dev(p_dev);
}
}
break;
case DS_GET_FIRST_TUPLE:
Expand Down Expand Up @@ -632,8 +636,12 @@ static int ds_ioctl(struct inode * inode, struct file * file,
ret = CS_BAD_ARGS;
else {
struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function);
ret = pccard_get_status(s, p_dev, &buf->status);
pcmcia_put_dev(p_dev);
if (p_dev == NULL)
ret = CS_BAD_ARGS;
else {
ret = pccard_get_status(s, p_dev, &buf->status);
pcmcia_put_dev(p_dev);
}
}
break;
case DS_VALIDATE_CIS:
Expand Down Expand Up @@ -665,9 +673,10 @@ static int ds_ioctl(struct inode * inode, struct file * file,
if (!(buf->conf_reg.Function &&
(buf->conf_reg.Function >= s->functions))) {
struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->conf_reg.Function);
if (p_dev)
if (p_dev) {
ret = pcmcia_access_configuration_register(p_dev, &buf->conf_reg);
pcmcia_put_dev(p_dev);
pcmcia_put_dev(p_dev);
}
}
break;
case DS_GET_FIRST_REGION:
Expand Down

0 comments on commit 60f5108

Please sign in to comment.