Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196991
b: refs/heads/master
c: 7f76c52
h: refs/heads/master
i:
  196989: 49a24a3
  196987: bf69b14
  196983: 90a6218
  196975: c31bb49
  196959: 583721e
  196927: 167d7f5
  196863: 85dcddb
v: v3
  • Loading branch information
Greg Kroah-Hartman committed May 11, 2010
1 parent 759798a commit 665c4d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ffefea471134987fc647f0a7502540bb6e5ae71f
refs/heads/master: 7f76c52fb0f4c7dfbe7dba1e80691fef957242b6
8 changes: 4 additions & 4 deletions trunk/drivers/staging/dt3155/dt3155.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ struct dt3155_config_s {


/* hold data for each frame */
typedef struct {
struct frame_info {
u32 addr; /* address of the buffer with the frame */
u32 tag; /* unique number for the frame */
struct timeval time; /* time that capture took place */
} frame_info_t;
};

/*
* Structure for interrupt and buffer handling.
Expand All @@ -81,7 +81,7 @@ typedef struct {
struct dt3155_fbuffer_s {
int nbuffers;

frame_info_t frame_info[BOARD_MAX_BUFFS];
struct frame_info frame_info[BOARD_MAX_BUFFS];

int empty_buffers[BOARD_MAX_BUFFS]; /* indexes empty frames */
int empty_len; /* Number of empty buffers */
Expand Down Expand Up @@ -155,7 +155,7 @@ typedef struct dt3155_read_s {
u32 frame_seq;
u32 state;

frame_info_t frame_info;
struct frame_info frame_info;
} dt3155_read_t;

#endif /* _DT3155_inc */
8 changes: 4 additions & 4 deletions trunk/drivers/staging/dt3155/dt3155_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ static ssize_t dt3155_read(struct file *filep, char __user *buf,
int minor = MINOR(filep->f_dentry->d_inode->i_rdev);
u32 offset;
int frame_index;
frame_info_t *frame_info_p;
struct frame_info *frame_info;

/* TODO: this should check the error flag and */
/* return an error on hardware failures */
Expand Down Expand Up @@ -807,18 +807,18 @@ static ssize_t dt3155_read(struct file *filep, char __user *buf,
}
}

frame_info_p = &dt3155_status[minor].fbuffer.frame_info[frame_index];
frame_info = &dt3155_status[minor].fbuffer.frame_info[frame_index];

/* make this an offset */
offset = frame_info_p->addr - dt3155_status[minor].mem_addr;
offset = frame_info->addr - dt3155_status[minor].mem_addr;

put_user(offset, (unsigned int *) buf);
buf += sizeof(u32);
put_user(dt3155_status[minor].fbuffer.frame_count, (unsigned int *) buf);
buf += sizeof(u32);
put_user(dt3155_status[minor].state, (unsigned int *) buf);
buf += sizeof(u32);
if (copy_to_user(buf, frame_info_p, sizeof(frame_info_t)))
if (copy_to_user(buf, frame_info, sizeof(*frame_info)))
return -EFAULT;

return sizeof(dt3155_read_t);
Expand Down

0 comments on commit 665c4d6

Please sign in to comment.