Skip to content

Commit

Permalink
i2c / ACPI: Use 0 to indicate that device does not have interrupt ass…
Browse files Browse the repository at this point in the history
…igned

This is the convention used in most parts of the kernel including DT
counterpart of I2C slave enumeration. To make things consistent do the same
for ACPI I2C slave enumeration path as well.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
westeri authored and linusw committed May 13, 2015
1 parent 8864afa commit dab472e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static int acpi_i2c_add_resource(struct acpi_resource *ares, void *data)
if (sb->access_mode == ACPI_I2C_10BIT_MODE)
info->flags |= I2C_CLIENT_TEN;
}
} else if (info->irq < 0) {
} else if (!info->irq) {
struct resource r;

if (acpi_dev_resource_interrupt(ares, 0, &r))
Expand All @@ -134,7 +134,6 @@ static acpi_status acpi_i2c_add_device(acpi_handle handle, u32 level,

memset(&info, 0, sizeof(info));
info.fwnode = acpi_fwnode_handle(adev);
info.irq = -1;

INIT_LIST_HEAD(&resource_list);
ret = acpi_dev_get_resources(adev, &resource_list,
Expand Down

0 comments on commit dab472e

Please sign in to comment.