* [PATCH] HID: rmi: Protect PM-only functions by #ifdef CONFIG_PM
@ 2014-06-11 19:03 Geert Uytterhoeven
2014-06-12 8:29 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2014-06-11 19:03 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input, linux-kernel, Geert Uytterhoeven
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
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: rmi: Protect PM-only functions by #ifdef CONFIG_PM
2014-06-11 19:03 [PATCH] HID: rmi: Protect PM-only functions by #ifdef CONFIG_PM Geert Uytterhoeven
@ 2014-06-12 8:29 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2014-06-12 8:29 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-input, linux-kernel
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.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-12 8:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-11 19:03 [PATCH] HID: rmi: Protect PM-only functions by #ifdef CONFIG_PM Geert Uytterhoeven
2014-06-12 8:29 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).