Re: [PATCH v5 2/5] ACPI / OSL: Stub out acpi_os_read_pci_configuration when CONFIG_PCI is unset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 12, 2018 at 6:29 AM Sinan Kaya <okaya@xxxxxxxxxx> wrote:
>
> Getting ready to allow PCI to be disabled with ACPI enabled. Stub out
> acpi_os_read_pci_configuration function that depend on PCI.
>
> Signed-off-by: Sinan Kaya <okaya@xxxxxxxxxx>
> ---
>  drivers/acpi/osl.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index b48874b8e1ea..3e82b50ba811 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -773,6 +773,7 @@ acpi_status
>  acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
>                                u64 *value, u32 width)
>  {
> +#ifdef CONFIG_PCI
>         int result, size;
>         u32 value32;
>
> @@ -799,6 +800,9 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
>         *value = value32;
>
>         return (result ? AE_ERROR : AE_OK);
> +#else
> +       return pr_warn_once("CONFIG_PCI is disabled\n") ? AE_SUPPORT : AE_OK;

What about saying "PCI configuration space access is not supported" instead?

> +#endif
>  }
>
>  acpi_status
> --



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux