From: Pratap Nirujogi <pratap.nirujogi@amd.com>
To: <andi.shyti@kernel.org>, <rdunlap@infradead.org>,
<hdegoede@redhat.com>, <ilpo.jarvinen@linux.intel.com>,
<mario.limonciello@amd.com>, <sfr@canb.auug.org.au>,
<linux-next@vger.kernel.org>
Cc: <linux-i2c@vger.kernel.org>,
<platform-driver-x86@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <benjamin.chan@amd.com>,
<bin.du@amd.com>, <gjorgji.rosikopulos@amd.com>,
<king.li@amd.com>, <dantony@amd.com>,
"Pratap Nirujogi" <pratap.nirujogi@amd.com>
Subject: [PATCH v2 1/3] i2c: designware: Initialize adapter name only when not set
Date: Tue, 3 Jun 2025 17:40:11 -0400 [thread overview]
Message-ID: <20250603214611.3039787-2-pratap.nirujogi@amd.com> (raw)
In-Reply-To: <20250603214611.3039787-1-pratap.nirujogi@amd.com>
Check if the adapter name is already set in the driver prior
to initializing with generic name in i2c_dw_probe_master().
Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
---
drivers/i2c/busses/i2c-designware-master.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index c5394229b77f..9d7d9e47564a 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -1042,8 +1042,9 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev)
if (ret)
return ret;
- snprintf(adap->name, sizeof(adap->name),
- "Synopsys DesignWare I2C adapter");
+ if (!adap->name[0])
+ scnprintf(adap->name, sizeof(adap->name),
+ "Synopsys DesignWare I2C adapter");
adap->retries = 3;
adap->algo = &i2c_dw_algo;
adap->quirks = &i2c_dw_quirks;
--
2.43.0
next prev parent reply other threads:[~2025-06-03 21:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 21:40 [PATCH v2 0/3] Fix build issue when CONFIG_MODULES is not set Pratap Nirujogi
2025-06-03 21:40 ` Pratap Nirujogi [this message]
2025-06-03 22:50 ` [PATCH v2 1/3] i2c: designware: Initialize adapter name only when " Randy Dunlap
2025-06-04 2:25 ` Nirujogi, Pratap
2025-06-03 21:40 ` [PATCH v2 2/3] i2c: amd-isp: Initialize unique adpater name Pratap Nirujogi
2025-06-03 22:48 ` Randy Dunlap
2025-06-04 2:25 ` Nirujogi, Pratap
2025-06-03 21:40 ` [PATCH v2 3/3] platform/x86: Use i2c adapter name to fix build errors Pratap Nirujogi
2025-06-03 22:49 ` Randy Dunlap
2025-06-04 2:26 ` Nirujogi, Pratap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250603214611.3039787-2-pratap.nirujogi@amd.com \
--to=pratap.nirujogi@amd.com \
--cc=andi.shyti@kernel.org \
--cc=benjamin.chan@amd.com \
--cc=bin.du@amd.com \
--cc=dantony@amd.com \
--cc=gjorgji.rosikopulos@amd.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=king.li@amd.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox