diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2019-02-12 14:06:57 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-02-15 09:53:34 +0100 |
commit | 8a6d508a8055ea2ef8477e649662287e57727f54 (patch) | |
tree | 84889e3683f688f84d0861e4cdf79bc23eea94e4 /drivers/i2c | |
parent | 2e57b7cebb988a27cee44626ae91424e73823bfb (diff) |
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index ccd76c71af09..3f7b9af11137 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -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); |