public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix build issue when CONFIG_MODULES is not set
@ 2025-05-30 19:59 Pratap Nirujogi
  2025-05-30 19:59 ` [PATCH 1/3] i2c: designware: Initialize adapter name only when " Pratap Nirujogi
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Pratap Nirujogi @ 2025-05-30 19:59 UTC (permalink / raw)
  To: rdunlap, hdegoede, ilpo.jarvinen, sfr, linux-next
  Cc: platform-driver-x86, linux-kernel, benjamin.chan, bin.du,
	gjorgji.rosikopulos, king.li, dantony, Pratap Nirujogi

When CONFIG_MODULES is not defined, 'adap->owner->name' used in amd_isp4 platform
driver will not be valid and is resulting in build failures.

../drivers/platform/x86/amd/amd_isp4.c: In function 'is_isp_i2c_adapter':
../drivers/platform/x86/amd/amd_isp4.c:154:35: error: invalid use of undefined type 'struct module'
  154 |         return !strcmp(adap->owner->name, "i2c_designware_amdisp");
      |                                   ^~

To fix this issue, I need to make changes both in platform and i2c driver modules.

* In the amd_isp4 x86/platform driver, replace 'adap->owner->name' with 'adap->name', this removes
the hard dependency on 'struct module'.
* In i2c amdisp driver, initialize unique name to i2c adapter and also make a change in
i2c-designware-common to avoid overwriting with generic name when adap->name[] is already set.

Thanks,
Pratap

Pratap Nirujogi (3):
  i2c: designware: Initialize adapter name only when not set
  i2c: amd-isp: Initialize unique adpater name
  platform/x86: Use i2c adapter name to fix build errors

 drivers/i2c/busses/i2c-designware-amdisp.c | 2 ++
 drivers/i2c/busses/i2c-designware-master.c | 5 +++--
 drivers/platform/x86/amd/amd_isp4.c        | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-06-03 15:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-30 19:59 [PATCH 0/3] Fix build issue when CONFIG_MODULES is not set Pratap Nirujogi
2025-05-30 19:59 ` [PATCH 1/3] i2c: designware: Initialize adapter name only when " Pratap Nirujogi
2025-05-31  5:14   ` Ilpo Järvinen
2025-06-03  3:18     ` Nirujogi, Pratap
2025-05-30 19:59 ` [PATCH 2/3] i2c: amd-isp: Initialize unique adpater name Pratap Nirujogi
2025-05-31  5:06   ` Ilpo Järvinen
2025-06-03  3:15     ` Nirujogi, Pratap
2025-05-30 19:59 ` [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors Pratap Nirujogi
2025-05-31  5:11   ` Ilpo Järvinen
2025-06-03  3:35     ` Nirujogi, Pratap
2025-06-03  4:46       ` Mario Limonciello
2025-06-03 15:50         ` Nirujogi, Pratap
2025-06-03  7:15       ` Ilpo Järvinen
2025-06-03 15:50         ` Nirujogi, Pratap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox