.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Low-level parallel-support for PC-style hardware integrated in the |
---|
3 | 4 | * LASI-Controller (on GSC-Bus) for HP-PARISC Workstations |
---|
4 | 5 | * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License as published by |
---|
7 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
8 | | - * (at your option) any later version. |
---|
9 | | - * |
---|
10 | 6 | * (C) 1999-2001 by Helge Deller <deller@gmx.de> |
---|
11 | | - * |
---|
12 | 7 | * |
---|
13 | 8 | * based on parport_pc.c by |
---|
14 | 9 | * Grant Guenther <grant@torque.net> |
---|
.. | .. |
---|
243 | 238 | |
---|
244 | 239 | priv = kzalloc (sizeof (struct parport_gsc_private), GFP_KERNEL); |
---|
245 | 240 | if (!priv) { |
---|
246 | | - printk (KERN_DEBUG "parport (0x%lx): no memory!\n", base); |
---|
| 241 | + printk(KERN_DEBUG "parport (0x%lx): no memory!\n", base); |
---|
247 | 242 | return NULL; |
---|
248 | 243 | } |
---|
249 | 244 | ops = kmemdup(&parport_gsc_ops, sizeof(struct parport_operations), |
---|
250 | 245 | GFP_KERNEL); |
---|
251 | 246 | if (!ops) { |
---|
252 | | - printk (KERN_DEBUG "parport (0x%lx): no memory for ops!\n", |
---|
253 | | - base); |
---|
| 247 | + printk(KERN_DEBUG "parport (0x%lx): no memory for ops!\n", |
---|
| 248 | + base); |
---|
254 | 249 | kfree (priv); |
---|
255 | 250 | return NULL; |
---|
256 | 251 | } |
---|
.. | .. |
---|
287 | 282 | p->size = (p->modes & PARPORT_MODE_EPP)?8:3; |
---|
288 | 283 | p->private_data = priv; |
---|
289 | 284 | |
---|
290 | | - printk(KERN_INFO "%s: PC-style at 0x%lx", p->name, p->base); |
---|
| 285 | + pr_info("%s: PC-style at 0x%lx", p->name, p->base); |
---|
291 | 286 | p->irq = irq; |
---|
292 | 287 | if (p->irq == PARPORT_IRQ_AUTO) { |
---|
293 | 288 | p->irq = PARPORT_IRQ_NONE; |
---|
.. | .. |
---|
304 | 299 | p->dma = PARPORT_DMA_NONE; |
---|
305 | 300 | |
---|
306 | 301 | pr_cont(" ["); |
---|
307 | | -#define printmode(x) {if(p->modes&PARPORT_MODE_##x){pr_cont("%s%s",f?",":"",#x);f++;}} |
---|
| 302 | +#define printmode(x) \ |
---|
| 303 | +do { \ |
---|
| 304 | + if (p->modes & PARPORT_MODE_##x) \ |
---|
| 305 | + pr_cont("%s%s", f++ ? "," : "", #x); \ |
---|
| 306 | +} while (0) |
---|
308 | 307 | { |
---|
309 | 308 | int f = 0; |
---|
310 | 309 | printmode(PCSPP); |
---|
311 | 310 | printmode(TRISTATE); |
---|
312 | | - printmode(COMPAT) |
---|
| 311 | + printmode(COMPAT); |
---|
313 | 312 | printmode(EPP); |
---|
314 | 313 | // printmode(ECP); |
---|
315 | 314 | // printmode(DMA); |
---|
.. | .. |
---|
320 | 319 | if (p->irq != PARPORT_IRQ_NONE) { |
---|
321 | 320 | if (request_irq (p->irq, parport_irq_handler, |
---|
322 | 321 | 0, p->name, p)) { |
---|
323 | | - printk (KERN_WARNING "%s: irq %d in use, " |
---|
324 | | - "resorting to polled operation\n", |
---|
| 322 | + pr_warn("%s: irq %d in use, resorting to polled operation\n", |
---|
325 | 323 | p->name, p->irq); |
---|
326 | 324 | p->irq = PARPORT_IRQ_NONE; |
---|
327 | 325 | p->dma = PARPORT_DMA_NONE; |
---|
.. | .. |
---|
352 | 350 | unsigned long port; |
---|
353 | 351 | |
---|
354 | 352 | if (!dev->irq) { |
---|
355 | | - printk(KERN_WARNING "IRQ not found for parallel device at 0x%llx\n", |
---|
| 353 | + pr_warn("IRQ not found for parallel device at 0x%llx\n", |
---|
356 | 354 | (unsigned long long)dev->hpa.start); |
---|
357 | 355 | return -ENODEV; |
---|
358 | 356 | } |
---|
.. | .. |
---|
365 | 363 | if (boot_cpu_data.cpu_type > pcxt && !pdc_add_valid(port+4)) { |
---|
366 | 364 | |
---|
367 | 365 | /* Initialize bidirectional-mode (0x10) & data-tranfer-mode #1 (0x20) */ |
---|
368 | | - printk("%s: initialize bidirectional-mode.\n", __func__); |
---|
| 366 | + pr_info("%s: initialize bidirectional-mode\n", __func__); |
---|
369 | 367 | parport_writeb ( (0x10 + 0x20), port + 4); |
---|
370 | 368 | |
---|
371 | 369 | } else { |
---|
372 | | - printk("%s: enhanced parport-modes not supported.\n", __func__); |
---|
| 370 | + pr_info("%s: enhanced parport-modes not supported\n", __func__); |
---|
373 | 371 | } |
---|
374 | 372 | |
---|
375 | 373 | p = parport_gsc_probe_port(port, 0, dev->irq, |
---|