Skip to content

Commit

Permalink
ipmi: make ipmi_usr_hndl const
Browse files Browse the repository at this point in the history
It's only function pointers.

Signed-off-by: Corey Minyard <[email protected]>
  • Loading branch information
cminyard committed Jan 5, 2017
1 parent 08f6cd0 commit 210af2a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_devintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static int ipmi_fasync(int fd, struct file *file, int on)
return (result);
}

static struct ipmi_user_hndl ipmi_hndlrs =
static const struct ipmi_user_hndl ipmi_hndlrs =
{
.ipmi_recv_hndl = file_receive_handler,
};
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct ipmi_user {
struct kref refcount;

/* The upper layer that handles receive messages. */
struct ipmi_user_hndl *handler;
const struct ipmi_user_hndl *handler;
void *handler_data;

/* The interface this user is bound to. */
Expand Down Expand Up @@ -919,7 +919,7 @@ static int intf_err_seq(ipmi_smi_t intf,


int ipmi_create_user(unsigned int if_num,
struct ipmi_user_hndl *handler,
const struct ipmi_user_hndl *handler,
void *handler_data,
ipmi_user_t *user)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ static void ipmi_wdog_pretimeout_handler(void *handler_data)
pretimeout_since_last_heartbeat = 1;
}

static struct ipmi_user_hndl ipmi_hndlrs = {
static const struct ipmi_user_hndl ipmi_hndlrs = {
.ipmi_recv_hndl = ipmi_wdog_msg_handler,
.ipmi_watchdog_pretimeout = ipmi_wdog_pretimeout_handler
};
Expand Down
2 changes: 1 addition & 1 deletion include/linux/ipmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ struct ipmi_user_hndl {

/* Create a new user of the IPMI layer on the given interface number. */
int ipmi_create_user(unsigned int if_num,
struct ipmi_user_hndl *handler,
const struct ipmi_user_hndl *handler,
void *handler_data,
ipmi_user_t *user);

Expand Down

0 comments on commit 210af2a

Please sign in to comment.