diff mbox series

i2c: brcmstb: Use dev_name() for adapter name

Message ID 20220719040611.13979-1-f.fainelli@gmail.com (mailing list archive)
State New, archived
Headers show
Series i2c: brcmstb: Use dev_name() for adapter name | expand

Commit Message

Florian Fainelli July 19, 2022, 4:06 a.m. UTC
This make it easier to disambiguate the different i2c controllers
present in a system, and then correlating with /proc/interrupts allows
to know which instance is interrupt driven and which one is not.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/i2c/busses/i2c-brcmstb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Wolfram Sang July 22, 2022, 4:57 p.m. UTC | #1
On Mon, Jul 18, 2022 at 09:06:10PM -0700, Florian Fainelli wrote:
> This make it easier to disambiguate the different i2c controllers
> present in a system, and then correlating with /proc/interrupts allows
> to know which instance is interrupt driven and which one is not.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
index b00f35c0b066..3ba6cbbe84ac 100644
--- a/drivers/i2c/busses/i2c-brcmstb.c
+++ b/drivers/i2c/busses/i2c-brcmstb.c
@@ -684,9 +684,7 @@  static int brcmstb_i2c_probe(struct platform_device *pdev)
 	adap = &dev->adapter;
 	i2c_set_adapdata(adap, dev);
 	adap->owner = THIS_MODULE;
-	strlcpy(adap->name, "Broadcom STB : ", sizeof(adap->name));
-	if (int_name)
-		strlcat(adap->name, int_name, sizeof(adap->name));
+	strlcpy(adap->name, dev_name(&pdev->dev), sizeof(adap->name));
 	adap->algo = &brcmstb_i2c_algo;
 	adap->dev.parent = &pdev->dev;
 	adap->dev.of_node = pdev->dev.of_node;