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
277 struct imon_context *context = NULL;277 struct imon_context *context = NULL;
278 int retval = 0;278 int retval = 0;
279 279
280 context = (struct imon_context *)file->private_data;280 context = file->private_data;
281 281
282 if (!context) {282 if (!context) {
283 err("%s: no context for device", __func__);283 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
380 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };380 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };
381 int *data_buf;381 int *data_buf;
382 382
383 context = (struct imon_context *)file->private_data;383 context = file->private_data;
384 if (!context) {384 if (!context) {
385 err("%s: no context for device", __func__);385 err("%s: no context for device", __func__);
386 return -ENODEV;386 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
716/* copied from lirc_dev */716/* copied from lirc_dev */
717static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)717static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)
718{718{
719 struct IR *ir = (struct IR *)filep->private_data;719 struct IR *ir = filep->private_data;
720 unsigned char buf[ir->buf.chunk_size];720 unsigned char buf[ir->buf.chunk_size];
721 int ret = 0, written = 0;721 int ret = 0, written = 0;
722 DECLARE_WAITQUEUE(wait, current);722 DECLARE_WAITQUEUE(wait, current);
@@ -898,7 +898,7 @@ done: · 175 unmodified lines
898static ssize_t write(struct file *filep, const char *buf, size_t n,898static ssize_t write(struct file *filep, const char *buf, size_t n,
899 loff_t *ppos)899 loff_t *ppos)
900{900{
901 struct IR *ir = (struct IR *)filep->private_data;901 struct IR *ir = filep->private_data;
902 size_t i;902 size_t i;
903 int failures = 0;903 int failures = 0;
904 904
@@ -972,7 +972,7 @@ static ssize_t write(struct file *filep, const char *buf, size_t n, · 67 unmodified lines
972/* copied from lirc_dev */972/* copied from lirc_dev */
973static unsigned int poll(struct file *filep, poll_table *wait)973static unsigned int poll(struct file *filep, poll_table *wait)
974{974{
975 struct IR *ir = (struct IR *)filep->private_data;975 struct IR *ir = filep->private_data;
976 unsigned int ret;976 unsigned int ret;
977 977
978 dprintk("poll called\n");978 dprintk("poll called\n");
@@ -994,7 +994,7 @@ static unsigned int poll(struct file *filep, poll_table *wait) · 15 unmodified lines
994 994
995static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)995static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
996{996{
997 struct IR *ir = (struct IR *)filep->private_data;997 struct IR *ir = filep->private_data;
998 int result;998 int result;
999 unsigned long mode, features = 0;999 unsigned long mode, features = 0;
1000 1000
@@ -1086,7 +1086,7 @@ static int open(struct inode *node, struct file *filep) · 85 unmodified lines
1086static int close(struct inode *node, struct file *filep)1086static int close(struct inode *node, struct file *filep)
1087{1087{
1088 /* find our IR struct */1088 /* find our IR struct */
1089 struct IR *ir = (struct IR *)filep->private_data;1089 struct IR *ir = filep->private_data;
1090 if (ir == NULL) {1090 if (ir == NULL) {
1091 zilog_error("close: no private_data attached to the file!\n");1091 zilog_error("close: no private_data attached to the file!\n");
1092 return -ENODEV;1092 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