diff mbox series

platform/x86/amd/pmc: Fix build error with randconfig

Message ID 20230826161213.3180194-1-Shyam-sundar.S-k@amd.com (mailing list archive)
State Accepted, archived
Headers show
Series platform/x86/amd/pmc: Fix build error with randconfig | expand

Commit Message

Shyam Sundar S K Aug. 26, 2023, 4:12 p.m. UTC
on x86_64:

CONFIG_SUSPEND is not set
CONFIG_PM is not set

this leads to build failure of the AMD PMC driver. Add a 'depends on'
in the Kconfig.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/lkml/5181685c-29d8-22a4-a2d7-682f26e2e031@infradead.org/
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---

based on 'linux-next'

 drivers/platform/x86/amd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Randy Dunlap Aug. 27, 2023, 4:35 p.m. UTC | #1
On 8/26/23 09:12, Shyam Sundar S K wrote:
> on x86_64:
> 
> CONFIG_SUSPEND is not set
> CONFIG_PM is not set
> 
> this leads to build failure of the AMD PMC driver. Add a 'depends on'
> in the Kconfig.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Closes: https://lore.kernel.org/lkml/5181685c-29d8-22a4-a2d7-682f26e2e031@infradead.org/
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> 
> based on 'linux-next'
> 
>  drivers/platform/x86/amd/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/amd/Kconfig b/drivers/platform/x86/amd/Kconfig
> index d9685aef0887..383ae4c1df00 100644
> --- a/drivers/platform/x86/amd/Kconfig
> +++ b/drivers/platform/x86/amd/Kconfig
> @@ -8,6 +8,7 @@ source "drivers/platform/x86/amd/pmf/Kconfig"
>  config AMD_PMC
>  	tristate "AMD SoC PMC driver"
>  	depends on ACPI && PCI && RTC_CLASS && AMD_NB
> +	depends on X86 && SUSPEND
>  	select SERIO
>  	help
>  	  The driver provides support for AMD Power Management Controller
Hans de Goede Aug. 28, 2023, 8:47 a.m. UTC | #2
Hi,

On 8/26/23 18:12, Shyam Sundar S K wrote:
> on x86_64:
> 
> CONFIG_SUSPEND is not set
> CONFIG_PM is not set
> 
> this leads to build failure of the AMD PMC driver. Add a 'depends on'
> in the Kconfig.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Closes: https://lore.kernel.org/lkml/5181685c-29d8-22a4-a2d7-682f26e2e031@infradead.org/
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

Note everything under drivers/platform/x86/ (1) already is only build if CONFIG_X86 is set,
so there is no need for the depends on X86 part of this patch. I've dropped this while
merging the fix.

1) with the exception of the p2sb code

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
> 
> based on 'linux-next'
> 
>  drivers/platform/x86/amd/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/amd/Kconfig b/drivers/platform/x86/amd/Kconfig
> index d9685aef0887..383ae4c1df00 100644
> --- a/drivers/platform/x86/amd/Kconfig
> +++ b/drivers/platform/x86/amd/Kconfig
> @@ -8,6 +8,7 @@ source "drivers/platform/x86/amd/pmf/Kconfig"
>  config AMD_PMC
>  	tristate "AMD SoC PMC driver"
>  	depends on ACPI && PCI && RTC_CLASS && AMD_NB
> +	depends on X86 && SUSPEND
>  	select SERIO
>  	help
>  	  The driver provides support for AMD Power Management Controller
diff mbox series

Patch

diff --git a/drivers/platform/x86/amd/Kconfig b/drivers/platform/x86/amd/Kconfig
index d9685aef0887..383ae4c1df00 100644
--- a/drivers/platform/x86/amd/Kconfig
+++ b/drivers/platform/x86/amd/Kconfig
@@ -8,6 +8,7 @@  source "drivers/platform/x86/amd/pmf/Kconfig"
 config AMD_PMC
 	tristate "AMD SoC PMC driver"
 	depends on ACPI && PCI && RTC_CLASS && AMD_NB
+	depends on X86 && SUSPEND
 	select SERIO
 	help
 	  The driver provides support for AMD Power Management Controller