Skip to content

Commit

Permalink
Merge pull request #3 from atomnuker/master
Browse files Browse the repository at this point in the history
Fix compilation
  • Loading branch information
kierank committed Mar 14, 2016
2 parents 81e14a1 + 0150e84 commit ba1822e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/miface.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ miface_open (struct inode *inode, struct file *filp)
filp->private_data = iface;
mutex_lock (&card->users_mutex);
if (iface->users) {
if (((iface->owner != current_uid()) &&
(iface->owner != current_euid()) &&
!capable (CAP_DAC_OVERRIDE))) {
if (!uid_eq(iface->owner, current_uid()) &&
!uid_eq(iface->owner, current_euid()) &&
!capable (CAP_DAC_OVERRIDE)) {
mutex_unlock (&card->users_mutex);
return -EBUSY;
}
Expand Down
2 changes: 1 addition & 1 deletion src/miface.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct master_iface {
struct device *dev;
struct master_iface_operations *ops;
unsigned int users;
uid_t owner;
kuid_t owner;
volatile unsigned long events;
struct master_dma_operations *dma_ops;
u32 data_addr;
Expand Down

0 comments on commit ba1822e

Please sign in to comment.