lkml.org 
[lkml]   [2017]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] extcon: make extcon_info static const, fixes warning
Date
From: Colin Ian King <colin.king@canonical.com>

The array extcon_info is read only, local to the source and does not
need to be in global scope, so make it static const.

Cleans up sparse warning:
symbol 'extcon_info' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/extcon/extcon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 35e9fb885486..cb38c2747684 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -36,7 +36,7 @@

#define SUPPORTED_CABLE_MAX 32

-struct __extcon_info {
+static const struct __extcon_info {
unsigned int type;
unsigned int id;
const char *name;
--
2.14.1
\
 
 \ /
  Last update: 2017-09-09 18:51    [W:0.073 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site