]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer
authorDominik Brodowski <linux@dominikbrodowski.net>
Tue, 3 Nov 2009 00:31:52 +0000 (01:31 +0100)
committerDominik Brodowski <linux@dominikbrodowski.net>
Sat, 28 Nov 2009 17:02:58 +0000 (18:02 +0100)
pcmcia_request_window() only needs a pointer to struct pcmcia_device, not
a pointer to a pointer.

CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
Acked-by: Karsten Keil <keil@b1-systems.de> (for ISDN)
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 files changed:
drivers/char/pcmcia/ipwireless/main.c
drivers/isdn/hisax/sedlbauer_cs.c
drivers/mtd/maps/pcmciamtd.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/ibmtr_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/net/wireless/airo_cs.c
drivers/net/wireless/b43/pcmcia.c
drivers/net/wireless/netwave_cs.c
drivers/net/wireless/ray_cs.c
drivers/net/wireless/wavelan_cs.c
drivers/pcmcia/pcmcia_resource.c
drivers/scsi/pcmcia/nsp_cs.c
drivers/staging/comedi/drivers/ni_daq_700.c
drivers/staging/comedi/drivers/ni_daq_dio24.c
drivers/staging/comedi/drivers/ni_labpc_cs.c
include/pcmcia/ds.h

index 10af1c0dc36872f3e097a65e3c015577b84bd52d..082146a26c87cc266ef94942e67d15ac3d6df2d8 100644 (file)
@@ -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)
index 598e17a551b76e6561f797bc479593bbf6ad8550..331716fc6b30517aaf33b5bf8349d29efd2344a7 100644 (file)
@@ -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;
index 80b9005c37361bb4bcb789e622a4811f8f05af31..689d6a79ffc0ed239b3ccdbae50e035b723c7351 100644 (file)
@@ -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;
index 6b9c79e4a2c0decc693bed0f9d42e14f570d3dc0..85f7c45627074413ce865e951c77e6cb59adf51a 100644 (file)
@@ -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;
 
index 6fc89eba9c8fe9c473daddf444f4073bea50d47b..14fe5fa35d862ac952e49ea6c18b5544c07a47fc 100644 (file)
@@ -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;
 
index 518b094c9f6dc0972e5fabc94dfe56fae9525f0e..d06a0ce7cb89bf7d70de6637fce09697c9f9bcab 100644 (file)
@@ -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;
 
index 4ceaa45d7d813e04065b20037f3672acf439ecb2..c6ca3764ab6dd54cf1cd08eb16156d81ae4c314d 100644 (file)
@@ -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;
 
index 9bc4d6002ae0357d76980354036c372fdffff9fb..265852ab1a2daffcb3532eb2f4490efd751fe893 100644 (file)
@@ -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;
index 2aa6978d76ca93e8b22a4aa77774c763afb4ed0f..34d775c18a31c111cfcb619c615be04c656ceabd 100644 (file)
@@ -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;
index c0a34bbcb8d5e809e96264611e9b92be457dd9bf..2588358294be552215cda65bf224ca4323df7a83 100644 (file)
@@ -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;
 
index 4a8c62126c55b3099d74c2b89ec881d03cca6b8b..bd4eff79bd138fc5a7d4c83816f36c05620ad1bf 100644 (file)
@@ -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; 
index f719ffcb3c749021a3d51f6d366d8695d0e53654..66e2d10cd75400dc8a0fb7061b1640384d7a48ec 100644 (file)
@@ -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;
index d4df25d329d4b55d7915991d6afeac2fffd0b5b2..f8c5166fffe0a89103079f68d8d8c7cb08b9f9e0 100644 (file)
@@ -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;
 
index 50468543d6077ea583667484a240e25f853de985..1cf7d54fb7e254a7711544a7afacc87681749775 100644 (file)
@@ -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;
index c54108fc89a1bbadac4ba2c9eac0c1f43ba6539a..9dfd6f510b655dae683ae0909ae329a308854d51 100644 (file)
@@ -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)
index aeb85b3ec7a7d5edcdfb8f829da6d3999aa1c40c..7328a84ac50008b49e9417cc6c0db715268d249f 100644 (file)
@@ -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;
index 0968a67b97cb460a239faefaffd9ba14c4b19b5e..505631553ef7a37a78a01e85b9b78a97300699b2 100644 (file)
@@ -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;
index b4c7dfa54638483275a9a14f1ea45db941f9a7d1..7fb5058ad43cb704c876b2d8e8e749c6ed0f1a4f 100644 (file)
@@ -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;
index cbf5f05745f2b9b9982d7cd9b6c9b4d7375079ad..d6c55fdf8d018c7aee027f298fd58ffc98e07868 100644 (file)
@@ -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,