Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/chardev.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ static ssize_t device_write(struct file *, const char __user *, size_t,
static int major; /* major number assigned to our device driver */

enum {
CDEV_NOT_USED = 0,
CDEV_EXCLUSIVE_OPEN = 1,
CDEV_NOT_USED,
CDEV_EXCLUSIVE_OPEN,
};

/* Is device open? Used to prevent multiple access to device */
Expand Down
4 changes: 2 additions & 2 deletions examples/chardev2.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#define BUF_LEN 80

enum {
CDEV_NOT_USED = 0,
CDEV_EXCLUSIVE_OPEN = 1,
CDEV_NOT_USED,
CDEV_EXCLUSIVE_OPEN,
};

/* Is the device open right now? Used to prevent concurrent access into
Expand Down
4 changes: 2 additions & 2 deletions examples/static_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ static ssize_t device_write(struct file *file, const char __user *buf,
static int major;

enum {
CDEV_NOT_USED = 0,
CDEV_EXCLUSIVE_OPEN = 1,
CDEV_NOT_USED,
CDEV_EXCLUSIVE_OPEN,
};

static atomic_t already_open = ATOMIC_INIT(CDEV_NOT_USED);
Expand Down