MLK-22296-4 misc: mpl3115: Fix build warning when CONFIG_PM_SLEEP=n
authorClark Wang <xiaoning.wang@nxp.com>
Tue, 23 Jul 2019 06:42:49 +0000 (14:42 +0800)
committerClark Wang <xiaoning.wang@nxp.com>
Tue, 23 Jul 2019 07:20:13 +0000 (15:20 +0800)
Fix build warning when CONFIG_PM_SLEEP=n, the warning message is:
drivers/input/misc/mpl3115.c:290:12: warning: ‘mpl3115_start_chip’ defined but not used [-Wunused-function]
 static int mpl3115_start_chip(struct i2c_client *client)
            ^~~~~~~~~~~~~~~~~~

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
drivers/input/misc/mpl3115.c

index 4bd5420..212eccc 100644 (file)
@@ -287,6 +287,8 @@ static int mpl3115_stop_chip(struct i2c_client *client)
 
        return 0;
 }
+
+#ifdef CONFIG_PM_SLEEP
 static int mpl3115_start_chip(struct i2c_client *client)
 {
        u8 val;
@@ -298,6 +300,8 @@ static int mpl3115_start_chip(struct i2c_client *client)
 
        return 0;
 }
+#endif
+
 static int mpl3115_remove(struct i2c_client *client)
 {
        struct mpl3115_data *pdata = i2c_get_clientdata(client);