From a456f8d5d9437b71a107750abf1a84fc5347b464 Mon Sep 17 00:00:00 2001 From: Ralph Metzler Date: Tue, 10 May 2016 11:59:08 +0200 Subject: [PATCH] add card, link and port number to i2c name --- ddbridge/ddbridge-i2c.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ddbridge/ddbridge-i2c.c b/ddbridge/ddbridge-i2c.c index 1cdba37..d3fd477 100644 --- a/ddbridge/ddbridge-i2c.c +++ b/ddbridge/ddbridge-i2c.c @@ -247,7 +247,9 @@ static int ddb_i2c_add(struct ddb *dev, struct ddb_i2c *i2c, adap->class = I2C_CLASS_TV_ANALOG; #endif #endif - strcpy(adap->name, "ddbridge"); + /*strcpy(adap->name, "ddbridge");*/ + snprintf(adap->name, I2C_NAME_SIZE, "ddbridge_%02x.%x.%x", + dev->nr, i2c->link, i); adap->algo = &ddb_i2c_algo; adap->algo_data = (void *)i2c; adap->dev.parent = dev->dev;