lkml.org 
[lkml]   [2022]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] hwmon: (nzxt-smart2) Fix build with CONFIG_PM=n
Date
drivers/hwmon/nzxt-smart2.c:707:12: error: 'nzxt_smart2_hid_reset_resume' defined but not used [-Werror=unused-function]
707 | static int nzxt_smart2_hid_reset_resume(struct hid_device *hdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Move it into #ifdef block to fix this.

Fixes: 0e43f31ee52f ("hwmon: add driver for NZXT RGB&Fan Controller/Smart Device v2.")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/hwmon/nzxt-smart2.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/hwmon/nzxt-smart2.c b/drivers/hwmon/nzxt-smart2.c
index 534d39b8908e..4963d630394a 100644
--- a/drivers/hwmon/nzxt-smart2.c
+++ b/drivers/hwmon/nzxt-smart2.c
@@ -704,6 +704,7 @@ static int nzxt_smart2_hid_raw_event(struct hid_device *hdev,
return 0;
}

+#ifdef CONFIG_PM
static int nzxt_smart2_hid_reset_resume(struct hid_device *hdev)
{
struct drvdata *drvdata = hid_get_drvdata(hdev);
@@ -720,6 +721,7 @@ static int nzxt_smart2_hid_reset_resume(struct hid_device *hdev)

return init_device(drvdata, drvdata->update_interval);
}
+#endif

static int nzxt_smart2_hid_probe(struct hid_device *hdev,
const struct hid_device_id *id)
--
2.17.1
\
 
 \ /
  Last update: 2022-01-04 14:55    [W:0.059 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site