diff mbox

HID: rmi: Protect PM-only functions by #ifdef CONFIG_PM

Message ID 1402513398-17546-1-git-send-email-geert@linux-m68k.org (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Geert Uytterhoeven June 11, 2014, 7:03 p.m. UTC
If CONFIG_PM=n:

drivers/hid/hid-rmi.c:432: warning: ‘rmi_post_reset’ defined but not used
drivers/hid/hid-rmi.c:437: warning: ‘rmi_post_resume’ defined but not used

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/hid/hid-rmi.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jiri Kosina June 12, 2014, 8:29 a.m. UTC | #1
On Wed, 11 Jun 2014, Geert Uytterhoeven wrote:

> If CONFIG_PM=n:
> 
> drivers/hid/hid-rmi.c:432: warning: ‘rmi_post_reset’ defined but not used
> drivers/hid/hid-rmi.c:437: warning: ‘rmi_post_resume’ defined but not used
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  drivers/hid/hid-rmi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
> index 2451c7e5febd..578bbe65902b 100644
> --- a/drivers/hid/hid-rmi.c
> +++ b/drivers/hid/hid-rmi.c
> @@ -428,6 +428,7 @@ static int rmi_raw_event(struct hid_device *hdev,
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PM
>  static int rmi_post_reset(struct hid_device *hdev)
>  {
>  	return rmi_set_mode(hdev, RMI_MODE_ATTN_REPORTS);
> @@ -437,6 +438,7 @@ static int rmi_post_resume(struct hid_device *hdev)
>  {
>  	return rmi_set_mode(hdev, RMI_MODE_ATTN_REPORTS);
>  }
> +#endif /* CONFIG_PM */
>  
>  #define RMI4_MAX_PAGE 0xff
>  #define RMI4_PAGE_SIZE 0x0100

Applied, thanks for spotting it.
diff mbox

Patch

diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
index 2451c7e5febd..578bbe65902b 100644
--- a/drivers/hid/hid-rmi.c
+++ b/drivers/hid/hid-rmi.c
@@ -428,6 +428,7 @@  static int rmi_raw_event(struct hid_device *hdev,
 	return 0;
 }
 
+#ifdef CONFIG_PM
 static int rmi_post_reset(struct hid_device *hdev)
 {
 	return rmi_set_mode(hdev, RMI_MODE_ATTN_REPORTS);
@@ -437,6 +438,7 @@  static int rmi_post_resume(struct hid_device *hdev)
 {
 	return rmi_set_mode(hdev, RMI_MODE_ATTN_REPORTS);
 }
+#endif /* CONFIG_PM */
 
 #define RMI4_MAX_PAGE 0xff
 #define RMI4_PAGE_SIZE 0x0100