diff options
author | Corey Minyard <cminyard@mvista.com> | 2017-01-05 11:52:10 -0500 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2017-01-05 16:01:55 -0500 |
commit | 210af2a5f12403a8968d6014742886cc7e9823b4 (patch) | |
tree | 843d7f4e238f62dcc80b5b7311557a38cab78e72 | |
parent | 08f6cd01fe77712fda512472346647021a8a3c25 (diff) |
ipmi: make ipmi_usr_hndl const
It's only function pointers.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
-rw-r--r-- | drivers/char/ipmi/ipmi_devintf.c | 2 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 4 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_watchdog.c | 2 | ||||
-rw-r--r-- | include/linux/ipmi.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index a21407de46ae..f45119c5337d 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c | |||
@@ -108,7 +108,7 @@ static int ipmi_fasync(int fd, struct file *file, int on) | |||
108 | return (result); | 108 | return (result); |
109 | } | 109 | } |
110 | 110 | ||
111 | static struct ipmi_user_hndl ipmi_hndlrs = | 111 | static const struct ipmi_user_hndl ipmi_hndlrs = |
112 | { | 112 | { |
113 | .ipmi_recv_hndl = file_receive_handler, | 113 | .ipmi_recv_hndl = file_receive_handler, |
114 | }; | 114 | }; |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 92e53acf2cd2..9f699951b75a 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -102,7 +102,7 @@ struct ipmi_user { | |||
102 | struct kref refcount; | 102 | struct kref refcount; |
103 | 103 | ||
104 | /* The upper layer that handles receive messages. */ | 104 | /* The upper layer that handles receive messages. */ |
105 | struct ipmi_user_hndl *handler; | 105 | const struct ipmi_user_hndl *handler; |
106 | void *handler_data; | 106 | void *handler_data; |
107 | 107 | ||
108 | /* The interface this user is bound to. */ | 108 | /* The interface this user is bound to. */ |
@@ -919,7 +919,7 @@ static int intf_err_seq(ipmi_smi_t intf, | |||
919 | 919 | ||
920 | 920 | ||
921 | int ipmi_create_user(unsigned int if_num, | 921 | int ipmi_create_user(unsigned int if_num, |
922 | struct ipmi_user_hndl *handler, | 922 | const struct ipmi_user_hndl *handler, |
923 | void *handler_data, | 923 | void *handler_data, |
924 | ipmi_user_t *user) | 924 | ipmi_user_t *user) |
925 | { | 925 | { |
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 4035495f3a86..30b9e83bf1bf 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c | |||
@@ -985,7 +985,7 @@ static void ipmi_wdog_pretimeout_handler(void *handler_data) | |||
985 | pretimeout_since_last_heartbeat = 1; | 985 | pretimeout_since_last_heartbeat = 1; |
986 | } | 986 | } |
987 | 987 | ||
988 | static struct ipmi_user_hndl ipmi_hndlrs = { | 988 | static const struct ipmi_user_hndl ipmi_hndlrs = { |
989 | .ipmi_recv_hndl = ipmi_wdog_msg_handler, | 989 | .ipmi_recv_hndl = ipmi_wdog_msg_handler, |
990 | .ipmi_watchdog_pretimeout = ipmi_wdog_pretimeout_handler | 990 | .ipmi_watchdog_pretimeout = ipmi_wdog_pretimeout_handler |
991 | }; | 991 | }; |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 78c5d5ae3857..f1045b2c6a00 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -100,7 +100,7 @@ struct ipmi_user_hndl { | |||
100 | 100 | ||
101 | /* Create a new user of the IPMI layer on the given interface number. */ | 101 | /* Create a new user of the IPMI layer on the given interface number. */ |
102 | int ipmi_create_user(unsigned int if_num, | 102 | int ipmi_create_user(unsigned int if_num, |
103 | struct ipmi_user_hndl *handler, | 103 | const struct ipmi_user_hndl *handler, |
104 | void *handler_data, | 104 | void *handler_data, |
105 | ipmi_user_t *user); | 105 | ipmi_user_t *user); |
106 | 106 | ||