Skip to content

Commit

Permalink
iio: proximity: isl29501: make use of of_device_id table
Browse files Browse the repository at this point in the history
Reference the of_device_id table in the driver structure, so it will be
used for module autoloading and device matching.  This fixes clang W=1
warning:

  isl29501.c:999:34: error: unused variable 'isl29501_i2c_matches' [-Werror,-Wunused-const-variable]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240225201654.49450-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Krzysztof Kozlowski authored and Jonathan Cameron committed Feb 28, 2024
1 parent cc8a587 commit 051db7e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/iio/proximity/isl29501.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,17 +995,16 @@ static const struct i2c_device_id isl29501_id[] = {

MODULE_DEVICE_TABLE(i2c, isl29501_id);

#if defined(CONFIG_OF)
static const struct of_device_id isl29501_i2c_matches[] = {
{ .compatible = "renesas,isl29501" },
{ }
};
MODULE_DEVICE_TABLE(of, isl29501_i2c_matches);
#endif

static struct i2c_driver isl29501_driver = {
.driver = {
.name = "isl29501",
.of_match_table = isl29501_i2c_matches,
},
.id_table = isl29501_id,
.probe = isl29501_probe,
Expand Down

0 comments on commit 051db7e

Please sign in to comment.