aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2010-10-16 20:29:50 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-22 18:05:35 -0400
commit578fcb8e5f3046493932105c404792a2fe0e066f (patch)
treecdd93ab9f6b4d43d15dcaeab3c5ffd574fceba6d
parent4cce492b01599646421529b34deea9f61dec71de (diff)
[media] lirc_dev: sanitize function and struct names a bit
Use names that clearly identify functions as lirc functions. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/IR/lirc_dev.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c
index 930e4a7ab66c..560c35609ca4 100644
--- a/drivers/media/IR/lirc_dev.c
+++ b/drivers/media/IR/lirc_dev.c
@@ -72,7 +72,7 @@ static struct class *lirc_class;
72/* helper function 72/* helper function
73 * initializes the irctl structure 73 * initializes the irctl structure
74 */ 74 */
75static void init_irctl(struct irctl *ir) 75static void lirc_irctl_init(struct irctl *ir)
76{ 76{
77 dev_dbg(ir->d.dev, LOGHEAD "initializing irctl\n", 77 dev_dbg(ir->d.dev, LOGHEAD "initializing irctl\n",
78 ir->d.name, ir->d.minor); 78 ir->d.name, ir->d.minor);
@@ -80,7 +80,7 @@ static void init_irctl(struct irctl *ir)
80 ir->d.minor = NOPLUG; 80 ir->d.minor = NOPLUG;
81} 81}
82 82
83static void cleanup(struct irctl *ir) 83static void lirc_irctl_cleanup(struct irctl *ir)
84{ 84{
85 dev_dbg(ir->d.dev, LOGHEAD "cleaning up\n", ir->d.name, ir->d.minor); 85 dev_dbg(ir->d.dev, LOGHEAD "cleaning up\n", ir->d.name, ir->d.minor);
86 86
@@ -97,7 +97,7 @@ static void cleanup(struct irctl *ir)
97 * reads key codes from driver and puts them into buffer 97 * reads key codes from driver and puts them into buffer
98 * returns 0 on success 98 * returns 0 on success
99 */ 99 */
100static int add_to_buf(struct irctl *ir) 100static int lirc_add_to_buf(struct irctl *ir)
101{ 101{
102 if (ir->d.add_to_buf) { 102 if (ir->d.add_to_buf) {
103 int res = -ENODATA; 103 int res = -ENODATA;
@@ -140,7 +140,7 @@ static int lirc_thread(void *irctl)
140 } 140 }
141 if (kthread_should_stop()) 141 if (kthread_should_stop())
142 break; 142 break;
143 if (!add_to_buf(ir)) 143 if (!lirc_add_to_buf(ir))
144 wake_up_interruptible(&ir->buf->wait_poll); 144 wake_up_interruptible(&ir->buf->wait_poll);
145 } else { 145 } else {
146 set_current_state(TASK_INTERRUPTIBLE); 146 set_current_state(TASK_INTERRUPTIBLE);
@@ -155,7 +155,7 @@ static int lirc_thread(void *irctl)
155} 155}
156 156
157 157
158static struct file_operations fops = { 158static struct file_operations lirc_dev_fops = {
159 .owner = THIS_MODULE, 159 .owner = THIS_MODULE,
160 .read = lirc_dev_fop_read, 160 .read = lirc_dev_fop_read,
161 .write = lirc_dev_fop_write, 161 .write = lirc_dev_fop_write,
@@ -177,7 +177,7 @@ static int lirc_cdev_add(struct irctl *ir)
177 cdev_init(&ir->cdev, d->fops); 177 cdev_init(&ir->cdev, d->fops);
178 ir->cdev.owner = d->owner; 178 ir->cdev.owner = d->owner;
179 } else { 179 } else {
180 cdev_init(&ir->cdev, &fops); 180 cdev_init(&ir->cdev, &lirc_dev_fops);
181 ir->cdev.owner = THIS_MODULE; 181 ir->cdev.owner = THIS_MODULE;
182 } 182 }
183 kobject_set_name(&ir->cdev.kobj, "lirc%d", d->minor); 183 kobject_set_name(&ir->cdev.kobj, "lirc%d", d->minor);
@@ -280,7 +280,7 @@ int lirc_register_driver(struct lirc_driver *d)
280 err = -ENOMEM; 280 err = -ENOMEM;
281 goto out_lock; 281 goto out_lock;
282 } 282 }
283 init_irctl(ir); 283 lirc_irctl_init(ir);
284 irctls[minor] = ir; 284 irctls[minor] = ir;
285 d->minor = minor; 285 d->minor = minor;
286 286
@@ -401,7 +401,7 @@ int lirc_unregister_driver(int minor)
401 mutex_unlock(&ir->irctl_lock); 401 mutex_unlock(&ir->irctl_lock);
402 cdev_del(&ir->cdev); 402 cdev_del(&ir->cdev);
403 } else { 403 } else {
404 cleanup(ir); 404 lirc_irctl_cleanup(ir);
405 cdev_del(&ir->cdev); 405 cdev_del(&ir->cdev);
406 kfree(ir); 406 kfree(ir);
407 irctls[minor] = NULL; 407 irctls[minor] = NULL;
@@ -484,7 +484,7 @@ int lirc_dev_fop_close(struct inode *inode, struct file *file)
484 ir->d.set_use_dec(ir->d.data); 484 ir->d.set_use_dec(ir->d.data);
485 module_put(ir->d.owner); 485 module_put(ir->d.owner);
486 } else { 486 } else {
487 cleanup(ir); 487 lirc_irctl_cleanup(ir);
488 irctls[ir->d.minor] = NULL; 488 irctls[ir->d.minor] = NULL;
489 kfree(ir); 489 kfree(ir);
490 } 490 }