summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2019-02-12 14:06:57 +0800
committerWolfram Sang <wsa@the-dreams.de>2019-02-15 09:53:34 +0100
commit8a6d508a8055ea2ef8477e649662287e57727f54 (patch)
tree84889e3683f688f84d0861e4cdf79bc23eea94e4 /drivers/i2c
parent2e57b7cebb988a27cee44626ae91424e73823bfb (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.c2
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);