summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/xrs700x/xrs700x_i2c.c
diff options
context:
space:
mode:
authorGeorge McCollister <george.mccollister@gmail.com>2021-02-09 15:12:55 -0600
committerDavid S. Miller <davem@davemloft.net>2021-02-11 13:17:04 -0800
commit3e0103a35a46b5f3dc7e3fe0f09eb2fc5e0456e6 (patch)
treebabbee481ac299f864c2d355e94f5a5896c673e7 /drivers/net/dsa/xrs700x/xrs700x_i2c.c
parent3a926b0e9c589172fb7fd6faf2c8fc8a6380d113 (diff)
net: dsa: xrs700x: fix unused warning for of_device_id
Fix unused variable warning that occurs when CONFIG_OF isn't defined by adding __maybe_unused. >> drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids' [-Wunused-const-variable] static const struct of_device_id xrs700x_i2c_dt_ids[] = { Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: George McCollister <george.mccollister@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/xrs700x/xrs700x_i2c.c')
-rw-r--r--drivers/net/dsa/xrs700x/xrs700x_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/xrs700x/xrs700x_i2c.c b/drivers/net/dsa/xrs700x/xrs700x_i2c.c
index 16a46a78a037..489d9385b4f0 100644
--- a/drivers/net/dsa/xrs700x/xrs700x_i2c.c
+++ b/drivers/net/dsa/xrs700x/xrs700x_i2c.c
@@ -121,7 +121,7 @@ static const struct i2c_device_id xrs700x_i2c_id[] = {
MODULE_DEVICE_TABLE(i2c, xrs700x_i2c_id);
-static const struct of_device_id xrs700x_i2c_dt_ids[] = {
+static const struct of_device_id __maybe_unused xrs700x_i2c_dt_ids[] = {
{ .compatible = "arrow,xrs7003e", .data = &xrs7003e_info },
{ .compatible = "arrow,xrs7003f", .data = &xrs7003f_info },
{ .compatible = "arrow,xrs7004e", .data = &xrs7004e_info },