Skip to contentSkip to conversation

platform/x86/amd_isp4: prevent built-in configuration

PATCH In review Arnd Bergmann 3 participants 3 messages Jun 20, 2025 – Jun 26, 2025 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86/amd_isp4: prevent built-in configuration

From: Arnd Bergmann <[email protected]>

Checking the module owner of the device only works when modules are enabled, and the device is created from a module:

drivers/platform/x86/amd/amd_isp4.c:154:28: error: incomplete definition of type 'struct module'

Building the driver as a loadable module avoids the build failure, though this should probably be fixed in a different way that still works if the device was created from built-in code.

Fixes 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10")
---
 drivers/platform/x86/amd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/amd/Kconfig +1 -0
index 63e4bd985699..9e150500e37e 100644
@@ -36,6 +36,7 @@ config AMD_WBRF
 config AMD_ISP_PLATFORM
 	tristate "AMD ISP4 platform driver"
 	depends on I2C && X86_64 && ACPI
+	depends on m
 	help
 	  Platform driver for AMD platforms containing image signal processor
 	  gen 4. Provides camera sensor module board information to allow
Signature · 1 line
2.39.5
Reviewed-by Pratap Nirujogi on v1 1/1
#1 lore raw

Hi Arnd,

Thanks for the patch.

Quoted 27 lines · Arnd Bergmann

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

From: Arnd Bergmann <[email protected]>

Checking the module owner of the device only works when modules are enabled, and the device is created from a module:

drivers/platform/x86/amd/amd_isp4.c:154:28: error: incomplete definition of type 'struct module'

Building the driver as a loadable module avoids the build failure, though this should probably be fixed in a different way that still works if the device was created from built-in code.

Fixes 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10")
---
  drivers/platform/x86/amd/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/platform/x86/amd/Kconfig +0 -0
index 63e4bd985699..9e150500e37e 100644

drivers/platform/x86/amd/Kconfig config AMD_WBRF · line 39

Quoted 4 lines
drivers/platform/x86/amd/Kconfig +1 -0
@@ -36,6 +36,7 @@ config AMD_WBRF
  config AMD_ISP_PLATFORM
         tristate "AMD ISP4 platform driver"
         depends on I2C && X86_64 && ACPI
+       depends on m

This issue is reported earlier and the fix has been submitted to replace adap->owner->name with adap->name to remove the dependency on CONFIG_MODULES. But until the fix is accepted and is available on either i2c or pdx86 tree, I think its good to have this fix to avoid the build errors.

https://lore.kernel.org/all/[email protected]/

Thanks,
Pratap

Quoted 6 lines
drivers/platform/x86/amd/Kconfig +0 -1
         help
           Platform driver for AMD platforms containing image signal processor
           gen 4. Provides camera sensor module board information to allow
--

2.39.5

maintainer
#2 lore raw
In reply to Arnd Bergmann
Quoted 25 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Checking the module owner of the device only works when modules are enabled, and the device is created from a module:

drivers/platform/x86/amd/amd_isp4.c:154:28: error: incomplete definition of type 'struct module'

Building the driver as a loadable module avoids the build failure, though this should probably be fixed in a different way that still works if the device was created from built-in code.

Fixes 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10")
---
 drivers/platform/x86/amd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/amd/Kconfig +0 -0
index 63e4bd985699..9e150500e37e 100644

drivers/platform/x86/amd/Kconfig config AMD_WBRF · line 42

Quoted 7 lines
drivers/platform/x86/amd/Kconfig +1 -0
@@ -36,6 +36,7 @@ config AMD_WBRF
 config AMD_ISP_PLATFORM
 	tristate "AMD ISP4 platform driver"
 	depends on I2C && X86_64 && ACPI
+	depends on m
 	help
 	  Platform driver for AMD platforms containing image signal processor
 	  gen 4. Provides camera sensor module board information to allow

The fix series should finally be on its way to Linus through i2c tree. I'm sorry for the unexpected delay in getting the real fix applied.

Signature · 1 line
 i.