linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: axp20x-pek - make device attributes static
@ 2019-12-17 15:25 Ben Dooks (Codethink)
  2019-12-18  3:00 ` Chen-Yu Tsai
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks (Codethink) @ 2019-12-17 15:25 UTC (permalink / raw)
  To: ben.dooks; +Cc: Dmitry Torokhov, Chen-Yu Tsai, linux-input, linux-kernel

The two device attrbitues are not declared outside this file
so make them static to avoid the following warnings:

drivers/input/misc/axp20x-pek.c:194:1: warning: symbol 'dev_attr_startup' was not declared. Should it be static?
drivers/input/misc/axp20x-pek.c:195:1: warning: symbol 'dev_attr_shutdown' was not declared. Should it be static?

Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
---
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/input/misc/axp20x-pek.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c
index 17c1cca74498..4454f1e5a0d3 100644
--- a/drivers/input/misc/axp20x-pek.c
+++ b/drivers/input/misc/axp20x-pek.c
@@ -191,9 +191,10 @@ static ssize_t axp20x_store_attr_shutdown(struct device *dev,
 				 axp20x_pek->info->shutdown_mask, buf, count);
 }
 
-DEVICE_ATTR(startup, 0644, axp20x_show_attr_startup, axp20x_store_attr_startup);
-DEVICE_ATTR(shutdown, 0644, axp20x_show_attr_shutdown,
-	    axp20x_store_attr_shutdown);
+static DEVICE_ATTR(startup, 0644, axp20x_show_attr_startup,
+		   axp20x_store_attr_startup);
+static DEVICE_ATTR(shutdown, 0644, axp20x_show_attr_shutdown,
+		   axp20x_store_attr_shutdown);
 
 static struct attribute *axp20x_attrs[] = {
 	&dev_attr_startup.attr,
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: axp20x-pek - make device attributes static
  2019-12-17 15:25 [PATCH] Input: axp20x-pek - make device attributes static Ben Dooks (Codethink)
@ 2019-12-18  3:00 ` Chen-Yu Tsai
  0 siblings, 0 replies; 2+ messages in thread
From: Chen-Yu Tsai @ 2019-12-18  3:00 UTC (permalink / raw)
  To: Ben Dooks (Codethink); +Cc: Dmitry Torokhov, linux-input, linux-kernel

On Tue, Dec 17, 2019 at 11:25 PM Ben Dooks (Codethink)
<ben.dooks@codethink.co.uk> wrote:
>
> The two device attrbitues are not declared outside this file
> so make them static to avoid the following warnings:
>
> drivers/input/misc/axp20x-pek.c:194:1: warning: symbol 'dev_attr_startup' was not declared. Should it be static?
> drivers/input/misc/axp20x-pek.c:195:1: warning: symbol 'dev_attr_shutdown' was not declared. Should it be static?
>
> Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
> ---
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: linux-input@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org

Acked-by: Chen-Yu Tsai <wens@csie.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-18  3:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 15:25 [PATCH] Input: axp20x-pek - make device attributes static Ben Dooks (Codethink)
2019-12-18  3:00 ` Chen-Yu Tsai

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).