diff options
Diffstat (limited to 'drivers/platform/surface')
-rw-r--r-- | drivers/platform/surface/aggregator/Makefile | 15 | ||||
-rw-r--r-- | drivers/platform/surface/surface3_power.c | 8 |
2 files changed, 7 insertions, 16 deletions
diff --git a/drivers/platform/surface/aggregator/Makefile b/drivers/platform/surface/aggregator/Makefile index c8498c41e758..c0d550eda5cd 100644 --- a/drivers/platform/surface/aggregator/Makefile +++ b/drivers/platform/surface/aggregator/Makefile @@ -6,12 +6,9 @@ CFLAGS_core.o = -I$(src) obj-$(CONFIG_SURFACE_AGGREGATOR) += surface_aggregator.o -surface_aggregator-objs := core.o -surface_aggregator-objs += ssh_parser.o -surface_aggregator-objs += ssh_packet_layer.o -surface_aggregator-objs += ssh_request_layer.o -surface_aggregator-objs += controller.o - -ifeq ($(CONFIG_SURFACE_AGGREGATOR_BUS),y) -surface_aggregator-objs += bus.o -endif +surface_aggregator-y := core.o +surface_aggregator-y += ssh_parser.o +surface_aggregator-y += ssh_packet_layer.o +surface_aggregator-y += ssh_request_layer.o +surface_aggregator-$(CONFIG_SURFACE_AGGREGATOR_BUS) += bus.o +surface_aggregator-y += controller.o diff --git a/drivers/platform/surface/surface3_power.c b/drivers/platform/surface/surface3_power.c index dea82aa1abd4..90c1568ea4e0 100644 --- a/drivers/platform/surface/surface3_power.c +++ b/drivers/platform/surface/surface3_power.c @@ -384,13 +384,7 @@ mshw0011_space_handler(u32 function, acpi_physical_address command, if (ACPI_FAILURE(ret)) return ret; - if (!value64 || ares->type != ACPI_RESOURCE_TYPE_SERIAL_BUS) { - ret = AE_BAD_PARAMETER; - goto err; - } - - sb = &ares->data.i2c_serial_bus; - if (sb->type != ACPI_RESOURCE_SERIAL_TYPE_I2C) { + if (!value64 || !i2c_acpi_get_i2c_resource(ares, &sb)) { ret = AE_BAD_PARAMETER; goto err; } |