Commit 8a6d508a authored by Chengguang Xu's avatar Chengguang Xu Committed by Wolfram Sang

i2c: expand minor range when registering chrdev region

Actually, total amount of available minor number for a single major is
MINORMASK + 1. So expand minor range when registering chrdev region.
Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
[wsa: fixed typo in commit message]
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 2e57b7ce
...@@ -52,7 +52,7 @@ struct i2c_dev { ...@@ -52,7 +52,7 @@ struct i2c_dev {
struct cdev cdev; struct cdev cdev;
}; };
#define I2C_MINORS MINORMASK #define I2C_MINORS (MINORMASK + 1)
static LIST_HEAD(i2c_dev_list); static LIST_HEAD(i2c_dev_list);
static DEFINE_SPINLOCK(i2c_dev_list_lock); static DEFINE_SPINLOCK(i2c_dev_list_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment