From: Frederik Deweerdt <deweerdt@free.fr>
To: linux-kernel@vger.kernel.org
Cc: arjan@infradead.org, matthew@wil.cx, alan@lxorguk.ukuu.org.uk,
jeff@garzik.org, akpm@osdl.org, rdunlap@xenotime.net,
gregkh@suse.de
Subject: [RFC PATCH] move aic79xx to pci_request_irq
Date: Tue, 3 Oct 2006 22:19:17 +0000 [thread overview]
Message-ID: <20061003221917.GG2785@slug> (raw)
In-Reply-To: <20061003220732.GE2785@slug>
Hi,
This proof-of-concept patch converts the aic79xx driver to use the
pci_request_irq() function.
Please note that I'm not submitting the driver changes, they're there
only for illustration purposes. I'll CC the appropriate maintainers
when/if an API is agreed upon.
Regards,
Frederik
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h
index 448c39c..67897d4 100644
Index: 2.6.18-mm3/drivers/scsi/aic7xxx/aic79xx_osm.h
===================================================================
--- 2.6.18-mm3.orig/drivers/scsi/aic7xxx/aic79xx_osm.h
+++ 2.6.18-mm3/drivers/scsi/aic7xxx/aic79xx_osm.h
@@ -594,7 +594,6 @@ void ahd_power_state_change(struct ahd_s
int ahd_linux_pci_init(void);
void ahd_linux_pci_exit(void);
int ahd_pci_map_registers(struct ahd_softc *ahd);
-int ahd_pci_map_int(struct ahd_softc *ahd);
static __inline uint32_t ahd_pci_read_config(ahd_dev_softc_t pci,
int reg, int width);
Index: 2.6.18-mm3/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
===================================================================
--- 2.6.18-mm3.orig/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+++ 2.6.18-mm3/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
@@ -336,19 +336,6 @@ ahd_pci_map_registers(struct ahd_softc *
return (error);
}
-int
-ahd_pci_map_int(struct ahd_softc *ahd)
-{
- int error;
-
- error = request_irq(ahd->dev_softc->irq, ahd_linux_isr,
- IRQF_SHARED, "aic79xx", ahd);
- if (!error)
- ahd->platform_data->irq = ahd->dev_softc->irq;
-
- return (-error);
-}
-
void
ahd_power_state_change(struct ahd_softc *ahd, ahd_power_state new_state)
{
Index: 2.6.18-mm3/drivers/scsi/aic7xxx/aic79xx_pci.c
===================================================================
--- 2.6.18-mm3.orig/drivers/scsi/aic7xxx/aic79xx_pci.c
+++ 2.6.18-mm3/drivers/scsi/aic7xxx/aic79xx_pci.c
@@ -376,10 +376,18 @@ ahd_pci_config(struct ahd_softc *ahd, st
/*
* Allow interrupts now that we are completely setup.
+ *
+ * Note: pci_request_irq return value is negated due to aic79xx
+ * error handling style
*/
- error = ahd_pci_map_int(ahd);
- if (!error)
+
+ error = -pci_request_irq(ahd->dev_softc, ahd_linux_isr,
+ IRQF_SHARED, "aic79xx");
+ if (!error) {
+ ahd->platform_data->irq = ahd->dev_softc->irq;
ahd->init_level++;
+ }
+
return error;
}
next prev parent reply other threads:[~2006-10-03 22:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-03 22:07 [RFC PATCH] add pci_{request,free}_irq take #2 Frederik Deweerdt
2006-10-03 22:14 ` [RFC PATCH] move aic7xxx to pci_request_irq Frederik Deweerdt
2006-10-03 22:14 ` [RFC PATCH] add pci_{request,free}_irq take #2 Jeff Garzik
2006-10-03 22:29 ` Frederik Deweerdt
2006-10-03 22:37 ` Jeff Garzik
2006-10-04 2:59 ` Matthew Wilcox
2006-10-03 22:19 ` Frederik Deweerdt [this message]
2006-10-03 22:22 ` [RFC PATCH] move tg3 to pci_request_irq Frederik Deweerdt
2006-10-03 22:37 ` Jeff Garzik
2006-10-03 22:41 ` Frederik Deweerdt
2006-10-04 5:38 ` Jeff Garzik
2006-10-04 6:27 ` David Miller
2006-10-04 9:09 ` Frederik Deweerdt
2006-10-03 22:23 ` [RFC PATCH] move e1000 " Frederik Deweerdt
2006-10-03 22:36 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2006-10-04 19:32 [RFC PATCH] add pci_{request,free}_irq take #3 Frederik Deweerdt
2006-10-04 19:44 ` [RFC PATCH] move aic79xx to pci_request_irq Frederik Deweerdt
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=20061003221917.GG2785@slug \
--to=deweerdt@free.fr \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=gregkh@suse.de \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=rdunlap@xenotime.net \
/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