Commit 75992a44 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

media: rc: rename ir_lirc_* functions to lirc_*

Remove pointless ir_ prefix.
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 528222d8
...@@ -344,7 +344,7 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev) ...@@ -344,7 +344,7 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev)
} }
lsc.scancode = scancode; lsc.scancode = scancode;
ir_lirc_scancode_event(dev, &lsc); lirc_scancode_event(dev, &lsc);
data->state = STATE_INACTIVE; data->state = STATE_INACTIVE;
input_event(dev->input_dev, EV_MSC, MSC_SCAN, scancode); input_event(dev->input_dev, EV_MSC, MSC_SCAN, scancode);
input_sync(dev->input_dev); input_sync(dev->input_dev);
......
...@@ -30,12 +30,12 @@ static DEFINE_IDA(lirc_ida); ...@@ -30,12 +30,12 @@ static DEFINE_IDA(lirc_ida);
static struct class *lirc_class; static struct class *lirc_class;
/** /**
* ir_lirc_raw_event() - Send raw IR data to lirc to be relayed to userspace * lirc_raw_event() - Send raw IR data to lirc to be relayed to userspace
* *
* @dev: the struct rc_dev descriptor of the device * @dev: the struct rc_dev descriptor of the device
* @ev: the struct ir_raw_event descriptor of the pulse/space * @ev: the struct ir_raw_event descriptor of the pulse/space
*/ */
void ir_lirc_raw_event(struct rc_dev *dev, struct ir_raw_event ev) void lirc_raw_event(struct rc_dev *dev, struct ir_raw_event ev)
{ {
unsigned long flags; unsigned long flags;
struct lirc_fh *fh; struct lirc_fh *fh;
...@@ -111,12 +111,12 @@ void ir_lirc_raw_event(struct rc_dev *dev, struct ir_raw_event ev) ...@@ -111,12 +111,12 @@ void ir_lirc_raw_event(struct rc_dev *dev, struct ir_raw_event ev)
} }
/** /**
* ir_lirc_scancode_event() - Send scancode data to lirc to be relayed to * lirc_scancode_event() - Send scancode data to lirc to be relayed to
* userspace. This can be called in atomic context. * userspace. This can be called in atomic context.
* @dev: the struct rc_dev descriptor of the device * @dev: the struct rc_dev descriptor of the device
* @lsc: the struct lirc_scancode describing the decoded scancode * @lsc: the struct lirc_scancode describing the decoded scancode
*/ */
void ir_lirc_scancode_event(struct rc_dev *dev, struct lirc_scancode *lsc) void lirc_scancode_event(struct rc_dev *dev, struct lirc_scancode *lsc)
{ {
unsigned long flags; unsigned long flags;
struct lirc_fh *fh; struct lirc_fh *fh;
...@@ -130,9 +130,9 @@ void ir_lirc_scancode_event(struct rc_dev *dev, struct lirc_scancode *lsc) ...@@ -130,9 +130,9 @@ void ir_lirc_scancode_event(struct rc_dev *dev, struct lirc_scancode *lsc)
} }
spin_unlock_irqrestore(&dev->lirc_fh_lock, flags); spin_unlock_irqrestore(&dev->lirc_fh_lock, flags);
} }
EXPORT_SYMBOL_GPL(ir_lirc_scancode_event); EXPORT_SYMBOL_GPL(lirc_scancode_event);
static int ir_lirc_open(struct inode *inode, struct file *file) static int lirc_open(struct inode *inode, struct file *file)
{ {
struct rc_dev *dev = container_of(inode->i_cdev, struct rc_dev, struct rc_dev *dev = container_of(inode->i_cdev, struct rc_dev,
lirc_cdev); lirc_cdev);
...@@ -200,7 +200,7 @@ static int ir_lirc_open(struct inode *inode, struct file *file) ...@@ -200,7 +200,7 @@ static int ir_lirc_open(struct inode *inode, struct file *file)
return retval; return retval;
} }
static int ir_lirc_close(struct inode *inode, struct file *file) static int lirc_close(struct inode *inode, struct file *file)
{ {
struct lirc_fh *fh = file->private_data; struct lirc_fh *fh = file->private_data;
struct rc_dev *dev = fh->rc; struct rc_dev *dev = fh->rc;
...@@ -222,8 +222,8 @@ static int ir_lirc_close(struct inode *inode, struct file *file) ...@@ -222,8 +222,8 @@ static int ir_lirc_close(struct inode *inode, struct file *file)
return 0; return 0;
} }
static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf, static ssize_t lirc_transmit(struct file *file, const char __user *buf,
size_t n, loff_t *ppos) size_t n, loff_t *ppos)
{ {
struct lirc_fh *fh = file->private_data; struct lirc_fh *fh = file->private_data;
struct rc_dev *dev = fh->rc; struct rc_dev *dev = fh->rc;
...@@ -363,8 +363,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf, ...@@ -363,8 +363,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf,
return ret; return ret;
} }
static long ir_lirc_ioctl(struct file *file, unsigned int cmd, static long lirc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
unsigned long arg)
{ {
struct lirc_fh *fh = file->private_data; struct lirc_fh *fh = file->private_data;
struct rc_dev *dev = fh->rc; struct rc_dev *dev = fh->rc;
...@@ -586,7 +585,7 @@ static long ir_lirc_ioctl(struct file *file, unsigned int cmd, ...@@ -586,7 +585,7 @@ static long ir_lirc_ioctl(struct file *file, unsigned int cmd,
return ret; return ret;
} }
static __poll_t ir_lirc_poll(struct file *file, struct poll_table_struct *wait) static __poll_t lirc_poll(struct file *file, struct poll_table_struct *wait)
{ {
struct lirc_fh *fh = file->private_data; struct lirc_fh *fh = file->private_data;
struct rc_dev *rcdev = fh->rc; struct rc_dev *rcdev = fh->rc;
...@@ -609,8 +608,8 @@ static __poll_t ir_lirc_poll(struct file *file, struct poll_table_struct *wait) ...@@ -609,8 +608,8 @@ static __poll_t ir_lirc_poll(struct file *file, struct poll_table_struct *wait)
return events; return events;
} }
static ssize_t ir_lirc_read_mode2(struct file *file, char __user *buffer, static ssize_t lirc_read_mode2(struct file *file, char __user *buffer,
size_t length) size_t length)
{ {
struct lirc_fh *fh = file->private_data; struct lirc_fh *fh = file->private_data;
struct rc_dev *rcdev = fh->rc; struct rc_dev *rcdev = fh->rc;
...@@ -647,8 +646,8 @@ static ssize_t ir_lirc_read_mode2(struct file *file, char __user *buffer, ...@@ -647,8 +646,8 @@ static ssize_t ir_lirc_read_mode2(struct file *file, char __user *buffer,
return copied; return copied;
} }
static ssize_t ir_lirc_read_scancode(struct file *file, char __user *buffer, static ssize_t lirc_read_scancode(struct file *file, char __user *buffer,
size_t length) size_t length)
{ {
struct lirc_fh *fh = file->private_data; struct lirc_fh *fh = file->private_data;
struct rc_dev *rcdev = fh->rc; struct rc_dev *rcdev = fh->rc;
...@@ -686,8 +685,8 @@ static ssize_t ir_lirc_read_scancode(struct file *file, char __user *buffer, ...@@ -686,8 +685,8 @@ static ssize_t ir_lirc_read_scancode(struct file *file, char __user *buffer,
return copied; return copied;
} }
static ssize_t ir_lirc_read(struct file *file, char __user *buffer, static ssize_t lirc_read(struct file *file, char __user *buffer, size_t length,
size_t length, loff_t *ppos) loff_t *ppos)
{ {
struct lirc_fh *fh = file->private_data; struct lirc_fh *fh = file->private_data;
struct rc_dev *rcdev = fh->rc; struct rc_dev *rcdev = fh->rc;
...@@ -699,20 +698,20 @@ static ssize_t ir_lirc_read(struct file *file, char __user *buffer, ...@@ -699,20 +698,20 @@ static ssize_t ir_lirc_read(struct file *file, char __user *buffer,
return -ENODEV; return -ENODEV;
if (fh->rec_mode == LIRC_MODE_MODE2) if (fh->rec_mode == LIRC_MODE_MODE2)
return ir_lirc_read_mode2(file, buffer, length); return lirc_read_mode2(file, buffer, length);
else /* LIRC_MODE_SCANCODE */ else /* LIRC_MODE_SCANCODE */
return ir_lirc_read_scancode(file, buffer, length); return lirc_read_scancode(file, buffer, length);
} }
static const struct file_operations lirc_fops = { static const struct file_operations lirc_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = ir_lirc_transmit_ir, .write = lirc_transmit,
.unlocked_ioctl = ir_lirc_ioctl, .unlocked_ioctl = lirc_ioctl,
.compat_ioctl = compat_ptr_ioctl, .compat_ioctl = compat_ptr_ioctl,
.read = ir_lirc_read, .read = lirc_read,
.poll = ir_lirc_poll, .poll = lirc_poll,
.open = ir_lirc_open, .open = lirc_open,
.release = ir_lirc_close, .release = lirc_close,
.llseek = no_llseek, .llseek = no_llseek,
}; };
...@@ -723,7 +722,7 @@ static void lirc_release_device(struct device *ld) ...@@ -723,7 +722,7 @@ static void lirc_release_device(struct device *ld)
put_device(&rcdev->dev); put_device(&rcdev->dev);
} }
int ir_lirc_register(struct rc_dev *dev) int lirc_register(struct rc_dev *dev)
{ {
const char *rx_type, *tx_type; const char *rx_type, *tx_type;
int err, minor; int err, minor;
...@@ -777,7 +776,7 @@ int ir_lirc_register(struct rc_dev *dev) ...@@ -777,7 +776,7 @@ int ir_lirc_register(struct rc_dev *dev)
return err; return err;
} }
void ir_lirc_unregister(struct rc_dev *dev) void lirc_unregister(struct rc_dev *dev)
{ {
unsigned long flags; unsigned long flags;
struct lirc_fh *fh; struct lirc_fh *fh;
......
...@@ -321,20 +321,20 @@ void ir_raw_init(void); ...@@ -321,20 +321,20 @@ void ir_raw_init(void);
#ifdef CONFIG_LIRC #ifdef CONFIG_LIRC
int lirc_dev_init(void); int lirc_dev_init(void);
void lirc_dev_exit(void); void lirc_dev_exit(void);
void ir_lirc_raw_event(struct rc_dev *dev, struct ir_raw_event ev); void lirc_raw_event(struct rc_dev *dev, struct ir_raw_event ev);
void ir_lirc_scancode_event(struct rc_dev *dev, struct lirc_scancode *lsc); void lirc_scancode_event(struct rc_dev *dev, struct lirc_scancode *lsc);
int ir_lirc_register(struct rc_dev *dev); int lirc_register(struct rc_dev *dev);
void ir_lirc_unregister(struct rc_dev *dev); void lirc_unregister(struct rc_dev *dev);
struct rc_dev *rc_dev_get_from_fd(int fd); struct rc_dev *rc_dev_get_from_fd(int fd);
#else #else
static inline int lirc_dev_init(void) { return 0; } static inline int lirc_dev_init(void) { return 0; }
static inline void lirc_dev_exit(void) {} static inline void lirc_dev_exit(void) {}
static inline void ir_lirc_raw_event(struct rc_dev *dev, static inline void lirc_raw_event(struct rc_dev *dev,
struct ir_raw_event ev) { } struct ir_raw_event ev) { }
static inline void ir_lirc_scancode_event(struct rc_dev *dev, static inline void lirc_scancode_event(struct rc_dev *dev,
struct lirc_scancode *lsc) { } struct lirc_scancode *lsc) { }
static inline int ir_lirc_register(struct rc_dev *dev) { return 0; } static inline int lirc_register(struct rc_dev *dev) { return 0; }
static inline void ir_lirc_unregister(struct rc_dev *dev) { } static inline void lirc_unregister(struct rc_dev *dev) { }
#endif #endif
/* /*
......
...@@ -42,7 +42,7 @@ static int ir_raw_event_thread(void *data) ...@@ -42,7 +42,7 @@ static int ir_raw_event_thread(void *data)
if (dev->enabled_protocols & if (dev->enabled_protocols &
handler->protocols || !handler->protocols) handler->protocols || !handler->protocols)
handler->decode(dev, ev); handler->decode(dev, ev);
ir_lirc_raw_event(dev, ev); lirc_raw_event(dev, ev);
raw->prev_ev = ev; raw->prev_ev = ev;
} }
mutex_unlock(&ir_raw_handler_lock); mutex_unlock(&ir_raw_handler_lock);
......
...@@ -747,7 +747,7 @@ void rc_repeat(struct rc_dev *dev) ...@@ -747,7 +747,7 @@ void rc_repeat(struct rc_dev *dev)
}; };
if (dev->allowed_protocols != RC_PROTO_BIT_CEC) if (dev->allowed_protocols != RC_PROTO_BIT_CEC)
ir_lirc_scancode_event(dev, &sc); lirc_scancode_event(dev, &sc);
spin_lock_irqsave(&dev->keylock, flags); spin_lock_irqsave(&dev->keylock, flags);
...@@ -791,7 +791,7 @@ static void ir_do_keydown(struct rc_dev *dev, enum rc_proto protocol, ...@@ -791,7 +791,7 @@ static void ir_do_keydown(struct rc_dev *dev, enum rc_proto protocol,
}; };
if (dev->allowed_protocols != RC_PROTO_BIT_CEC) if (dev->allowed_protocols != RC_PROTO_BIT_CEC)
ir_lirc_scancode_event(dev, &sc); lirc_scancode_event(dev, &sc);
if (new_event && dev->keypressed) if (new_event && dev->keypressed)
ir_do_keyup(dev, false); ir_do_keyup(dev, false);
...@@ -1934,7 +1934,7 @@ int rc_register_device(struct rc_dev *dev) ...@@ -1934,7 +1934,7 @@ int rc_register_device(struct rc_dev *dev)
* keycodes with rc_keydown, so lirc must be registered first. * keycodes with rc_keydown, so lirc must be registered first.
*/ */
if (dev->allowed_protocols != RC_PROTO_BIT_CEC) { if (dev->allowed_protocols != RC_PROTO_BIT_CEC) {
rc = ir_lirc_register(dev); rc = lirc_register(dev);
if (rc < 0) if (rc < 0)
goto out_dev; goto out_dev;
} }
...@@ -1960,7 +1960,7 @@ int rc_register_device(struct rc_dev *dev) ...@@ -1960,7 +1960,7 @@ int rc_register_device(struct rc_dev *dev)
rc_free_rx_device(dev); rc_free_rx_device(dev);
out_lirc: out_lirc:
if (dev->allowed_protocols != RC_PROTO_BIT_CEC) if (dev->allowed_protocols != RC_PROTO_BIT_CEC)
ir_lirc_unregister(dev); lirc_unregister(dev);
out_dev: out_dev:
device_del(&dev->dev); device_del(&dev->dev);
out_rx_free: out_rx_free:
...@@ -2024,7 +2024,7 @@ void rc_unregister_device(struct rc_dev *dev) ...@@ -2024,7 +2024,7 @@ void rc_unregister_device(struct rc_dev *dev)
* that userspace polling will get notified. * that userspace polling will get notified.
*/ */
if (dev->allowed_protocols != RC_PROTO_BIT_CEC) if (dev->allowed_protocols != RC_PROTO_BIT_CEC)
ir_lirc_unregister(dev); lirc_unregister(dev);
device_del(&dev->dev); device_del(&dev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment