summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorStefan Wahren <wahrenst@gmx.net>2019-08-27 19:04:16 +0200
committerWolfram Sang <wsa@the-dreams.de>2019-08-29 20:52:36 +0200
commit250212b59a8e33f1b47f15ad9afa3db19ba0fc8d (patch)
treec27e69875b39fa1e7ed644beb26c50da43c91012 /drivers/i2c
parent67de10fbaa12dc7d46412c5ab80f784ea8b4d7f8 (diff)
downloadblackbird-op-linux-250212b59a8e33f1b47f15ad9afa3db19ba0fc8d.tar.gz
blackbird-op-linux-250212b59a8e33f1b47f15ad9afa3db19ba0fc8d.zip
i2c: bcm2835: Add full name of devicetree node to adapter name
Inspired by Lori Hikichi's patch for iproc, this adds the full name of the devicetree node to the adapter name. With the introduction of BCM2711 it's very difficult to distinguish between the multiple instances. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Acked-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-bcm2835.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
index ab5502f11109..e01b2b57e724 100644
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -472,7 +472,8 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
i2c_set_adapdata(adap, i2c_dev);
adap->owner = THIS_MODULE;
adap->class = I2C_CLASS_DEPRECATED;
- strlcpy(adap->name, "bcm2835 I2C adapter", sizeof(adap->name));
+ snprintf(adap->name, sizeof(adap->name), "bcm2835 (%s)",
+ of_node_full_name(pdev->dev.of_node));
adap->algo = &bcm2835_i2c_algo;
adap->dev.parent = &pdev->dev;
adap->dev.of_node = pdev->dev.of_node;
OpenPOWER on IntegriCloud