Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202094
b: refs/heads/master
c: 044e587
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Mauro Carvalho Chehab committed Aug 2, 2010
1 parent 3f120f0 commit 77cb773
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 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: f9839da0513b4f13a137a07a9362ea5b02897bd7
refs/heads/master: 044e5878c2158d701e6f47a9604910589a384ee2
7 changes: 3 additions & 4 deletions trunk/drivers/media/IR/ir-lirc-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char *buf,
return ret;
}

static int ir_lirc_ioctl(struct inode *node, struct file *filep,
unsigned int cmd, unsigned long arg)
static long ir_lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
{
struct lirc_codec *lirc;
struct ir_input_dev *ir_dev;
Expand Down Expand Up @@ -154,7 +153,7 @@ static int ir_lirc_ioctl(struct inode *node, struct file *filep,
break;

default:
return lirc_dev_fop_ioctl(node, filep, cmd, arg);
return lirc_dev_fop_ioctl(filep, cmd, arg);
}

return ret;
Expand All @@ -173,7 +172,7 @@ static void ir_lirc_close(void *data)
static struct file_operations lirc_fops = {
.owner = THIS_MODULE,
.write = ir_lirc_transmit_ir,
.ioctl = ir_lirc_ioctl,
.unlocked_ioctl = ir_lirc_ioctl,
.read = lirc_dev_fop_read,
.poll = lirc_dev_fop_poll,
.open = lirc_dev_fop_open,
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/media/IR/lirc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static struct file_operations fops = {
.read = lirc_dev_fop_read,
.write = lirc_dev_fop_write,
.poll = lirc_dev_fop_poll,
.ioctl = lirc_dev_fop_ioctl,
.unlocked_ioctl = lirc_dev_fop_ioctl,
.open = lirc_dev_fop_open,
.release = lirc_dev_fop_close,
};
Expand Down Expand Up @@ -242,9 +242,9 @@ int lirc_register_driver(struct lirc_driver *d)
goto out;
} else if (!d->rbuf) {
if (!(d->fops && d->fops->read && d->fops->poll &&
d->fops->ioctl)) {
d->fops->unlocked_ioctl)) {
dev_err(d->dev, "lirc_dev: lirc_register_driver: "
"neither read, poll nor ioctl can be NULL!\n");
"neither read, poll nor unlocked_ioctl can be NULL!\n");
err = -EBADRQC;
goto out;
}
Expand Down Expand Up @@ -425,6 +425,7 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)
retval = -ENODEV;
goto error;
}
file->private_data = ir;

dev_dbg(ir->d.dev, LOGHEAD "open called\n", ir->d.name, ir->d.minor);

Expand Down Expand Up @@ -516,12 +517,11 @@ unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait)
}
EXPORT_SYMBOL(lirc_dev_fop_poll);

int lirc_dev_fop_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
unsigned long mode;
int result = 0;
struct irctl *ir = irctls[iminor(inode)];
struct irctl *ir = file->private_data;

dev_dbg(ir->d.dev, LOGHEAD "ioctl called (0x%x)\n",
ir->d.name, ir->d.minor, cmd);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/IR/lirc_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ void *lirc_get_pdata(struct file *file);
int lirc_dev_fop_open(struct inode *inode, struct file *file);
int lirc_dev_fop_close(struct inode *inode, struct file *file);
unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait);
int lirc_dev_fop_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
ssize_t lirc_dev_fop_read(struct file *file, char *buffer, size_t length,
loff_t *ppos);
ssize_t lirc_dev_fop_write(struct file *file, const char *buffer, size_t length,
Expand Down

0 comments on commit 77cb773

Please sign in to comment.