Hej,
in addition to the patch series already submitted as RFCs and reviewed[*]
here are 13 more patches intended for submission after 2.6.32 is released.
The patches will be sent to the PCMCIA list shortly, with CC to other
lists if deemed appropriate. Also, they can be found in the "pcmcia-test"
branch at
git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git pcmcia-test
and gitweb at
http://git.kernel.org/?p=linux/kernel/git/brodo/pcmcia-2.6.git;a=shortlog;h=refs/heads/pcmcia-test
[*] - patchset sent on Oct 19
- patchset sent on Oct 24
- Russell King's patchset sent on Oct 27
---
Avi Cohen Stuart (1):
pcmcia: correct handling for Zoomed Video registers in topic.h
Dominik Brodowski (7):
pcmcia/staging: update comedi drivers
pcmcia: autoload module pcmcia
pcmcia: move some window-related code to pcmcia_ioctl.c
pcmcia: remove unused "window_t" typedef
pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer
pcmcia: remove deprecated handle_to_dev() macro
pcmcia: rework the irq_req_t typedef
Magnus Damm (4):
pcmcia: Pass struct pcmcia_device to pcmcia_release_window()
pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()
pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()
pcmcia: Change window_handle_t logic to unsigned long
Randy Dunlap (1):
pcmcia: fix printk formats
---
drivers/ata/pata_pcmcia.c | 1
drivers/bluetooth/bluecard_cs.c | 4
drivers/bluetooth/bt3c_cs.c | 4
drivers/bluetooth/btuart_cs.c | 4
drivers/bluetooth/dtl1_cs.c | 4
drivers/char/pcmcia/cm4000_cs.c | 2
drivers/char/pcmcia/cm4040_cs.c | 10
drivers/char/pcmcia/ipwireless/hardware.c | 8
drivers/char/pcmcia/ipwireless/main.c | 28 +-
drivers/char/pcmcia/synclink_cs.c | 3
drivers/ide/ide-cs.c | 1
drivers/isdn/hardware/avm/avm_cs.c | 2
drivers/isdn/hisax/avma1_cs.c | 2
drivers/isdn/hisax/elsa_cs.c | 1
drivers/isdn/hisax/sedlbauer_cs.c | 5
drivers/isdn/hisax/teles_cs.c | 1
drivers/mtd/maps/pcmciamtd.c | 6
drivers/net/pcmcia/3c574_cs.c | 6
drivers/net/pcmcia/3c589_cs.c | 6
drivers/net/pcmcia/axnet_cs.c | 3
drivers/net/pcmcia/com20020_cs.c | 10
drivers/net/pcmcia/fmvj18x_cs.c | 20 -
drivers/net/pcmcia/ibmtr_cs.c | 25 +-
drivers/net/pcmcia/nmclan_cs.c | 6
drivers/net/pcmcia/pcnet_cs.c | 17 -
drivers/net/pcmcia/smc91c92_cs.c | 14 -
drivers/net/pcmcia/xirc2ps_cs.c | 9
drivers/net/wireless/airo_cs.c | 7
drivers/net/wireless/atmel_cs.c | 5
drivers/net/wireless/b43/pcmcia.c | 6
drivers/net/wireless/hostap/hostap_cs.c | 7
drivers/net/wireless/libertas/if_cs.c | 5
drivers/net/wireless/netwave_cs.c | 11 -
drivers/net/wireless/orinoco/orinoco_cs.c | 6
drivers/net/wireless/orinoco/spectrum_cs.c | 6
drivers/net/wireless/ray_cs.c | 22 --
drivers/net/wireless/wavelan_cs.c | 11 -
drivers/net/wireless/wl3501_cs.c | 7
drivers/parport/parport_cs.c | 1
drivers/pcmcia/cs.c | 7
drivers/pcmcia/cs_internal.h | 4
drivers/pcmcia/pcmcia_ioctl.c | 61 +++++
drivers/pcmcia/pcmcia_resource.c | 153 +++++---------
drivers/pcmcia/topic.h | 15 -
drivers/scsi/pcmcia/aha152x_stub.c | 1
drivers/scsi/pcmcia/fdomain_stub.c | 1
drivers/scsi/pcmcia/nsp_cs.c | 8
drivers/scsi/pcmcia/qlogic_stub.c | 1
drivers/scsi/pcmcia/sym53c500_cs.c | 1
drivers/serial/serial_cs.c | 3
drivers/staging/comedi/drivers/cb_das16_cs.c | 221 +++++----------------
drivers/staging/comedi/drivers/das08_cs.c | 203 +++++--------------
drivers/staging/comedi/drivers/ni_daq_700.c | 237 +++++++----------------
drivers/staging/comedi/drivers/ni_daq_dio24.c | 236 +++++++---------------
drivers/staging/comedi/drivers/ni_labpc_cs.c | 225 +++++++--------------
drivers/staging/comedi/drivers/ni_mio_cs.c | 127 ++----------
drivers/staging/comedi/drivers/quatech_daqp_cs.c | 219 +++++----------------
drivers/usb/host/sl811_cs.c | 3
include/pcmcia/cs.h | 14 -
include/pcmcia/cs_types.h | 3
include/pcmcia/ds.h | 12 -
include/pcmcia/ss.h | 11 -
sound/pcmcia/pdaudiocf/pdaudiocf.c | 6
sound/pcmcia/vx/vxpocket.c | 6
64 files changed, 688 insertions(+), 1386 deletions(-)
Best,
Dominik
On Mittwoch, 11. November 2009 21:38:17 Dominik Brodowski wrote:
> pcmcia_request_window() only needs a pointer to struct pcmcia_device, not
> a pointer to a pointer.
>
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> CC: Jiri Kosina <[email protected]>
> CC: Karsten Keil <[email protected]>
> Signed-off-by: Dominik Brodowski <[email protected]>
> ---
> drivers/char/pcmcia/ipwireless/main.c | 4 ++--
> drivers/isdn/hisax/sedlbauer_cs.c | 2 +-
For ISDN
Acked-by: Karsten Keil <[email protected]>
Hi Dominik,
> Most of the irq_req_t typedef'd struct can be re-worked quite
> easily:
>
> (1) IRQInfo2 was unused in any case, so drop it.
>
> (2) IRQInfo1 was used write-only, so drop it.
>
> (3) Instance (private data to be passed to the IRQ handler):
> Most PCMCIA drivers using pcmcia_request_irq() to actually
> register an IRQ handler set the "dev_id" to the same pointer
> as the "priv" pointer in struct pcmcia_device. Modify the two
> exceptions (ipwireless, ibmtr_cs) to also work this waym and
> set the IRQ handler's "dev_id" to p_dev->priv unconditionally.
>
> (4) Handler is to be of type irq_handler_t.
>
> (5) Handler != NULL already tells whether an IRQ handler is present.
> Therefore, we do not need the IRQ_HANDLER_PRESENT flag in
> irq_req_t.Attributes.
>
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> CC: Jaroslav Kysela <[email protected]>
> CC: Jiri Kosina <[email protected]>
> CC: Karsten Keil <[email protected]>
> Signed-off-by: Dominik Brodowski <[email protected]>
> ---
> drivers/ata/pata_pcmcia.c | 1 -
> drivers/bluetooth/bluecard_cs.c | 4 +---
> drivers/bluetooth/bt3c_cs.c | 4 +---
> drivers/bluetooth/btuart_cs.c | 4 +---
> drivers/bluetooth/dtl1_cs.c | 4 +---
for the Bluetooth parts:
Acked-by: Marcel Holtmann <[email protected]>
Regards
Marcel
On Mittwoch, 11. November 2009 21:38:12 Dominik Brodowski wrote:
> From: Magnus Damm <[email protected]>
>
> No logic changes, just pass struct pcmcia_device to pcmcia_map_mem_page()
>
> [[email protected]: update to 2.6.31]
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> CC: Jiri Kosina <[email protected]>
> CC: Karsten Keil <[email protected]>
> Signed-off-by: Magnus Damm <[email protected]>
> Signed-off-by: Dominik Brodowski <[email protected]>
> ---
> drivers/char/pcmcia/ipwireless/main.c | 4 ++--
> drivers/isdn/hisax/sedlbauer_cs.c | 2 +-
For ISDN
Acked-by: Karsten Keil <[email protected]>
Update remaining users and remove deprecated handle_to_dev() macro
CC: Harald Welte <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
Signed-off-by: Dominik Brodowski <[email protected]>
---
drivers/char/pcmcia/cm4000_cs.c | 2 +-
drivers/char/pcmcia/cm4040_cs.c | 6 +++---
drivers/net/pcmcia/3c574_cs.c | 2 +-
drivers/net/pcmcia/3c589_cs.c | 2 +-
drivers/net/pcmcia/axnet_cs.c | 2 +-
drivers/net/pcmcia/com20020_cs.c | 2 +-
drivers/net/pcmcia/fmvj18x_cs.c | 2 +-
drivers/net/pcmcia/ibmtr_cs.c | 2 +-
drivers/net/pcmcia/nmclan_cs.c | 2 +-
drivers/net/pcmcia/pcnet_cs.c | 2 +-
drivers/net/pcmcia/smc91c92_cs.c | 2 +-
drivers/net/pcmcia/xirc2ps_cs.c | 2 +-
drivers/net/wireless/airo_cs.c | 2 +-
drivers/net/wireless/atmel_cs.c | 4 ++--
drivers/net/wireless/hostap/hostap_cs.c | 2 +-
drivers/net/wireless/libertas/if_cs.c | 4 ++--
drivers/net/wireless/netwave_cs.c | 2 +-
drivers/net/wireless/orinoco/orinoco_cs.c | 2 +-
drivers/net/wireless/orinoco/spectrum_cs.c | 2 +-
drivers/net/wireless/ray_cs.c | 2 +-
drivers/net/wireless/wavelan_cs.c | 2 +-
drivers/net/wireless/wl3501_cs.c | 2 +-
drivers/serial/serial_cs.c | 2 +-
drivers/usb/host/sl811_cs.c | 2 +-
include/pcmcia/ds.h | 3 ---
sound/pcmcia/pdaudiocf/pdaudiocf.c | 2 +-
sound/pcmcia/vx/vxpocket.c | 2 +-
27 files changed, 30 insertions(+), 33 deletions(-)
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 1611c4f..2db4c0a 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -45,7 +45,7 @@
/* #define ATR_CSUM */
-#define reader_to_dev(x) (&handle_to_dev(x->p_dev))
+#define reader_to_dev(x) (&x->p_dev->dev)
/* n (debug level) is ignored */
/* additional debug output may be enabled by re-compiling with
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 38790db..a6a70e4 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -39,7 +39,7 @@
#include "cm4040_cs.h"
-#define reader_to_dev(x) (&handle_to_dev(x->p_dev))
+#define reader_to_dev(x) (&x->p_dev->dev)
/* n (debug level) is ignored */
/* additional debug output may be enabled by re-compiling with
@@ -539,7 +539,7 @@ static int cm4040_config_check(struct pcmcia_device *p_dev,
p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
rc = pcmcia_request_io(p_dev, &p_dev->io);
- dev_printk(KERN_INFO, &handle_to_dev(p_dev),
+ dev_printk(KERN_INFO, &p_dev->dev,
"pcmcia_request_io returned 0x%x\n", rc);
return rc;
}
@@ -561,7 +561,7 @@ static int reader_config(struct pcmcia_device *link, int devno)
fail_rc = pcmcia_request_configuration(link, &link->conf);
if (fail_rc != 0) {
- dev_printk(KERN_INFO, &handle_to_dev(link),
+ dev_printk(KERN_INFO, &link->dev,
"pcmcia_request_configuration failed 0x%x\n",
fail_rc);
goto cs_release;
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index dbef5d9..8b65e18 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -449,7 +449,7 @@ static int tc574_config(struct pcmcia_device *link)
}
link->dev_node = &lp->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index 6eac62b..c43c21d 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -316,7 +316,7 @@ static int tc589_config(struct pcmcia_device *link)
printk(KERN_ERR "3c589_cs: invalid if_port requested\n");
link->dev_node = &lp->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) {
printk(KERN_ERR "3c589_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 5af2ccf..0552ddd 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -400,7 +400,7 @@ static int axnet_config(struct pcmcia_device *link)
info->phy_id = (i < 32) ? i : -1;
link->dev_node = &info->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index 9a2e500..51e9cb0 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -302,7 +302,7 @@ static int com20020_config(struct pcmcia_device *link)
lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */
link->dev_node = &info->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
i = com20020_found(dev, 0); /* calls register_netdev */
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 85f7c45..9b5ca37 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -532,7 +532,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
lp->cardtype = cardtype;
link->dev_node = &lp->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index 14fe5fa..76706e1 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -287,7 +287,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
ibmtr_hw_setup(dev, mmiobase);
link->dev_node = &info->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
i = ibmtr_probe_card(dev);
if (i != 0) {
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index a536348..2d0c6f9 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -701,7 +701,7 @@ static int nmclan_config(struct pcmcia_device *link)
printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n");
link->dev_node = &lp->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
i = register_netdev(dev);
if (i != 0) {
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index d06a0ce..30baee7 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -646,7 +646,7 @@ static int pcnet_config(struct pcmcia_device *link)
mii_phy_probe(dev);
link->dev_node = &info->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index c6ca376..2e795de 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -964,7 +964,7 @@ static int smc91c92_config(struct pcmcia_device *link)
}
link->dev_node = &smc->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) {
printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 265852a..f75ac71 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -992,7 +992,7 @@ xirc2ps_config(struct pcmcia_device * link)
do_reset(dev, 1); /* a kludge to make the cem56 work */
link->dev_node = &local->node;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
if ((err=register_netdev(dev))) {
printk(KNOT_XIRC "register_netdev() failed\n");
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 34d775c..7d3a96f 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -322,7 +322,7 @@ static int airo_config(struct pcmcia_device *link)
goto failed;
((local_info_t *)link->priv)->eth_dev =
init_airo_card(link->irq.AssignedIRQ,
- link->io.BasePort1, 1, &handle_to_dev(link));
+ link->io.BasePort1, 1, &link->dev);
if (!((local_info_t *)link->priv)->eth_dev)
goto failed;
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 7838572..18a58b8 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -260,7 +260,7 @@ static int atmel_config(struct pcmcia_device *link)
struct pcmcia_device_id *did;
dev = link->priv;
- did = dev_get_drvdata(&handle_to_dev(link));
+ did = dev_get_drvdata(&link->dev);
dev_dbg(&link->dev, "atmel_config\n");
@@ -309,7 +309,7 @@ static int atmel_config(struct pcmcia_device *link)
init_atmel_card(link->irq.AssignedIRQ,
link->io.BasePort1,
did ? did->driver_info : ATMEL_FW_TYPE_NONE,
- &handle_to_dev(link),
+ &link->dev,
card_present,
link);
if (!((local_info_t*)link->priv)->eth_dev)
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index ca3ab84..243e912 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -623,7 +623,7 @@ static int prism2_config(struct pcmcia_device *link)
/* Need to allocate net_device before requesting IRQ handler */
dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
- &handle_to_dev(link));
+ &link->dev);
if (dev == NULL)
goto failed;
link->priv = dev;
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index cb40c38..f2b1655 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -590,7 +590,7 @@ static int if_cs_prog_helper(struct if_cs_card *card)
/* TODO: make firmware file configurable */
ret = request_firmware(&fw, "libertas_cs_helper.fw",
- &handle_to_dev(card->p_dev));
+ &card->p_dev->dev);
if (ret) {
lbs_pr_err("can't load helper firmware\n");
ret = -ENODEV;
@@ -663,7 +663,7 @@ static int if_cs_prog_real(struct if_cs_card *card)
/* TODO: make firmware file configurable */
ret = request_firmware(&fw, "libertas_cs.fw",
- &handle_to_dev(card->p_dev));
+ &card->p_dev->dev);
if (ret) {
lbs_pr_err("can't load firmware\n");
ret = -ENODEV;
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index bd4eff7..f5333b7 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -773,7 +773,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) {
printk(KERN_DEBUG "netwave_cs: register_netdev() failed\n");
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index da626ec..688b398 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -109,7 +109,7 @@ orinoco_cs_probe(struct pcmcia_device *link)
struct orinoco_private *priv;
struct orinoco_pccard *card;
- priv = alloc_orinocodev(sizeof(*card), &handle_to_dev(link),
+ priv = alloc_orinocodev(sizeof(*card), &link->dev,
orinoco_cs_hard_reset, NULL);
if (!priv)
return -ENOMEM;
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index 700010e..c609371 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -182,7 +182,7 @@ spectrum_cs_probe(struct pcmcia_device *link)
struct orinoco_private *priv;
struct orinoco_pccard *card;
- priv = alloc_orinocodev(sizeof(*card), &handle_to_dev(link),
+ priv = alloc_orinocodev(sizeof(*card), &link->dev,
spectrum_cs_hard_reset,
spectrum_cs_stop_firmware);
if (!priv)
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 66e2d10..5e0f4c3 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -488,7 +488,7 @@ static int ray_config(struct pcmcia_device *link)
return -ENODEV;
}
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
i = register_netdev(dev);
if (i != 0) {
printk("ray_config register_netdev() failed\n");
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index f8c5166..df3579a 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -3899,7 +3899,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
lp->mem, dev->irq, (u_int) dev->base_addr);
#endif
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
i = register_netdev(dev);
if(i != 0)
{
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 7e8e269..9a956c7 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1975,7 +1975,7 @@ static int wl3501_config(struct pcmcia_device *link)
dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1;
- SET_NETDEV_DEV(dev, &handle_to_dev(link));
+ SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev)) {
printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n");
goto failed;
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 3b31bee..8d651a6 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -387,7 +387,7 @@ static int setup_serial(struct pcmcia_device *handle, struct serial_info * info,
port.irq = irq;
port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
port.uartclk = 1843200;
- port.dev = &handle_to_dev(handle);
+ port.dev = &handle->dev;
if (buggy_uart)
port.flags |= UPF_BUGGY_UART;
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 4607742..f87aba6 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -185,7 +185,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev,
static int sl811_cs_config(struct pcmcia_device *link)
{
- struct device *parent = &handle_to_dev(link);
+ struct device *parent = &link->dev;
local_info_t *dev = link->priv;
int ret;
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index d6c55fd..d403c12 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -138,9 +138,6 @@ struct pcmcia_device {
#define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev)
#define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv)
-/* deprecated -- don't use! */
-#define handle_to_dev(handle) (handle->dev)
-
/*
* CIS access.
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 64b8599..447aaae 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -131,7 +131,7 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
return err;
}
- snd_card_set_dev(card, &handle_to_dev(link));
+ snd_card_set_dev(card, &link->dev);
pdacf->index = i;
card_list[i] = card;
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 1492744..5a5db48 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -244,7 +244,7 @@ static int vxpocket_config(struct pcmcia_device *link)
if (ret)
goto failed;
- chip->dev = &handle_to_dev(link);
+ chip->dev = &link->dev;
snd_card_set_dev(chip->card, chip->dev);
if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq.AssignedIRQ) < 0)
--
1.6.0.4
Most of the irq_req_t typedef'd struct can be re-worked quite
easily:
(1) IRQInfo2 was unused in any case, so drop it.
(2) IRQInfo1 was used write-only, so drop it.
(3) Instance (private data to be passed to the IRQ handler):
Most PCMCIA drivers using pcmcia_request_irq() to actually
register an IRQ handler set the "dev_id" to the same pointer
as the "priv" pointer in struct pcmcia_device. Modify the two
exceptions (ipwireless, ibmtr_cs) to also work this waym and
set the IRQ handler's "dev_id" to p_dev->priv unconditionally.
(4) Handler is to be of type irq_handler_t.
(5) Handler != NULL already tells whether an IRQ handler is present.
Therefore, we do not need the IRQ_HANDLER_PRESENT flag in
irq_req_t.Attributes.
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: Jaroslav Kysela <[email protected]>
CC: Jiri Kosina <[email protected]>
CC: Karsten Keil <[email protected]>
Signed-off-by: Dominik Brodowski <[email protected]>
---
drivers/ata/pata_pcmcia.c | 1 -
drivers/bluetooth/bluecard_cs.c | 4 +---
drivers/bluetooth/bt3c_cs.c | 4 +---
drivers/bluetooth/btuart_cs.c | 4 +---
drivers/bluetooth/dtl1_cs.c | 4 +---
drivers/char/pcmcia/ipwireless/hardware.c | 8 ++++----
drivers/char/pcmcia/ipwireless/main.c | 6 +-----
drivers/char/pcmcia/synclink_cs.c | 3 ---
drivers/ide/ide-cs.c | 1 -
drivers/isdn/hardware/avm/avm_cs.c | 2 --
drivers/isdn/hisax/avma1_cs.c | 2 --
drivers/isdn/hisax/elsa_cs.c | 1 -
drivers/isdn/hisax/sedlbauer_cs.c | 1 -
drivers/isdn/hisax/teles_cs.c | 1 -
drivers/net/pcmcia/3c574_cs.c | 4 +---
drivers/net/pcmcia/3c589_cs.c | 4 +---
drivers/net/pcmcia/axnet_cs.c | 1 -
drivers/net/pcmcia/com20020_cs.c | 8 +++-----
drivers/net/pcmcia/fmvj18x_cs.c | 6 ++----
drivers/net/pcmcia/ibmtr_cs.c | 13 +++++++++----
drivers/net/pcmcia/nmclan_cs.c | 4 +---
drivers/net/pcmcia/pcnet_cs.c | 1 -
drivers/net/pcmcia/smc91c92_cs.c | 8 +++-----
drivers/net/pcmcia/xirc2ps_cs.c | 3 ---
drivers/net/wireless/airo_cs.c | 1 -
drivers/net/wireless/atmel_cs.c | 1 -
drivers/net/wireless/b43/pcmcia.c | 2 --
drivers/net/wireless/hostap/hostap_cs.c | 5 +----
drivers/net/wireless/libertas/if_cs.c | 1 -
drivers/net/wireless/netwave_cs.c | 5 +----
drivers/net/wireless/orinoco/orinoco_cs.c | 4 +---
drivers/net/wireless/orinoco/spectrum_cs.c | 4 +---
drivers/net/wireless/ray_cs.c | 4 +---
drivers/net/wireless/wavelan_cs.c | 5 ++---
drivers/net/wireless/wl3501_cs.c | 5 ++---
drivers/parport/parport_cs.c | 1 -
drivers/pcmcia/pcmcia_resource.c | 18 +++++++++---------
drivers/scsi/pcmcia/aha152x_stub.c | 1 -
drivers/scsi/pcmcia/fdomain_stub.c | 1 -
drivers/scsi/pcmcia/nsp_cs.c | 4 +---
drivers/scsi/pcmcia/qlogic_stub.c | 1 -
drivers/scsi/pcmcia/sym53c500_cs.c | 1 -
drivers/serial/serial_cs.c | 1 -
drivers/staging/comedi/drivers/cb_das16_cs.c | 1 -
drivers/staging/comedi/drivers/das08_cs.c | 1 -
drivers/staging/comedi/drivers/ni_daq_700.c | 1 -
drivers/staging/comedi/drivers/ni_daq_dio24.c | 1 -
drivers/staging/comedi/drivers/ni_labpc_cs.c | 1 -
drivers/staging/comedi/drivers/ni_mio_cs.c | 4 ----
drivers/staging/comedi/drivers/quatech_daqp_cs.c | 4 +---
drivers/usb/host/sl811_cs.c | 1 -
include/pcmcia/cs.h | 14 ++++++++------
sound/pcmcia/pdaudiocf/pdaudiocf.c | 4 +---
sound/pcmcia/vx/vxpocket.c | 4 +---
54 files changed, 59 insertions(+), 136 deletions(-)
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 5f94e21..1b392c9 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -268,7 +268,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
pdev->io.IOAddrLines = 3;
pdev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- pdev->irq.IRQInfo1 = IRQ_LEVEL_ID;
pdev->conf.Attributes = CONF_ENABLE_IRQ;
pdev->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index 1e0c4d8..2acdc60 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -867,11 +867,9 @@ static int bluecard_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = bluecard_interrupt;
- link->irq.Instance = info;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index 9787fda..d814a27 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -659,11 +659,9 @@ static int bt3c_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = bt3c_interrupt;
- link->irq.Instance = info;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index f44d752..d339464 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -588,11 +588,9 @@ static int btuart_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = btuart_interrupt;
- link->irq.Instance = info;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index 7cd8614..4f02a6f 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -573,11 +573,9 @@ static int dtl1_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = dtl1_interrupt;
- link->irq.Instance = info;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c
index 4c1820c..99cffda 100644
--- a/drivers/char/pcmcia/ipwireless/hardware.c
+++ b/drivers/char/pcmcia/ipwireless/hardware.c
@@ -1213,12 +1213,12 @@ static irqreturn_t ipwireless_handle_v2_v3_interrupt(int irq,
irqreturn_t ipwireless_interrupt(int irq, void *dev_id)
{
- struct ipw_hardware *hw = dev_id;
+ struct ipw_dev *ipw = dev_id;
- if (hw->hw_version == HW_VERSION_1)
- return ipwireless_handle_v1_interrupt(irq, hw);
+ if (ipw->hardware->hw_version == HW_VERSION_1)
+ return ipwireless_handle_v1_interrupt(irq, ipw->hardware);
else
- return ipwireless_handle_v2_v3_interrupt(irq, hw);
+ return ipwireless_handle_v2_v3_interrupt(irq, ipw->hardware);
}
static void flush_packets_to_hw(struct ipw_hardware *hw)
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 082146a..dff24da 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -93,8 +93,6 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
p_dev->io.NumPorts1 = cfg->io.win[0].len;
p_dev->io.IOAddrLines = 16;
- p_dev->irq.IRQInfo1 = cfg->irq.IRQInfo1;
-
/* 0x40 causes it to generate level mode interrupts. */
/* 0x04 enables IREQ pin. */
p_dev->conf.ConfigIndex = cfg->index | 0x44;
@@ -197,9 +195,8 @@ static int config_ipwireless(struct ipw_dev *ipw)
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = ipwireless_interrupt;
- link->irq.Instance = ipw->hardware;
INIT_WORK(&ipw->work_reboot, signalled_reboot_work);
@@ -315,7 +312,6 @@ static int ipwireless_attach(struct pcmcia_device *link)
ipw->link = link;
link->priv = ipw;
- link->irq.Instance = ipw;
/* Link this device into our device list. */
link->dev_node = &ipw->nodes[0];
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 09b2590..c31a0d9 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -554,7 +554,6 @@ static int mgslpc_probe(struct pcmcia_device *link)
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL;
link->conf.Attributes = 0;
@@ -609,9 +608,7 @@ static int mgslpc_config(struct pcmcia_device *link)
link->conf.ConfigIndex = 8;
link->conf.Present = PRESENT_OPTION;
- link->irq.Attributes |= IRQ_HANDLE_PRESENT;
link->irq.Handler = mgslpc_isr;
- link->irq.Instance = info;
ret = pcmcia_request_irq(link, &link->irq);
if (ret)
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c
index 6cee6c8..dd63963 100644
--- a/drivers/ide/ide-cs.c
+++ b/drivers/ide/ide-cs.c
@@ -103,7 +103,6 @@ static int ide_probe(struct pcmcia_device *link)
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.IOAddrLines = 3;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index d388ead..5a6ae64 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -111,8 +111,6 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
- p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
-
/* General socket configuration */
p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 6d963f9..f9bdff3 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -123,8 +123,6 @@ static int avma1cs_probe(struct pcmcia_device *p_dev)
p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
- p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
-
/* General socket configuration */
p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index cdcd297..a2f709f 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -138,7 +138,6 @@ static int elsa_cs_probe(struct pcmcia_device *link)
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID|IRQ_SHARE_ID;
link->irq.Handler = NULL;
/*
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 331716f..af5d393 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -145,7 +145,6 @@ static int sedlbauer_probe(struct pcmcia_device *link)
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL;
/*
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index 7b11c15..ea70539 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -128,7 +128,6 @@ static int teles_probe(struct pcmcia_device *link)
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID|IRQ_SHARE_ID;
link->irq.Handler = NULL;
/*
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 8b65e18..17a2722 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -283,10 +283,8 @@ static int tc574_probe(struct pcmcia_device *link)
spin_lock_init(&lp->window_lock);
link->io.NumPorts1 = 32;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = &el3_interrupt;
- link->irq.Instance = dev;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1;
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index c43c21d..6f8d7e2 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -194,10 +194,8 @@ static int tc589_probe(struct pcmcia_device *link)
spin_lock_init(&lp->lock);
link->io.NumPorts1 = 16;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = &el3_interrupt;
- link->irq.Instance = dev;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1;
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 0552ddd..800597b 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -170,7 +170,6 @@ static int axnet_probe(struct pcmcia_device *link)
info->p_dev = link;
link->priv = dev;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index 51e9cb0..21d9c9d 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -164,11 +164,10 @@ static int com20020_probe(struct pcmcia_device *p_dev)
p_dev->io.NumPorts1 = 16;
p_dev->io.IOAddrLines = 16;
p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
- p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
p_dev->conf.Attributes = CONF_ENABLE_IRQ;
p_dev->conf.IntType = INT_MEMORY_AND_IO;
- p_dev->irq.Instance = info->dev = dev;
+ info->dev = dev;
p_dev->priv = info;
return com20020_config(p_dev);
@@ -275,9 +274,8 @@ static int com20020_config(struct pcmcia_device *link)
ioaddr = dev->base_addr = link->io.BasePort1;
dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr);
- dev_dbg(&link->dev, "request IRQ %d (%Xh/%Xh)\n",
- link->irq.AssignedIRQ,
- link->irq.IRQInfo1, link->irq.IRQInfo2);
+ dev_dbg(&link->dev, "request IRQ %d\n",
+ link->irq.AssignedIRQ);
i = pcmcia_request_irq(link, &link->irq);
if (i != 0)
{
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 9b5ca37..6e3e1ce 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -255,10 +255,8 @@ static int fmvj18x_probe(struct pcmcia_device *link)
link->io.IOAddrLines = 5;
/* Interrupt setup */
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = &fjn_interrupt;
- link->irq.Instance = dev;
/* General socket configuration */
link->conf.Attributes = CONF_ENABLE_IRQ;
@@ -428,7 +426,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
if (link->io.NumPorts2 != 0) {
link->irq.Attributes =
- IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT;
+ IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
ret = mfc_try_io_port(link);
if (ret != 0) goto failed;
} else if (cardtype == UNGERMANN) {
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index 76706e1..37f4a6f 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -119,6 +119,12 @@ static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};
+static irqreturn_t ibmtr_interrupt(int irq, void *dev_id) {
+ ibmtr_dev_t *info = dev_id;
+ struct net_device *dev = info->dev;
+ return tok_interrupt(irq, dev);
+};
+
/*======================================================================
ibmtr_attach() creates an "instance" of the driver, allocating
@@ -150,14 +156,13 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 4;
link->io.IOAddrLines = 16;
- link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
- link->irq.Handler = &tok_interrupt;
+ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
+ link->irq.Handler = ibmtr_interrupt;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION;
- link->irq.Instance = info->dev = dev;
+ info->dev = dev;
SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index 2d0c6f9..dae5ef6 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -463,10 +463,8 @@ static int nmclan_probe(struct pcmcia_device *link)
link->io.NumPorts1 = 32;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 5;
- link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.Handler = &mace_interrupt;
- link->irq.Instance = dev;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1;
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 30baee7..de2d100 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -266,7 +266,6 @@ static int pcnet_probe(struct pcmcia_device *link)
link->priv = dev;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 2e795de..9e0da37 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -329,10 +329,8 @@ static int smc91c92_probe(struct pcmcia_device *link)
link->io.NumPorts1 = 16;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 4;
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = &smc_interrupt;
- link->irq.Instance = dev;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@@ -456,7 +454,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)
link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status = CCSR_AUDIO_ENA;
link->irq.Attributes =
- IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT;
+ IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
link->io.IOAddrLines = 16;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts2 = 8;
@@ -655,7 +653,7 @@ static int osi_config(struct pcmcia_device *link)
link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status = CCSR_AUDIO_ENA;
link->irq.Attributes =
- IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT;
+ IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
link->io.NumPorts1 = 64;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts2 = 8;
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index f75ac71..fe504b7 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -556,7 +556,6 @@ xirc2ps_probe(struct pcmcia_device *link)
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1;
link->irq.Handler = xirc2ps_interrupt;
- link->irq.Instance = dev;
/* Fill in card specific entries */
dev->netdev_ops = &netdev_ops;
@@ -835,8 +834,6 @@ xirc2ps_config(struct pcmcia_device * link)
link->io.IOAddrLines =10;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
- link->irq.Attributes = IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
if (local->modem) {
int pass;
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 7d3a96f..f6036fb 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -134,7 +134,6 @@ static int airo_probe(struct pcmcia_device *p_dev)
/* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
p_dev->irq.Handler = NULL;
/*
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 18a58b8..3240791 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -143,7 +143,6 @@ static int atmel_probe(struct pcmcia_device *p_dev)
/* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
p_dev->irq.Handler = NULL;
/*
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index 2588358..984174b 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -98,9 +98,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
goto err_disable;
dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
dev->irq.Handler = NULL; /* The handler is registered later. */
- dev->irq.Instance = NULL;
res = pcmcia_request_irq(dev, &dev->irq);
if (res != 0)
goto err_disable;
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 243e912..c9640a3 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -641,11 +641,8 @@ static int prism2_config(struct pcmcia_device *link)
* irq structure is initialized.
*/
if (link->conf.Attributes & CONF_ENABLE_IRQ) {
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING |
- IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = prism2_interrupt;
- link->irq.Instance = dev;
ret = pcmcia_request_irq(link, &link->irq);
if (ret)
goto failed;
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index f2b1655..b1d8459 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -837,7 +837,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.Handler = NULL;
- p_dev->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
p_dev->conf.Attributes = 0;
p_dev->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index f5333b7..e61e6b9 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -384,8 +384,7 @@ static int netwave_probe(struct pcmcia_device *link)
link->io.IOAddrLines = 5;
/* Interrupt setup */
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = &netwave_interrupt;
/* General socket configuration */
@@ -404,8 +403,6 @@ static int netwave_probe(struct pcmcia_device *link)
dev->watchdog_timeo = TX_TIMEOUT;
- link->irq.Instance = dev;
-
return netwave_pcmcia_config( link);
} /* netwave_attach */
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index 688b398..f27bb83 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -120,10 +120,8 @@ orinoco_cs_probe(struct pcmcia_device *link)
link->priv = priv;
/* Interrupt setup */
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = orinoco_interrupt;
- link->irq.Instance = priv;
/* General socket configuration defaults can go here. In this
* client, we assume very little, and rely on the CIS for
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index c609371..59bda24 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -194,10 +194,8 @@ spectrum_cs_probe(struct pcmcia_device *link)
link->priv = priv;
/* Interrupt setup */
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = orinoco_interrupt;
- link->irq.Instance = priv;
/* General socket configuration defaults can go here. In this
* client, we assume very little, and rely on the CIS for
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 5e0f4c3..91213f9 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -323,8 +323,7 @@ static int ray_probe(struct pcmcia_device *p_dev)
p_dev->io.IOAddrLines = 5;
/* Interrupt setup. For PCMCIA, driver takes what's given */
- p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.Handler = &ray_interrupt;
/* General socket configuration */
@@ -333,7 +332,6 @@ static int ray_probe(struct pcmcia_device *p_dev)
p_dev->conf.ConfigIndex = 1;
p_dev->priv = dev;
- p_dev->irq.Instance = dev;
local->finder = p_dev;
local->card_status = CARD_INSERTED;
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index df3579a..33918fd 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -4438,8 +4438,7 @@ wavelan_probe(struct pcmcia_device *p_dev)
p_dev->io.IOAddrLines = 3;
/* Interrupt setup */
- p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.Handler = wavelan_interrupt;
/* General socket configuration */
@@ -4451,7 +4450,7 @@ wavelan_probe(struct pcmcia_device *p_dev)
if (!dev)
return -ENOMEM;
- p_dev->priv = p_dev->irq.Instance = dev;
+ p_dev->priv = dev;
lp = netdev_priv(dev);
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 9a956c7..5f0401a 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1898,8 +1898,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev)
p_dev->io.IOAddrLines = 5;
/* Interrupt setup */
- p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
p_dev->irq.Handler = wl3501_interrupt;
/* General socket configuration */
@@ -1922,7 +1921,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev)
dev->wireless_handlers = &wl3501_handler_def;
SET_ETHTOOL_OPS(dev, &ops);
netif_stop_queue(dev);
- p_dev->priv = p_dev->irq.Instance = dev;
+ p_dev->priv = dev;
return wl3501_config(p_dev);
out_link:
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index e56a4de..7dd370f 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -106,7 +106,6 @@ static int parport_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 1f33ed6..e10b883 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -383,8 +383,8 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
s->irq.AssignedIRQ = 0;
}
- if (req->Attributes & IRQ_HANDLE_PRESENT) {
- free_irq(req->AssignedIRQ, req->Instance);
+ if (req->Handler) {
+ free_irq(req->AssignedIRQ, p_dev->priv);
}
#ifdef CONFIG_PCMCIA_PROBE
@@ -664,7 +664,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
/* if the underlying IRQ infrastructure allows for it, only allocate
* the IRQ, but do not enable it
*/
- if (!(req->Attributes & IRQ_HANDLE_PRESENT))
+ if (!(req->Handler))
type |= IRQ_NOAUTOEN;
#endif /* IRQ_NOAUTOEN */
@@ -674,7 +674,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
} else {
int try;
u32 mask = s->irq_mask;
- void *data = &p_dev->dev.driver; /* something unique to this device */
+ void *data = p_dev; /* something unique to this device */
for (try = 0; try < 64; try++) {
irq = try % 32;
@@ -691,12 +691,12 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
* registering a dummy handle works, i.e. if the IRQ isn't
* marked as used by the kernel resource management core */
ret = request_irq(irq,
- (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action,
+ (req->Handler) ? req->Handler : test_action,
type,
p_dev->devname,
- (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data);
+ (req->Handler) ? p_dev->priv : data);
if (!ret) {
- if (!(req->Attributes & IRQ_HANDLE_PRESENT))
+ if (!req->Handler)
free_irq(irq, data);
break;
}
@@ -713,9 +713,9 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
irq = s->pci_irq;
}
- if (ret && (req->Attributes & IRQ_HANDLE_PRESENT)) {
+ if (ret && req->Handler) {
ret = request_irq(irq, req->Handler, type,
- p_dev->devname, req->Instance);
+ p_dev->devname, p_dev->priv);
if (ret) {
dev_printk(KERN_INFO, &s->dev,
"request_irq() failed\n");
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
index 4329e4e..528733b 100644
--- a/drivers/scsi/pcmcia/aha152x_stub.c
+++ b/drivers/scsi/pcmcia/aha152x_stub.c
@@ -106,7 +106,6 @@ static int aha152x_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION;
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c
index 5792b55..9140406 100644
--- a/drivers/scsi/pcmcia/fdomain_stub.c
+++ b/drivers/scsi/pcmcia/fdomain_stub.c
@@ -89,7 +89,6 @@ static int fdomain_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION;
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 9dfd6f5..c2341af 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1564,12 +1564,10 @@ static int nsp_cs_probe(struct pcmcia_device *link)
link->io.IOAddrLines = 10; /* not used */
/* Interrupt setup */
- link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
/* Interrupt handler */
link->irq.Handler = &nspintr;
- link->irq.Instance = info;
link->irq.Attributes |= IRQF_SHARED;
/* General socket configuration */
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
index 65d7ad5..f85f094 100644
--- a/drivers/scsi/pcmcia/qlogic_stub.c
+++ b/drivers/scsi/pcmcia/qlogic_stub.c
@@ -162,7 +162,6 @@ static int qlogic_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION;
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index 851a41c..e7564d8 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -867,7 +867,6 @@ SYM53C500_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 8d651a6..5d6f947 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -334,7 +334,6 @@ static int serial_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
if (do_sound) {
link->conf.Attributes |= CONF_ENABLE_SPKR;
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c
index 9e75802..39923cb 100644
--- a/drivers/staging/comedi/drivers/cb_das16_cs.c
+++ b/drivers/staging/comedi/drivers/cb_das16_cs.c
@@ -703,7 +703,6 @@ static int das16cs_pcmcia_attach(struct pcmcia_device *link)
/* Initialize the pcmcia_device structure */
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL;
link->conf.Attributes = 0;
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c
index 384a77a..9b945e5 100644
--- a/drivers/staging/comedi/drivers/das08_cs.c
+++ b/drivers/staging/comedi/drivers/das08_cs.c
@@ -173,7 +173,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link)
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL;
/*
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
index 7328a84..ef5e118 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -503,7 +503,6 @@ static int dio700_cs_attach(struct pcmcia_device *link)
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL;
/*
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index 5056315..9017be3 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -254,7 +254,6 @@ static int dio24_cs_attach(struct pcmcia_device *link)
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = NULL;
/*
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c
index 7fb5058..7d514b3 100644
--- a/drivers/staging/comedi/drivers/ni_labpc_cs.c
+++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c
@@ -230,7 +230,6 @@ static int labpc_cs_attach(struct pcmcia_device *link)
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FORCED_PULSE;
- link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_PULSE_ID;
link->irq.Handler = NULL;
/*
diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c
index ca7ab4a..d692f4b 100644
--- a/drivers/staging/comedi/drivers/ni_mio_cs.c
+++ b/drivers/staging/comedi/drivers/ni_mio_cs.c
@@ -274,7 +274,6 @@ static int cs_attach(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
link->io.NumPorts1 = 16;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
@@ -325,9 +324,6 @@ static int mio_pcmcia_config_loop(struct pcmcia_device *p_dev,
p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
p_dev->io.NumPorts2 = 0;
- p_dev->irq.IRQInfo1 = cfg->irq.IRQInfo1;
- p_dev->irq.IRQInfo2 = cfg->irq.IRQInfo2;
-
for (base = 0x000; base < 0x400; base += 0x20) {
p_dev->io.BasePort1 = base;
ret = pcmcia_request_io(p_dev, &p_dev->io);
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
index 48e7c27..5256fd9 100644
--- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c
+++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
@@ -1041,10 +1041,8 @@ static int daqp_cs_attach(struct pcmcia_device *link)
link->priv = local;
/* Interrupt setup */
- link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
link->irq.Handler = daqp_interrupt;
- link->irq.Instance = local;
/*
General socket configuration defaults can go here. In this
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index f87aba6..39d253e 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -243,7 +243,6 @@ static int sl811_cs_probe(struct pcmcia_device *link)
/* Initialize */
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
- link->irq.IRQInfo1 = IRQ_INFO2_VALID|IRQ_LEVEL_ID;
link->irq.Handler = NULL;
link->conf.Attributes = 0;
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index 904468a..afc2bfb 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -15,6 +15,10 @@
#ifndef _LINUX_CS_H
#define _LINUX_CS_H
+#ifdef __KERNEL__
+#include <linux/interrupt.h>
+#endif
+
/* For AccessConfigurationRegister */
typedef struct conf_reg_t {
u_char Function;
@@ -111,11 +115,9 @@ typedef struct io_req_t {
/* For RequestIRQ and ReleaseIRQ */
typedef struct irq_req_t {
- u_int Attributes;
- u_int AssignedIRQ;
- u_int IRQInfo1, IRQInfo2; /* IRQInfo2 is ignored */
- void *Handler;
- void *Instance;
+ u_int Attributes;
+ u_int AssignedIRQ;
+ irq_handler_t Handler;
} irq_req_t;
/* Attributes for RequestIRQ and ReleaseIRQ */
@@ -125,7 +127,7 @@ typedef struct irq_req_t {
#define IRQ_TYPE_DYNAMIC_SHARING 0x02
#define IRQ_FORCED_PULSE 0x04
#define IRQ_FIRST_SHARED 0x08
-#define IRQ_HANDLE_PRESENT 0x10
+//#define IRQ_HANDLE_PRESENT 0x10
#define IRQ_PULSE_ALLOCATED 0x100
/* Bits in IRQInfo1 field */
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 447aaae..7717e01 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -142,12 +142,10 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.NumPorts1 = 16;
- link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT | IRQ_FORCED_PULSE;
+ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_FORCED_PULSE;
// link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
- link->irq.IRQInfo1 = 0 /* | IRQ_LEVEL_ID */;
link->irq.Handler = pdacf_interrupt;
- link->irq.Instance = pdacf;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 1;
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 5a5db48..7be3b33 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -161,11 +161,9 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl,
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.NumPorts1 = 16;
- link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
+ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = &snd_vx_irq_handler;
- link->irq.Instance = chip;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
--
1.6.0.4
From: Magnus Damm <[email protected]>
No logic changes, just pass struct pcmcia_device to pcmcia_map_mem_page()
[[email protected]: update to 2.6.31]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: Jiri Kosina <[email protected]>
CC: Karsten Keil <[email protected]>
Signed-off-by: Magnus Damm <[email protected]>
Signed-off-by: Dominik Brodowski <[email protected]>
---
drivers/char/pcmcia/ipwireless/main.c | 4 ++--
drivers/isdn/hisax/sedlbauer_cs.c | 2 +-
drivers/mtd/maps/pcmciamtd.c | 2 +-
drivers/net/pcmcia/fmvj18x_cs.c | 4 ++--
drivers/net/pcmcia/ibmtr_cs.c | 4 ++--
drivers/net/pcmcia/pcnet_cs.c | 4 ++--
drivers/net/pcmcia/smc91c92_cs.c | 2 +-
drivers/net/pcmcia/xirc2ps_cs.c | 2 +-
drivers/net/wireless/airo_cs.c | 2 +-
drivers/net/wireless/b43/pcmcia.c | 2 +-
drivers/net/wireless/netwave_cs.c | 2 +-
drivers/net/wireless/ray_cs.c | 6 +++---
drivers/net/wireless/wavelan_cs.c | 2 +-
drivers/pcmcia/pcmcia_resource.c | 5 ++++-
drivers/scsi/pcmcia/nsp_cs.c | 2 +-
drivers/staging/comedi/drivers/ni_daq_700.c | 2 +-
drivers/staging/comedi/drivers/ni_daq_dio24.c | 2 +-
drivers/staging/comedi/drivers/ni_labpc_cs.c | 2 +-
include/pcmcia/ds.h | 3 ++-
19 files changed, 29 insertions(+), 25 deletions(-)
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 91ca23d..10af1c0 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -125,7 +125,7 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
memreq_common_memory.CardOffset = cfg->mem.win[0].card_addr;
memreq_common_memory.Page = 0;
- ret = pcmcia_map_mem_page(ipw->handle_common_memory,
+ ret = pcmcia_map_mem_page(p_dev, ipw->handle_common_memory,
&memreq_common_memory);
if (ret != 0)
@@ -154,7 +154,7 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
memreq_attr_memory.CardOffset = 0;
memreq_attr_memory.Page = 0;
- ret = pcmcia_map_mem_page(ipw->handle_attr_memory,
+ ret = pcmcia_map_mem_page(p_dev, ipw->handle_attr_memory,
&memreq_attr_memory);
if (ret != 0)
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 33d7530..598e17a 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -276,7 +276,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
- if (pcmcia_map_mem_page(p_dev->win, &map) != 0)
+ if (pcmcia_map_mem_page(p_dev, p_dev->win, &map) != 0)
return -ENODEV;
}
return 0;
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
index 16d9985..80b9005 100644
--- a/drivers/mtd/maps/pcmciamtd.c
+++ b/drivers/mtd/maps/pcmciamtd.c
@@ -118,7 +118,7 @@ static caddr_t remap_window(struct map_info *map, unsigned long to)
DEBUG(2, "Remapping window from 0x%8.8x to 0x%8.8x",
dev->offset, mrq.CardOffset);
mrq.Page = 0;
- ret = pcmcia_map_mem_page(win, &mrq);
+ ret = pcmcia_map_mem_page(dev->p_dev, win, &mrq);
if (ret != 0)
return NULL;
dev->offset = mrq.CardOffset;
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 61726c8..6b9c79e 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -574,7 +574,7 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id)
base = ioremap(req.Base, req.Size);
mem.Page = 0;
mem.CardOffset = 0;
- pcmcia_map_mem_page(link->win, &mem);
+ pcmcia_map_mem_page(link, link->win, &mem);
/*
* MBH10304 CISTPL_FUNCE_LAN_NODE_ID format
@@ -630,7 +630,7 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link)
mem.Page = 0;
mem.CardOffset = 0;
- i = pcmcia_map_mem_page(link->win, &mem);
+ i = pcmcia_map_mem_page(link, link->win, &mem);
if (i != 0) {
iounmap(lp->base);
lp->base = NULL;
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index 7a985ca..6fc89eb 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -252,7 +252,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
mem.CardOffset = mmiobase;
mem.Page = 0;
- ret = pcmcia_map_mem_page(link->win, &mem);
+ ret = pcmcia_map_mem_page(link, link->win, &mem);
if (ret)
goto failed;
ti->mmio = ioremap(req.Base, req.Size);
@@ -269,7 +269,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
mem.CardOffset = srambase;
mem.Page = 0;
- ret = pcmcia_map_mem_page(info->sram_win_handle, &mem);
+ ret = pcmcia_map_mem_page(link, info->sram_win_handle, &mem);
if (ret)
goto failed;
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 4156a6c..75e6894 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -325,7 +325,7 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link)
mem.Page = 0;
for (i = 0; i < NR_INFO; i++) {
mem.CardOffset = hw_info[i].offset & ~(req.Size-1);
- pcmcia_map_mem_page(link->win, &mem);
+ pcmcia_map_mem_page(link, link->win, &mem);
base = &virt[hw_info[i].offset & (req.Size-1)];
if ((readb(base+0) == hw_info[i].a0) &&
(readb(base+2) == hw_info[i].a1) &&
@@ -1499,7 +1499,7 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg,
offset = mem.CardOffset % window_size;
mem.CardOffset -= offset;
mem.Page = 0;
- ret = pcmcia_map_mem_page(link->win, &mem);
+ ret = pcmcia_map_mem_page(link, link->win, &mem);
if (ret)
goto failed;
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 580ec44..4ceaa45 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -480,7 +480,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)
mem.CardOffset = mem.Page = 0;
if (smc->manfid == MANFID_MOTOROLA)
mem.CardOffset = link->conf.ConfigBase;
- i = pcmcia_map_mem_page(link->win, &mem);
+ i = pcmcia_map_mem_page(link, link->win, &mem);
if ((i == 0)
&& (smc->manfid == MANFID_MEGAHERTZ)
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index fbf9265..9bc4d60 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -932,7 +932,7 @@ xirc2ps_config(struct pcmcia_device * link)
local->dingo_ccr = ioremap(req.Base,0x1000) + 0x0800;
mem.CardOffset = 0x0;
mem.Page = 0;
- if ((err = pcmcia_map_mem_page(link->win, &mem)))
+ if ((err = pcmcia_map_mem_page(link, link->win, &mem)))
goto config_error;
/* Setup the CCRs; there are no infos in the CIS about the Ethernet
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index a1b84fc..2aa6978 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -261,7 +261,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev,
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
- if (pcmcia_map_mem_page(p_dev->win, &map) != 0)
+ if (pcmcia_map_mem_page(p_dev, p_dev->win, &map) != 0)
return -ENODEV;
}
/* If we got this far, we're cool! */
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index cd14b7e..c0a34bb 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -93,7 +93,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
mem.CardOffset = 0;
mem.Page = 0;
- res = pcmcia_map_mem_page(dev->win, &mem);
+ res = pcmcia_map_mem_page(dev, dev->win, &mem);
if (res != 0)
goto err_disable;
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index cbd85de..4a8c621 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -763,7 +763,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
if (ret)
goto failed;
mem.CardOffset = 0x20000; mem.Page = 0;
- ret = pcmcia_map_mem_page(link->win, &mem);
+ ret = pcmcia_map_mem_page(link, link->win, &mem);
if (ret)
goto failed;
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index ed32875..f719ffc 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -443,7 +443,7 @@ static int ray_config(struct pcmcia_device *link)
goto failed;
mem.CardOffset = 0x0000;
mem.Page = 0;
- ret = pcmcia_map_mem_page(link->win, &mem);
+ ret = pcmcia_map_mem_page(link, link->win, &mem);
if (ret)
goto failed;
local->sram = ioremap(req.Base, req.Size);
@@ -459,7 +459,7 @@ static int ray_config(struct pcmcia_device *link)
goto failed;
mem.CardOffset = 0x8000;
mem.Page = 0;
- ret = pcmcia_map_mem_page(local->rmem_handle, &mem);
+ ret = pcmcia_map_mem_page(link, local->rmem_handle, &mem);
if (ret)
goto failed;
local->rmem = ioremap(req.Base, req.Size);
@@ -475,7 +475,7 @@ static int ray_config(struct pcmcia_device *link)
goto failed;
mem.CardOffset = 0x0000;
mem.Page = 0;
- ret = pcmcia_map_mem_page(local->amem_handle, &mem);
+ ret = pcmcia_map_mem_page(link, local->amem_handle, &mem);
if (ret)
goto failed;
local->amem = ioremap(req.Base, req.Size);
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 2fad4ac..d4df25d 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -3885,7 +3885,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
dev->mem_end = dev->mem_start + req.Size;
mem.CardOffset = 0; mem.Page = 0;
- i = pcmcia_map_mem_page(link->win, &mem);
+ i = pcmcia_map_mem_page(link, link->win, &mem);
if (i != 0)
break;
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 820a6e5..b60952a 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -234,9 +234,12 @@ int pcmcia_get_mem_page(window_handle_t win, memreq_t *req)
EXPORT_SYMBOL(pcmcia_get_mem_page);
-int pcmcia_map_mem_page(window_handle_t win, memreq_t *req)
+int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t wh,
+ memreq_t *req)
{
struct pcmcia_socket *s;
+ window_handle_t win = wh;
+
if ((win == NULL) || (win->magic != WINDOW_MAGIC))
return -EINVAL;
s = win->sock;
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index e32c344..c54108f 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1687,7 +1687,7 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,
if (pcmcia_request_window(&p_dev, &cfg_mem->req, &p_dev->win) != 0)
goto next_entry;
map.Page = 0; map.CardOffset = mem->win[0].card_addr;
- if (pcmcia_map_mem_page(p_dev->win, &map) != 0)
+ if (pcmcia_map_mem_page(p_dev, p_dev->win, &map) != 0)
goto next_entry;
cfg_mem->data->MmioAddress = (unsigned long) ioremap_nocache(cfg_mem->req.Base, cfg_mem->req.Size);
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
index e06d5b2..aeb85b3 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -616,7 +616,7 @@ static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev,
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
- if (pcmcia_map_mem_page(p_dev->win, &map))
+ if (pcmcia_map_mem_page(p_dev, p_dev->win, &map))
return -ENODEV;
}
/* If we got this far, we're cool! */
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index 9257a42..0968a67 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -367,7 +367,7 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
- if (pcmcia_map_mem_page(p_dev->win, &map))
+ if (pcmcia_map_mem_page(p_dev, p_dev->win, &map))
return -ENODEV;
}
/* If we got this far, we're cool! */
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c
index 28ff4a6..b4c7dfa 100644
--- a/drivers/staging/comedi/drivers/ni_labpc_cs.c
+++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c
@@ -346,7 +346,7 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
- if (pcmcia_map_mem_page(p_dev->win, &map))
+ if (pcmcia_map_mem_page(p_dev, p_dev->win, &map))
return -ENODEV;
}
/* If we got this far, we're cool! */
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index 40b098d..f240bfa 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -204,7 +204,8 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req,
int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t win);
int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
-int pcmcia_map_mem_page(window_handle_t win, memreq_t *req);
+int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t win,
+ memreq_t *req);
int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod);
void pcmcia_disable_device(struct pcmcia_device *p_dev);
--
1.6.0.4
pcmcia_request_window() only needs a pointer to struct pcmcia_device, not
a pointer to a pointer.
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: Jiri Kosina <[email protected]>
CC: Karsten Keil <[email protected]>
Signed-off-by: Dominik Brodowski <[email protected]>
---
drivers/char/pcmcia/ipwireless/main.c | 4 ++--
drivers/isdn/hisax/sedlbauer_cs.c | 2 +-
drivers/mtd/maps/pcmciamtd.c | 2 +-
drivers/net/pcmcia/fmvj18x_cs.c | 4 ++--
drivers/net/pcmcia/ibmtr_cs.c | 4 ++--
drivers/net/pcmcia/pcnet_cs.c | 4 ++--
drivers/net/pcmcia/smc91c92_cs.c | 2 +-
drivers/net/pcmcia/xirc2ps_cs.c | 2 +-
drivers/net/wireless/airo_cs.c | 2 +-
drivers/net/wireless/b43/pcmcia.c | 2 +-
drivers/net/wireless/netwave_cs.c | 2 +-
drivers/net/wireless/ray_cs.c | 6 +++---
drivers/net/wireless/wavelan_cs.c | 2 +-
drivers/pcmcia/pcmcia_resource.c | 6 +++---
drivers/scsi/pcmcia/nsp_cs.c | 2 +-
drivers/staging/comedi/drivers/ni_daq_700.c | 2 +-
drivers/staging/comedi/drivers/ni_daq_dio24.c | 2 +-
drivers/staging/comedi/drivers/ni_labpc_cs.c | 2 +-
include/pcmcia/ds.h | 2 +-
19 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 10af1c0..082146a 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -116,7 +116,7 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
ipw->request_common_memory.Size = 0x1000;
ipw->request_common_memory.AccessSpeed = 0;
- ret = pcmcia_request_window(&p_dev, &ipw->request_common_memory,
+ ret = pcmcia_request_window(p_dev, &ipw->request_common_memory,
&ipw->handle_common_memory);
if (ret != 0)
@@ -145,7 +145,7 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
ipw->request_attr_memory.Size = 0; /* this used to be 0x1000 */
ipw->request_attr_memory.AccessSpeed = 0;
- ret = pcmcia_request_window(&p_dev, &ipw->request_attr_memory,
+ ret = pcmcia_request_window(p_dev, &ipw->request_attr_memory,
&ipw->handle_attr_memory);
if (ret != 0)
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 598e17a..331716f 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -272,7 +272,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
req->Base = mem->win[0].host_addr;
req->Size = mem->win[0].len;
req->AccessSpeed = 0;
- if (pcmcia_request_window(&p_dev, req, &p_dev->win) != 0)
+ if (pcmcia_request_window(p_dev, req, &p_dev->win) != 0)
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
index 80b9005..689d6a7 100644
--- a/drivers/mtd/maps/pcmciamtd.c
+++ b/drivers/mtd/maps/pcmciamtd.c
@@ -530,7 +530,7 @@ static int pcmciamtd_config(struct pcmcia_device *link)
int ret;
DEBUG(2, "requesting window with size = %dKiB memspeed = %d",
req.Size >> 10, req.AccessSpeed);
- ret = pcmcia_request_window(&link, &req, &link->win);
+ ret = pcmcia_request_window(link, &req, &link->win);
DEBUG(2, "ret = %d dev->win_size = %d", ret, dev->win_size);
if(ret) {
req.Size >>= 1;
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 6b9c79e..85f7c45 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -567,7 +567,7 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id)
req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;
req.Base = 0; req.Size = 0;
req.AccessSpeed = 0;
- i = pcmcia_request_window(&link, &req, &link->win);
+ i = pcmcia_request_window(link, &req, &link->win);
if (i != 0)
return -1;
@@ -618,7 +618,7 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link)
req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;
req.Base = 0; req.Size = 0;
req.AccessSpeed = 0;
- i = pcmcia_request_window(&link, &req, &link->win);
+ i = pcmcia_request_window(link, &req, &link->win);
if (i != 0)
return -1;
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index 6fc89eb..14fe5fa 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -246,7 +246,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
req.Base = 0;
req.Size = 0x2000;
req.AccessSpeed = 250;
- ret = pcmcia_request_window(&link, &req, &link->win);
+ ret = pcmcia_request_window(link, &req, &link->win);
if (ret)
goto failed;
@@ -263,7 +263,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
req.Base = 0;
req.Size = sramsize * 1024;
req.AccessSpeed = 250;
- ret = pcmcia_request_window(&link, &req, &info->sram_win_handle);
+ ret = pcmcia_request_window(link, &req, &info->sram_win_handle);
if (ret)
goto failed;
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 518b094..d06a0ce 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -317,7 +317,7 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link)
req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;
req.Base = 0; req.Size = 0;
req.AccessSpeed = 0;
- i = pcmcia_request_window(&link, &req, &link->win);
+ i = pcmcia_request_window(link, &req, &link->win);
if (i != 0)
return NULL;
@@ -1491,7 +1491,7 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg,
req.Attributes |= WIN_USE_WAIT;
req.Base = 0; req.Size = window_size;
req.AccessSpeed = mem_speed;
- ret = pcmcia_request_window(&link, &req, &link->win);
+ ret = pcmcia_request_window(link, &req, &link->win);
if (ret)
goto failed;
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 4ceaa45..c6ca376 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -472,7 +472,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)
req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;
req.Base = req.Size = 0;
req.AccessSpeed = 0;
- i = pcmcia_request_window(&link, &req, &link->win);
+ i = pcmcia_request_window(link, &req, &link->win);
if (i != 0)
return -ENODEV;
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 9bc4d60..265852a 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -926,7 +926,7 @@ xirc2ps_config(struct pcmcia_device * link)
req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;
req.Base = req.Size = 0;
req.AccessSpeed = 0;
- if ((err = pcmcia_request_window(&link, &req, &link->win)))
+ if ((err = pcmcia_request_window(link, &req, &link->win)))
goto config_error;
local->dingo_ccr = ioremap(req.Base,0x1000) + 0x0800;
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 2aa6978..34d775c 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -257,7 +257,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev,
req->Base = mem->win[0].host_addr;
req->Size = mem->win[0].len;
req->AccessSpeed = 0;
- if (pcmcia_request_window(&p_dev, req, &p_dev->win) != 0)
+ if (pcmcia_request_window(p_dev, req, &p_dev->win) != 0)
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index c0a34bb..2588358 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -87,7 +87,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
win.Base = 0;
win.Size = SSB_CORE_SIZE;
win.AccessSpeed = 250;
- res = pcmcia_request_window(&dev, &win, &dev->win);
+ res = pcmcia_request_window(dev, &win, &dev->win);
if (res != 0)
goto err_kfree_ssb;
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index 4a8c621..bd4eff7 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -759,7 +759,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_CM|WIN_ENABLE;
req.Base = 0; req.Size = 0x8000;
req.AccessSpeed = mem_speed;
- ret = pcmcia_request_window(&link, &req, &link->win);
+ ret = pcmcia_request_window(link, &req, &link->win);
if (ret)
goto failed;
mem.CardOffset = 0x20000; mem.Page = 0;
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index f719ffc..66e2d10 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -438,7 +438,7 @@ static int ray_config(struct pcmcia_device *link)
req.Base = 0;
req.Size = 0x8000;
req.AccessSpeed = ray_mem_speed;
- ret = pcmcia_request_window(&link, &req, &link->win);
+ ret = pcmcia_request_window(link, &req, &link->win);
if (ret)
goto failed;
mem.CardOffset = 0x0000;
@@ -454,7 +454,7 @@ static int ray_config(struct pcmcia_device *link)
req.Base = 0;
req.Size = 0x4000;
req.AccessSpeed = ray_mem_speed;
- ret = pcmcia_request_window(&link, &req, &local->rmem_handle);
+ ret = pcmcia_request_window(link, &req, &local->rmem_handle);
if (ret)
goto failed;
mem.CardOffset = 0x8000;
@@ -470,7 +470,7 @@ static int ray_config(struct pcmcia_device *link)
req.Base = 0;
req.Size = 0x1000;
req.AccessSpeed = ray_mem_speed;
- ret = pcmcia_request_window(&link, &req, &local->amem_handle);
+ ret = pcmcia_request_window(link, &req, &local->amem_handle);
if (ret)
goto failed;
mem.CardOffset = 0x0000;
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index d4df25d..f8c5166 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -3876,7 +3876,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;
req.Base = req.Size = 0;
req.AccessSpeed = mem_speed;
- i = pcmcia_request_window(&link, &req, &link->win);
+ i = pcmcia_request_window(link, &req, &link->win);
if (i != 0)
break;
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index fd20b1a..1f33ed6 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -752,9 +752,9 @@ EXPORT_SYMBOL(pcmcia_request_irq);
* Request_window() establishes a mapping between card memory space
* and system memory space.
*/
-int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh)
+int pcmcia_request_window(struct pcmcia_device *p_dev, win_req_t *req, window_handle_t *wh)
{
- struct pcmcia_socket *s = (*p_dev)->socket;
+ struct pcmcia_socket *s = p_dev->socket;
pccard_mem_map *win;
u_long align;
int w;
@@ -804,7 +804,7 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
return -EINVAL;
}
}
- (*p_dev)->_win |= CLIENT_WIN_REQ(w);
+ p_dev->_win |= CLIENT_WIN_REQ(w);
/* Configure the socket controller */
win->map = w+1;
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index c54108f..9dfd6f5 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1684,7 +1684,7 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,
if (cfg_mem->req.Size < 0x1000)
cfg_mem->req.Size = 0x1000;
cfg_mem->req.AccessSpeed = 0;
- if (pcmcia_request_window(&p_dev, &cfg_mem->req, &p_dev->win) != 0)
+ if (pcmcia_request_window(p_dev, &cfg_mem->req, &p_dev->win) != 0)
goto next_entry;
map.Page = 0; map.CardOffset = mem->win[0].card_addr;
if (pcmcia_map_mem_page(p_dev, p_dev->win, &map) != 0)
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
index aeb85b3..7328a84 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -612,7 +612,7 @@ static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev,
if (req->Size < 0x1000)
req->Size = 0x1000;
req->AccessSpeed = 0;
- if (pcmcia_request_window(&p_dev, req, &p_dev->win))
+ if (pcmcia_request_window(p_dev, req, &p_dev->win))
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index 0968a67..5056315 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -363,7 +363,7 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
if (req->Size < 0x1000)
req->Size = 0x1000;
req->AccessSpeed = 0;
- if (pcmcia_request_window(&p_dev, req, &p_dev->win))
+ if (pcmcia_request_window(p_dev, req, &p_dev->win))
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c
index b4c7dfa..7fb5058 100644
--- a/drivers/staging/comedi/drivers/ni_labpc_cs.c
+++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c
@@ -342,7 +342,7 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,
if (req->Size < 0x1000)
req->Size = 0x1000;
req->AccessSpeed = 0;
- if (pcmcia_request_window(&p_dev, req, &p_dev->win))
+ if (pcmcia_request_window(p_dev, req, &p_dev->win))
return -ENODEV;
map.Page = 0;
map.CardOffset = mem->win[0].card_addr;
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index cbf5f05..d6c55fd 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -199,7 +199,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req);
int pcmcia_request_configuration(struct pcmcia_device *p_dev,
config_req_t *req);
-int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req,
+int pcmcia_request_window(struct pcmcia_device *p_dev, win_req_t *req,
window_handle_t *wh);
int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t win);
int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t win,
--
1.6.0.4