|
@@ -101,15 +101,16 @@ struct command {
|
|
static inline void command_put(struct command *cmd)
|
|
static inline void command_put(struct command *cmd)
|
|
{
|
|
{
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
|
+ spinlock_t *lock = cmd->lock;
|
|
|
|
|
|
- spin_lock_irqsave(cmd->lock, flags);
|
|
|
|
- kobject_put(&cmd->kobj);
|
|
|
|
- spin_unlock_irqrestore(cmd->lock, flags);
|
|
|
|
|
|
+ spin_lock_irqsave(lock, flags);
|
|
|
|
+ kobject_put(&cmd->kobj);
|
|
|
|
+ spin_unlock_irqrestore(lock, flags);
|
|
}
|
|
}
|
|
|
|
|
|
static inline void command_get(struct command *cmd)
|
|
static inline void command_get(struct command *cmd)
|
|
{
|
|
{
|
|
- kobject_get(&cmd->kobj);
|
|
|
|
|
|
+ kobject_get(&cmd->kobj);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|