aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia/ipwireless
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2009-10-24 09:47:29 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2009-11-09 02:29:48 -0500
commitcbf624f0e18c4a05219855663a3e5f9fe8f2d876 (patch)
tree8aac18761959b45a29faaca79926966b46ac57d1 /drivers/char/pcmcia/ipwireless
parent9ac3e58ceff0b7b8b981c09c38a28742270eea12 (diff)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (char)
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of requiring manual settings of PCMCIA_DEBUG. Only some rare extra debug checks in cm4000_cs.c cm4040_cs.c are now hidden behind a "#ifdef CM4000_DEBUG" or "#ifdef CM4040_DEBUG". Also, remove all usages of the CS_CHECK macro and replace them with proper Linux style calling and return value checking. The extra error reporting may be dropped, as the PCMCIA core already complains about any (non-driver-author) errors. CC: Harald Welte <laforge@gnumonks.org> CC: Jiri Kosina <jkosina@suse.cz> CC: David Sterba <dsterba@suse.cz> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/char/pcmcia/ipwireless')
-rw-r--r--drivers/char/pcmcia/ipwireless/main.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 0f4674959917..24bffa4ece49 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -65,10 +65,7 @@ static void signalled_reboot_work(struct work_struct *work_reboot)
65 struct ipw_dev *ipw = container_of(work_reboot, struct ipw_dev, 65 struct ipw_dev *ipw = container_of(work_reboot, struct ipw_dev,
66 work_reboot); 66 work_reboot);
67 struct pcmcia_device *link = ipw->link; 67 struct pcmcia_device *link = ipw->link;
68 int ret = pcmcia_reset_card(link->socket); 68 pcmcia_reset_card(link->socket);
69
70 if (ret != 0)
71 cs_error(link, ResetCard, ret);
72} 69}
73 70
74static void signalled_reboot_callback(void *callback_data) 71static void signalled_reboot_callback(void *callback_data)
@@ -122,10 +119,8 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
122 ret = pcmcia_request_window(&p_dev, &ipw->request_common_memory, 119 ret = pcmcia_request_window(&p_dev, &ipw->request_common_memory,
123 &ipw->handle_common_memory); 120 &ipw->handle_common_memory);
124 121
125 if (ret != 0) { 122 if (ret != 0)
126 cs_error(p_dev, RequestWindow, ret);
127 goto exit1; 123 goto exit1;
128 }
129 124
130 memreq_common_memory.CardOffset = cfg->mem.win[0].card_addr; 125 memreq_common_memory.CardOffset = cfg->mem.win[0].card_addr;
131 memreq_common_memory.Page = 0; 126 memreq_common_memory.Page = 0;
@@ -133,10 +128,8 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
133 ret = pcmcia_map_mem_page(ipw->handle_common_memory, 128 ret = pcmcia_map_mem_page(ipw->handle_common_memory,
134 &memreq_common_memory); 129 &memreq_common_memory);
135 130
136 if (ret != 0) { 131 if (ret != 0)
137 cs_error(p_dev, MapMemPage, ret);
138 goto exit2; 132 goto exit2;
139 }
140 133
141 ipw->is_v2_card = cfg->mem.win[0].len == 0x100; 134 ipw->is_v2_card = cfg->mem.win[0].len == 0x100;
142 135
@@ -155,10 +148,8 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
155 ret = pcmcia_request_window(&p_dev, &ipw->request_attr_memory, 148 ret = pcmcia_request_window(&p_dev, &ipw->request_attr_memory,
156 &ipw->handle_attr_memory); 149 &ipw->handle_attr_memory);
157 150
158 if (ret != 0) { 151 if (ret != 0)
159 cs_error(p_dev, RequestWindow, ret);
160 goto exit2; 152 goto exit2;
161 }
162 153
163 memreq_attr_memory.CardOffset = 0; 154 memreq_attr_memory.CardOffset = 0;
164 memreq_attr_memory.Page = 0; 155 memreq_attr_memory.Page = 0;
@@ -166,10 +157,8 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
166 ret = pcmcia_map_mem_page(ipw->handle_attr_memory, 157 ret = pcmcia_map_mem_page(ipw->handle_attr_memory,
167 &memreq_attr_memory); 158 &memreq_attr_memory);
168 159
169 if (ret != 0) { 160 if (ret != 0)
170 cs_error(p_dev, MapMemPage, ret);
171 goto exit3; 161 goto exit3;
172 }
173 162
174 ipw->attr_memory = ioremap(ipw->request_attr_memory.Base, 163 ipw->attr_memory = ioremap(ipw->request_attr_memory.Base,
175 ipw->request_attr_memory.Size); 164 ipw->request_attr_memory.Size);
@@ -202,10 +191,8 @@ static int config_ipwireless(struct ipw_dev *ipw)
202 ipw->is_v2_card = 0; 191 ipw->is_v2_card = 0;
203 192
204 ret = pcmcia_loop_config(link, ipwireless_probe, ipw); 193 ret = pcmcia_loop_config(link, ipwireless_probe, ipw);
205 if (ret != 0) { 194 if (ret != 0)
206 cs_error(link, RequestIO, ret);
207 return ret; 195 return ret;
208 }
209 196
210 link->conf.Attributes = CONF_ENABLE_IRQ; 197 link->conf.Attributes = CONF_ENABLE_IRQ;
211 link->conf.IntType = INT_MEMORY_AND_IO; 198 link->conf.IntType = INT_MEMORY_AND_IO;
@@ -223,10 +210,8 @@ static int config_ipwireless(struct ipw_dev *ipw)
223 210
224 ret = pcmcia_request_irq(link, &link->irq); 211 ret = pcmcia_request_irq(link, &link->irq);
225 212
226 if (ret != 0) { 213 if (ret != 0)
227 cs_error(link, RequestIRQ, ret);
228 goto exit; 214 goto exit;
229 }
230 215
231 printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": Card type %s\n", 216 printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": Card type %s\n",
232 ipw->is_v2_card ? "V2/V3" : "V1"); 217 ipw->is_v2_card ? "V2/V3" : "V1");
@@ -263,10 +248,8 @@ static int config_ipwireless(struct ipw_dev *ipw)
263 */ 248 */
264 ret = pcmcia_request_configuration(link, &link->conf); 249 ret = pcmcia_request_configuration(link, &link->conf);
265 250
266 if (ret != 0) { 251 if (ret != 0)
267 cs_error(link, RequestConfiguration, ret);
268 goto exit; 252 goto exit;
269 }
270 253
271 link->dev_node = &ipw->nodes[0]; 254 link->dev_node = &ipw->nodes[0];
272 255
@@ -347,7 +330,6 @@ static int ipwireless_attach(struct pcmcia_device *link)
347 ret = config_ipwireless(ipw); 330 ret = config_ipwireless(ipw);
348 331
349 if (ret != 0) { 332 if (ret != 0) {
350 cs_error(link, RegisterClient, ret);
351 ipwireless_detach(link); 333 ipwireless_detach(link);
352 return ret; 334 return ret;
353 } 335 }