mfd stmpe: add index to devicename
Otherwise it's not possible to register multiple stmpe devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
159109f5ff
commit
358434bbdd
|
@ -118,7 +118,8 @@ static int stmpe_probe(struct device_d *dev)
|
|||
}
|
||||
|
||||
stmpe_dev = xzalloc(sizeof(struct stmpe));
|
||||
stmpe_dev->cdev.name = DRIVERNAME;
|
||||
stmpe_dev->cdev.name = asprintf(DRIVERNAME "%d",
|
||||
cdev_find_free_index(DRIVERNAME));
|
||||
stmpe_dev->client = to_i2c_client(dev);
|
||||
stmpe_dev->cdev.size = 191; /* 191 known registers */
|
||||
stmpe_dev->cdev.dev = dev;
|
||||
|
|
Loading…
Reference in New Issue