From patchwork Tue Jul 19 04:06:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12922091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8256BC433EF for ; Tue, 19 Jul 2022 04:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7atVcQU2YLL5VVvUjnibinKF71NNt+xKfmV+8P6etyQ=; b=XI1yTorisY+Myv Jmmr069DD1CinIATa7nhokQN3A0naTbkGzphtcYlVVL9gjzf3BppgO0FA3D/1cG5CL0sMHfbCoYju xyPcmS/Cg8eFgh10RnxKAHLaSqi7QiwFUsiO368/46H5dAh6y3JuNrGx4ypFkxe1P8o8eeoDQurzE zrhmNLwJhAQFd26XHuHTZasHwmv4uYuZUP6JDPq+xQGo1OM9uI3xR6PGYdhyPtbwugnPJIZowhKvf bUzozDKLI1Ir1SDzoDBg7Ws6e1Tf2vfLOWX6VPzdI/ON0BUtGpTBSxIY35SbuUuh4+RUc0QbBp7j0 ty7JiJkfujSnCpgqTZZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDeUz-004eDX-Ve; Tue, 19 Jul 2022 04:06:18 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDeUw-004drd-Tj for linux-arm-kernel@lists.infradead.org; Tue, 19 Jul 2022 04:06:16 +0000 Received: by mail-pl1-x631.google.com with SMTP id z1so10853938plb.1 for ; Mon, 18 Jul 2022 21:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pjjviKAxMWKcEuuLQJoo7ikBZpRXy53qslO/fzhKHaA=; b=n2Ec6vxbtolSecYkGQH4MNKSlooP6W0ajKlDuNMqgmT3w/dNEXOtrPCu6qkcueFXfs f9Ii/XAj5a4P1fNZPIHd0pL5uMur+B3imbAqu1/GVN0pTOi1zFporlpiChowQTcPlJ+I ysG9MwPr832fjSmh4Qo2TV5owvWaYbB21tIGXQRfAmiNWNHfq0vePMgc7tFjgUEPqgsJ Ane+aaDd1GZkvWT8A87cj6pnkNJTaulY7yDXMIYisdrp+5Ur7p5IHCOGtK84+7yLfF86 RHiHiUCC73BoGpaso4EZUaHXOgJFoErvyJ9lP8u6iPKDhgnVlEweyhAZiE4beMF64375 2oXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pjjviKAxMWKcEuuLQJoo7ikBZpRXy53qslO/fzhKHaA=; b=tuquXBuQ7uRW18CNxY3IzbXixJ+5bvdiwQ6n5xxQd9CAooHX6BwgylsXFatkDONvT1 1FrrDT0mWAuFnBa7hsH+NDObaO9GgL59tkZkUQVvjtSFsodnJMRrvgmYTtrAp0kFqBdE JqQ2jhZAL1tChi2HrmdN7vTF21DMepn0pUR9ewc+6lG4+CbG19LALFnqcboM/LS8s3B2 BzcO6j/OIS6zDKlgmqin3udlVpClo+G/+kChKKVsFJlDf0vR5AwlqmhjBi4A53EO6Yg5 S/dj1HemCpx4HC70LXo3NSbm68pAp7cyUQ7qWcXwnlQbXugSlioVsZ0X/Hco/ol/in6s jpGg== X-Gm-Message-State: AJIora/QzkhhyHHRhZWltEBJhUPuO5snnz/8YZ0SRgnmYQd7HM8tqgQ4 1xzdZCZ2bjPA6rBAp1wI1Vo= X-Google-Smtp-Source: AGRyM1seCzeINhr9uRv1a7ySsJqo7WjngwlZMYwTJFpssi85iyNG9CdlesA8YvqWYXNam6Mrg3ujOw== X-Received: by 2002:a17:90b:4a4d:b0:1ef:bc34:405a with SMTP id lb13-20020a17090b4a4d00b001efbc34405amr35320947pjb.96.1658203571864; Mon, 18 Jul 2022 21:06:11 -0700 (PDT) Received: from 7YHHR73.igp.broadcom.net (ip72-194-116-95.oc.oc.cox.net. [72.194.116.95]) by smtp.gmail.com with ESMTPSA id g5-20020a170902d1c500b0016bd72887fcsm10281807plb.59.2022.07.18.21.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 21:06:11 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Kamal Dasu , Broadcom internal kernel review list , linux-i2c@vger.kernel.org (open list:BROADCOM BRCMSTB I2C DRIVER), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE) Subject: [PATCH] i2c: brcmstb: Use dev_name() for adapter name Date: Mon, 18 Jul 2022 21:06:10 -0700 Message-Id: <20220719040611.13979-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220718_210614_987569_BD61D294 X-CRM114-Status: GOOD ( 12.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-brcmstb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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;