Skip to content

Commit

Permalink
iio: light: isl29018: Only declare ACPI table when ACPI is enabled
Browse files Browse the repository at this point in the history
This fixes the following warning when building with clang:

drivers/iio/light/isl29018.c:808:36: error: variable
    'isl29018_acpi_match' is not needed and will not be emitted
    [-Werror,-Wunneeded-internal-declaration]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Matthias Kaehlcke authored and Jonathan Cameron committed May 20, 2017
1 parent 138bc79 commit 14b39dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iio/light/isl29018.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,13 +807,15 @@ static SIMPLE_DEV_PM_OPS(isl29018_pm_ops, isl29018_suspend, isl29018_resume);
#define ISL29018_PM_OPS NULL
#endif

#ifdef CONFIG_ACPI
static const struct acpi_device_id isl29018_acpi_match[] = {
{"ISL29018", isl29018},
{"ISL29023", isl29023},
{"ISL29035", isl29035},
{},
};
MODULE_DEVICE_TABLE(acpi, isl29018_acpi_match);
#endif

static const struct i2c_device_id isl29018_id[] = {
{"isl29018", isl29018},
Expand Down

0 comments on commit 14b39dc

Please sign in to comment.