diff options
Diffstat (limited to 'drivers/misc/ibmasm/ibmasm.h')
-rw-r--r-- | drivers/misc/ibmasm/ibmasm.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h index 653a7d096a8b..ecce4ffd3e23 100644 --- a/drivers/misc/ibmasm/ibmasm.h +++ b/drivers/misc/ibmasm/ibmasm.h | |||
@@ -95,12 +95,17 @@ struct command { | |||
95 | size_t buffer_size; | 95 | size_t buffer_size; |
96 | int status; | 96 | int status; |
97 | struct kobject kobj; | 97 | struct kobject kobj; |
98 | spinlock_t *lock; | ||
98 | }; | 99 | }; |
99 | #define to_command(c) container_of(c, struct command, kobj) | 100 | #define to_command(c) container_of(c, struct command, kobj) |
100 | 101 | ||
101 | static inline void command_put(struct command *cmd) | 102 | static inline void command_put(struct command *cmd) |
102 | { | 103 | { |
104 | unsigned long flags; | ||
105 | |||
106 | spin_lock_irqsave(cmd->lock, flags); | ||
103 | kobject_put(&cmd->kobj); | 107 | kobject_put(&cmd->kobj); |
108 | spin_unlock_irqrestore(cmd->lock, flags); | ||
104 | } | 109 | } |
105 | 110 | ||
106 | static inline void command_get(struct command *cmd) | 111 | static inline void command_get(struct command *cmd) |
@@ -159,7 +164,7 @@ struct service_processor { | |||
159 | }; | 164 | }; |
160 | 165 | ||
161 | /* command processing */ | 166 | /* command processing */ |
162 | extern struct command *ibmasm_new_command(size_t buffer_size); | 167 | extern struct command *ibmasm_new_command(struct service_processor *sp, size_t buffer_size); |
163 | extern void ibmasm_exec_command(struct service_processor *sp, struct command *cmd); | 168 | extern void ibmasm_exec_command(struct service_processor *sp, struct command *cmd); |
164 | extern void ibmasm_wait_for_response(struct command *cmd, int timeout); | 169 | extern void ibmasm_wait_for_response(struct command *cmd, int timeout); |
165 | extern void ibmasm_receive_command_response(struct service_processor *sp, void *response, size_t size); | 170 | extern void ibmasm_receive_command_response(struct service_processor *sp, void *response, size_t size); |