Skip to content

build failure on armhf and ppc64el #213

Description

@arighi

I'm getting the following build error on armhf and ppc64 with linux 5.15:

 CC [M]  /var/lib/dkms/bbswitch/0.8/build/bbswitch.o
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c: In function ‘bbswitch_off’:
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:271:13: error: implicit declaration of function ‘acpi_bus_get_device’; did you mean ‘acpi_get_gpe_device’? [-Werror=implicit-function-declaration]
  271 |         r = acpi_bus_get_device(dis_handle, &ad);
      |             ^~~~~~~~~~~~~~~~~~~
      |             acpi_get_gpe_device
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:276:15: error: invalid use of undefined type ‘struct acpi_device’
  276 |         if (ad->power.state == ACPI_STATE_UNKNOWN) {
      |               ^~
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:278:15: error: invalid use of undefined type ‘struct acpi_device’
  278 |             ad->power.state = ACPI_STATE_D0;
      |               ^~

This is because in bbswitch_off() we use acpi_bus_get_device() to determine the power state, but this feature is only available on x86 and arm64. We should probably ifdef that chunk of code and use it only on x86 and arm64.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions