From: Cihangir Akturk <cakturk@gmail.com>
To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org
Cc: linux@Wolf-Entwicklungen.de, dan.carpenter@oracle.com,
linux-kernel@vger.kernel.org, Cihangir Akturk <cakturk@gmail.com>
Subject: [PATCH] staging: pi433: fix interrupt handler signatures
Date: Fri, 25 Aug 2017 11:21:02 +0300 [thread overview]
Message-ID: <1503649262-28494-1-git-send-email-cakturk@gmail.com> (raw)
Remove "struct pt_regs *" parameter from interrupt handlers, since
it is no longer passed to interrupt handlers. Also, convert return
types to irqreturn_t.
Additionally, move DIO_irq_handler variable into the setup_GPIO
function, as it's not used outside of this function.
Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
---
drivers/staging/pi433/pi433_if.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 87053e77..93c0168 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -129,8 +129,7 @@ struct pi433_instance {
/*-------------------------------------------------------------------------*/
/* GPIO interrupt handlers */
-static irq_handler_t
-DIO0_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t DIO0_irq_handler(int irq, void *dev_id)
{
struct pi433_device *device = dev_id;
@@ -152,11 +151,10 @@ DIO0_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs)
wake_up_interruptible(&device->fifo_wait_queue);
}
- return (irq_handler_t) IRQ_HANDLED;
+ return IRQ_HANDLED;
}
-static irq_handler_t
-DIO1_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t DIO1_irq_handler(int irq, void *dev_id)
{
struct pi433_device *device = dev_id;
@@ -172,14 +170,9 @@ DIO1_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs)
printk("DIO1 irq: %d bytes free in fifo\n", device->free_in_fifo); // TODO: printk() should include KERN_ facility level
wake_up_interruptible(&device->fifo_wait_queue);
- return (irq_handler_t) IRQ_HANDLED;
+ return IRQ_HANDLED;
}
-static void *DIO_irq_handler[NUM_DIO] = {
- DIO0_irq_handler,
- DIO1_irq_handler
-};
-
/*-------------------------------------------------------------------------*/
static int
@@ -982,6 +975,10 @@ static int setup_GPIOs(struct pi433_device *device)
char name[5];
int retval;
int i;
+ const irq_handler_t DIO_irq_handler[NUM_DIO] = {
+ DIO0_irq_handler,
+ DIO1_irq_handler
+ };
for (i=0; i<NUM_DIO; i++)
{
--
2.7.4
reply other threads:[~2017-08-25 8:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503649262-28494-1-git-send-email-cakturk@gmail.com \
--to=cakturk@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@Wolf-Entwicklungen.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®