mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
dmaengine: hsu: refactor hsu_dma_do_irq() to return int
Since we have nice macro IRQ_RETVAL() we would use it to convert a flag of handled interrupt from int to irqreturn_t. The rationale of doing this is: a) hence we implicitly mark hsu_dma_do_irq() as an auxiliary function that can't be used as interrupt handler directly, and b) to be in align with serial driver which is using serial8250_handle_irq() that returns plain int by design. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
46e36683f4
commit
d2f5a7311b
4 changed files with 15 additions and 17 deletions
|
@ -41,8 +41,7 @@ struct hsu_dma_chip {
|
|||
/* Export to the internal users */
|
||||
int hsu_dma_get_status(struct hsu_dma_chip *chip, unsigned short nr,
|
||||
u32 *status);
|
||||
irqreturn_t hsu_dma_do_irq(struct hsu_dma_chip *chip, unsigned short nr,
|
||||
u32 status);
|
||||
int hsu_dma_do_irq(struct hsu_dma_chip *chip, unsigned short nr, u32 status);
|
||||
|
||||
/* Export to the platform drivers */
|
||||
int hsu_dma_probe(struct hsu_dma_chip *chip);
|
||||
|
@ -53,10 +52,10 @@ static inline int hsu_dma_get_status(struct hsu_dma_chip *chip,
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
static inline irqreturn_t hsu_dma_do_irq(struct hsu_dma_chip *chip,
|
||||
unsigned short nr, u32 status)
|
||||
static inline int hsu_dma_do_irq(struct hsu_dma_chip *chip, unsigned short nr,
|
||||
u32 status)
|
||||
{
|
||||
return IRQ_NONE;
|
||||
return 0;
|
||||
}
|
||||
static inline int hsu_dma_probe(struct hsu_dma_chip *chip) { return -ENODEV; }
|
||||
static inline int hsu_dma_remove(struct hsu_dma_chip *chip) { return 0; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue