Skip to content

Commit 6faaea2

Browse files
andy-shevstorulf
authored andcommitted
mmc: slot-gpio: Use irq_handler_t type
The irq_handler_t is already defined globally, let's use it in slot-gpio code. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Alexander Stein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 431946c commit 6faaea2

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

drivers/mmc/core/slot-gpio.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
struct mmc_gpio {
2020
struct gpio_desc *ro_gpio;
2121
struct gpio_desc *cd_gpio;
22-
irqreturn_t (*cd_gpio_isr)(int irq, void *dev_id);
22+
irq_handler_t cd_gpio_isr;
2323
char *ro_label;
2424
char *cd_label;
2525
u32 cd_debounce_delay_ms;
@@ -162,8 +162,7 @@ EXPORT_SYMBOL(mmc_gpio_set_cd_wake);
162162
/* Register an alternate interrupt service routine for
163163
* the card-detect GPIO.
164164
*/
165-
void mmc_gpio_set_cd_isr(struct mmc_host *host,
166-
irqreturn_t (*isr)(int irq, void *dev_id))
165+
void mmc_gpio_set_cd_isr(struct mmc_host *host, irq_handler_t isr)
167166
{
168167
struct mmc_gpio *ctx = host->slot.handler_priv;
169168

include/linux/mmc/slot-gpio.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#ifndef MMC_SLOT_GPIO_H
99
#define MMC_SLOT_GPIO_H
1010

11+
#include <linux/interrupt.h>
1112
#include <linux/types.h>
12-
#include <linux/irqreturn.h>
1313

1414
struct mmc_host;
1515

@@ -22,8 +22,7 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
2222
int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,
2323
unsigned int idx, unsigned int debounce);
2424
int mmc_gpiod_set_cd_config(struct mmc_host *host, unsigned long config);
25-
void mmc_gpio_set_cd_isr(struct mmc_host *host,
26-
irqreturn_t (*isr)(int irq, void *dev_id));
25+
void mmc_gpio_set_cd_isr(struct mmc_host *host, irq_handler_t isr);
2726
int mmc_gpio_set_cd_wake(struct mmc_host *host, bool on);
2827
void mmc_gpiod_request_cd_irq(struct mmc_host *host);
2928
bool mmc_can_gpio_cd(struct mmc_host *host);

0 commit comments

Comments
 (0)