Skip to content

Commit 8a6d508

Browse files
Chengguang XuWolfram Sang
authored andcommitted
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>
1 parent 2e57b7c commit 8a6d508

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/i2c/i2c-dev.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct i2c_dev {
5252
struct cdev cdev;
5353
};
5454

55-
#define I2C_MINORS MINORMASK
55+
#define I2C_MINORS (MINORMASK + 1)
5656
static LIST_HEAD(i2c_dev_list);
5757
static DEFINE_SPINLOCK(i2c_dev_list_lock);
5858

0 commit comments

Comments
 (0)