platform/surface: aggregator: Allow is_ssam_device() to be used when CONFIG_SURFACE_A...
authorMaximilian Luz <luzmaximilian@gmail.com>
Fri, 27 May 2022 02:34:36 +0000 (04:34 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 13 Jun 2022 15:25:07 +0000 (17:25 +0200)
commit0eb6584068642767baab17c2e4385a6b9c029caa
tree58cecb639eab2c92f7838041f7088cc8ccd1ee2a
parent50d88b1d1e7970ed900080bab4fe3f1477908d46
platform/surface: aggregator: Allow is_ssam_device() to be used when CONFIG_SURFACE_AGGREGATOR_BUS is disabled

In SSAM subsystem drivers that handle both ACPI and SSAM-native client
devices, we may want to check whether we have a SSAM (native) client
device. Further, we may want to do this even when instantiation thereof
cannot happen due to CONFIG_SURFACE_AGGREGATOR_BUS=n. Currently, doing
so causes an error due to an undefined reference error due to
ssam_device_type being placed in the bus source unit.

Therefore, if CONFIG_SURFACE_AGGREGATOR_BUS is not defined, simply let
is_ssam_device() return false to prevent this error.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20220527023447.2460025-2-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
include/linux/surface_aggregator/device.h