提交 900c5440 编写于 作者: S Stephen M. Cameron 提交者: James Bottomley

[SCSI] hpsa: interrupt pending function should return bool not unsigned long

Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 84ca0be2
...@@ -2693,7 +2693,7 @@ static inline unsigned long get_next_completion(struct ctlr_info *h) ...@@ -2693,7 +2693,7 @@ static inline unsigned long get_next_completion(struct ctlr_info *h)
return h->access.command_completed(h); return h->access.command_completed(h);
} }
static inline int interrupt_pending(struct ctlr_info *h) static inline bool interrupt_pending(struct ctlr_info *h)
{ {
return h->access.intr_pending(h); return h->access.intr_pending(h);
} }
......
...@@ -33,7 +33,7 @@ struct access_method { ...@@ -33,7 +33,7 @@ struct access_method {
struct CommandList *c); struct CommandList *c);
void (*set_intr_mask)(struct ctlr_info *h, unsigned long val); void (*set_intr_mask)(struct ctlr_info *h, unsigned long val);
unsigned long (*fifo_full)(struct ctlr_info *h); unsigned long (*fifo_full)(struct ctlr_info *h);
unsigned long (*intr_pending)(struct ctlr_info *h); bool (*intr_pending)(struct ctlr_info *h);
unsigned long (*command_completed)(struct ctlr_info *h); unsigned long (*command_completed)(struct ctlr_info *h);
}; };
...@@ -233,14 +233,12 @@ static unsigned long SA5_completed(struct ctlr_info *h) ...@@ -233,14 +233,12 @@ static unsigned long SA5_completed(struct ctlr_info *h)
/* /*
* Returns true if an interrupt is pending.. * Returns true if an interrupt is pending..
*/ */
static unsigned long SA5_intr_pending(struct ctlr_info *h) static bool SA5_intr_pending(struct ctlr_info *h)
{ {
unsigned long register_value = unsigned long register_value =
readl(h->vaddr + SA5_INTR_STATUS); readl(h->vaddr + SA5_INTR_STATUS);
dev_dbg(&h->pdev->dev, "intr_pending %lx\n", register_value); dev_dbg(&h->pdev->dev, "intr_pending %lx\n", register_value);
if (register_value & SA5_INTR_PENDING) return register_value & SA5_INTR_PENDING;
return 1;
return 0 ;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册