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: Chengguang Xu <cgxu519@gmx.com>
[wsa: fixed typo in commit message]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Chengguang Xu 2019-02-12 14:06:57 +08:00 committed by Wolfram Sang
parent 2e57b7cebb
commit 8a6d508a80
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ struct i2c_dev {
struct cdev cdev;
};
#define I2C_MINORS MINORMASK
#define I2C_MINORS (MINORMASK + 1)
static LIST_HEAD(i2c_dev_list);
static DEFINE_SPINLOCK(i2c_dev_list_lock);