Skip to content

Commit e239b5a

Browse files
authored
Merge pull request #19 from Microsemi/bugfix_event_wait
BugFix - event-wait
2 parents ddb4b76 + c34da5e commit e239b5a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

switchtec.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@ static int ioctl_event_ctl(struct switchtec_dev *stdev,
826826
{
827827
int ret;
828828
int nr_idxs;
829+
unsigned int event_flags;
829830
struct switchtec_ioctl_event_ctl ctl;
830831

831832
if (copy_from_user(&ctl, uctl, sizeof(ctl)))
@@ -847,7 +848,9 @@ static int ioctl_event_ctl(struct switchtec_dev *stdev,
847848
else
848849
return -EINVAL;
849850

851+
event_flags = ctl.flags;
850852
for (ctl.index = 0; ctl.index < nr_idxs; ctl.index++) {
853+
ctl.flags = event_flags;
851854
ret = event_ctl(stdev, &ctl);
852855
if (ret < 0)
853856
return ret;

0 commit comments

Comments
 (0)