mirror of
https://github.com/sysprog21/lkmpg.git
synced 2025-01-15 22:42:41 +08:00
Remove unnecessary enum assignments
This commit is contained in:
parent
f3405fecd9
commit
980d8f3b30
|
@ -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 */
|
static int major; /* major number assigned to our device driver */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
CDEV_NOT_USED = 0,
|
CDEV_NOT_USED,
|
||||||
CDEV_EXCLUSIVE_OPEN = 1,
|
CDEV_EXCLUSIVE_OPEN,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Is device open? Used to prevent multiple access to device */
|
/* Is device open? Used to prevent multiple access to device */
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
#define BUF_LEN 80
|
#define BUF_LEN 80
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
CDEV_NOT_USED = 0,
|
CDEV_NOT_USED,
|
||||||
CDEV_EXCLUSIVE_OPEN = 1,
|
CDEV_EXCLUSIVE_OPEN,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Is the device open right now? Used to prevent concurrent access into
|
/* Is the device open right now? Used to prevent concurrent access into
|
||||||
|
|
|
@ -29,8 +29,8 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||||
static int major;
|
static int major;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
CDEV_NOT_USED = 0,
|
CDEV_NOT_USED,
|
||||||
CDEV_EXCLUSIVE_OPEN = 1,
|
CDEV_EXCLUSIVE_OPEN,
|
||||||
};
|
};
|
||||||
|
|
||||||
static atomic_t already_open = ATOMIC_INIT(CDEV_NOT_USED);
|
static atomic_t already_open = ATOMIC_INIT(CDEV_NOT_USED);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user