aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Walls <awalls@md.metrocast.net>2011-01-26 22:04:15 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 18:23:54 -0400
commit9a55a2b37eb7e4941ef55aadb858b615d229afee (patch)
tree515dfd6f91d1a4febb97f567f7a0f2f31fc9596c
parenta30648550f2f758c9c00c493c8919f89f65438c4 (diff)
[media] lirc_zilog: Use kernel standard methods for marking device non-seekable
lirc_zilog had its own llseek stub that returned -ESPIPE. Get rid of it and use the kernel's no_llseek() and nonseekable_open() functions instead. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/staging/lirc/lirc_zilog.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c
index c857b99e5ace..720ef6739d0e 100644
--- a/drivers/staging/lirc/lirc_zilog.c
+++ b/drivers/staging/lirc/lirc_zilog.c
@@ -712,12 +712,6 @@ static int tx_init(struct IR_tx *tx)
712 return 0; 712 return 0;
713} 713}
714 714
715/* do nothing stub to make LIRC happy */
716static loff_t lseek(struct file *filep, loff_t offset, int orig)
717{
718 return -ESPIPE;
719}
720
721/* copied from lirc_dev */ 715/* copied from lirc_dev */
722static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos) 716static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)
723{ 717{
@@ -1099,6 +1093,7 @@ static int open(struct inode *node, struct file *filep)
1099 /* stash our IR struct */ 1093 /* stash our IR struct */
1100 filep->private_data = ir; 1094 filep->private_data = ir;
1101 1095
1096 nonseekable_open(node, filep);
1102 return 0; 1097 return 0;
1103} 1098}
1104 1099
@@ -1150,7 +1145,7 @@ static struct i2c_driver driver = {
1150 1145
1151static const struct file_operations lirc_fops = { 1146static const struct file_operations lirc_fops = {
1152 .owner = THIS_MODULE, 1147 .owner = THIS_MODULE,
1153 .llseek = lseek, 1148 .llseek = no_llseek,
1154 .read = read, 1149 .read = read,
1155 .write = write, 1150 .write = write,
1156 .poll = poll, 1151 .poll = poll,