History

staging: lirc: Remove unnecessary casts of private_data

Joe Perches committed 16 years ago

Commit e0ac7da1 parent 430eb1b2 files · +7 −7Browse files

Showing the changes to drivers/staging/lirc (2 of 2 files). Show all

Unified · Split

2 files
  1. drivers/staging/lirc/lirc_imon.c +2 −2
  2. drivers/staging/lirc/lirc_zilog.c +5 −5
drivers/staging/lirc/lirc_imon.c+2−2
@@ -277,7 +277,7 @@ static int display_close(struct inode *inode, struct file *file) · 276 unmodified lines
277277 struct imon_context *context = NULL;
278278 int retval = 0;
279279
280− context = (struct imon_context *)file->private_data;
280+ context = file->private_data;
281281
282282 if (!context) {
283283 err("%s: no context for device", __func__);
@@ -380,7 +380,7 @@ static ssize_t vfd_write(struct file *file, const char *buf, · 96 unmodified lines
380380 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };
381381 int *data_buf;
382382
383− context = (struct imon_context *)file->private_data;
383+ context = file->private_data;
384384 if (!context) {
385385 err("%s: no context for device", __func__);
386386 return -ENODEV;
drivers/staging/lirc/lirc_zilog.c+5−5
@@ -716,7 +716,7 @@ static loff_t lseek(struct file *filep, loff_t offset, int orig) · 715 unmodified lines
716716 /* copied from lirc_dev */
717717 static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)
718718 {
719− struct IR *ir = (struct IR *)filep->private_data;
719+ struct IR *ir = filep->private_data;
720720 unsigned char buf[ir->buf.chunk_size];
721721 int ret = 0, written = 0;
722722 DECLARE_WAITQUEUE(wait, current);
@@ -898,7 +898,7 @@ done: · 175 unmodified lines
898898 static ssize_t write(struct file *filep, const char *buf, size_t n,
899899 loff_t *ppos)
900900 {
901− struct IR *ir = (struct IR *)filep->private_data;
901+ struct IR *ir = filep->private_data;
902902 size_t i;
903903 int failures = 0;
904904
@@ -972,7 +972,7 @@ static ssize_t write(struct file *filep, const char *buf, size_t n, · 67 unmodified lines
972972 /* copied from lirc_dev */
973973 static unsigned int poll(struct file *filep, poll_table *wait)
974974 {
975− struct IR *ir = (struct IR *)filep->private_data;
975+ struct IR *ir = filep->private_data;
976976 unsigned int ret;
977977
978978 dprintk("poll called\n");
@@ -994,7 +994,7 @@ static unsigned int poll(struct file *filep, poll_table *wait) · 15 unmodified lines
994994
995995 static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
996996 {
997− struct IR *ir = (struct IR *)filep->private_data;
997+ struct IR *ir = filep->private_data;
998998 int result;
999999 unsigned long mode, features = 0;
10001000
@@ -1086,7 +1086,7 @@ static int open(struct inode *node, struct file *filep) · 85 unmodified lines
10861086 static int close(struct inode *node, struct file *filep)
10871087 {
10881088 /* find our IR struct */
1089− struct IR *ir = (struct IR *)filep->private_data;
1089+ struct IR *ir = filep->private_data;
10901090 if (ir == NULL) {
10911091 zilog_error("close: no private_data attached to the file!\n");
10921092 return -ENODEV;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t