Commit 5f1145d8 authored by Ondrej Zary's avatar Ondrej Zary Committed by Damien Le Moal

ata: pata_parport: use dev_* instead of printk

Use dev_info/dev_err/dev_dbg instead of printk.
Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarOndrej Zary <linux@zary.sk>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent 5b77db9c
...@@ -124,8 +124,8 @@ static void aten_log_adapter(struct pi_adapter *pi) ...@@ -124,8 +124,8 @@ static void aten_log_adapter(struct pi_adapter *pi)
{ char *mode_string[2] = {"4-bit","8-bit"}; { char *mode_string[2] = {"4-bit","8-bit"};
printk("aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port); dev_info(&pi->dev, "aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
} }
......
...@@ -435,9 +435,9 @@ static void bpck_log_adapter(struct pi_adapter *pi) ...@@ -435,9 +435,9 @@ static void bpck_log_adapter(struct pi_adapter *pi)
printk(" %64.64s\n", &scratch[64]); printk(" %64.64s\n", &scratch[64]);
#endif #endif
printk("bpck %s, backpack %8.8s unit %d", dev_info(&pi->dev, "bpck %s, backpack %8.8s unit %d",
BPCK_VERSION, &scratch[110], pi->unit); BPCK_VERSION, &scratch[110], pi->unit);
printk(" at 0x%x, mode %d (%s), delay %d\n",pi->port, dev_info(&pi->dev, " at 0x%x, mode %d (%s), delay %d\n", pi->port,
pi->mode,mode_string[pi->mode],pi->delay); pi->mode,mode_string[pi->mode],pi->delay);
} }
......
...@@ -90,10 +90,7 @@ static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len) ...@@ -90,10 +90,7 @@ static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len)
static void bpck6_connect(struct pi_adapter *pi) static void bpck6_connect(struct pi_adapter *pi)
{ {
if(verbose) dev_dbg(&pi->dev, "connect\n");
{
printk(KERN_DEBUG "connect\n");
}
if(pi->mode >=2) if(pi->mode >=2)
{ {
...@@ -114,22 +111,16 @@ static void bpck6_connect(struct pi_adapter *pi) ...@@ -114,22 +111,16 @@ static void bpck6_connect(struct pi_adapter *pi)
static void bpck6_disconnect(struct pi_adapter *pi) static void bpck6_disconnect(struct pi_adapter *pi)
{ {
if(verbose) dev_dbg(&pi->dev, "disconnect\n");
{
printk("disconnect\n");
}
ppc6_wr_extout(PPCSTRUCT(pi),0x0); ppc6_wr_extout(PPCSTRUCT(pi),0x0);
ppc6_close(PPCSTRUCT(pi)); ppc6_close(PPCSTRUCT(pi));
} }
static int bpck6_test_port(struct pi_adapter *pi) /* check for 8-bit port */ static int bpck6_test_port(struct pi_adapter *pi) /* check for 8-bit port */
{ {
if(verbose) dev_dbg(&pi->dev, "PARPORT indicates modes=%x for lp=0x%lx\n",
{ ((struct pardevice *)(pi->pardev))->port->modes,
printk(KERN_DEBUG "PARPORT indicates modes=%x for lp=0x%lx\n", ((struct pardevice *)(pi->pardev))->port->base);
((struct pardevice*)(pi->pardev))->port->modes,
((struct pardevice *)(pi->pardev))->port->base);
}
/*copy over duplicate stuff.. initialize state info*/ /*copy over duplicate stuff.. initialize state info*/
PPCSTRUCT(pi)->ppc_id=pi->unit; PPCSTRUCT(pi)->ppc_id=pi->unit;
...@@ -158,10 +149,7 @@ static int bpck6_probe_unit(struct pi_adapter *pi) ...@@ -158,10 +149,7 @@ static int bpck6_probe_unit(struct pi_adapter *pi)
{ {
int out; int out;
if(verbose) dev_dbg(&pi->dev, "PROBE UNIT %x on port:%x\n", pi->unit, pi->port);
{
printk(KERN_DEBUG "PROBE UNIT %x on port:%x\n",pi->unit,pi->port);
}
/*SET PPC UNIT NUMBER*/ /*SET PPC UNIT NUMBER*/
PPCSTRUCT(pi)->ppc_id=pi->unit; PPCSTRUCT(pi)->ppc_id=pi->unit;
...@@ -171,26 +159,17 @@ static int bpck6_probe_unit(struct pi_adapter *pi) ...@@ -171,26 +159,17 @@ static int bpck6_probe_unit(struct pi_adapter *pi)
out=ppc6_open(PPCSTRUCT(pi)); out=ppc6_open(PPCSTRUCT(pi));
if(verbose) dev_dbg(&pi->dev, "ppc_open returned %2x\n", out);
{
printk(KERN_DEBUG "ppc_open returned %2x\n",out);
}
if(out) if(out)
{ {
ppc6_close(PPCSTRUCT(pi)); ppc6_close(PPCSTRUCT(pi));
if(verbose) dev_dbg(&pi->dev, "leaving probe\n");
{
printk(KERN_DEBUG "leaving probe\n");
}
return(1); return(1);
} }
else else
{ {
if(verbose) dev_dbg(&pi->dev, "Failed open\n");
{
printk(KERN_DEBUG "Failed open\n");
}
return(0); return(0);
} }
} }
...@@ -200,9 +179,9 @@ static void bpck6_log_adapter(struct pi_adapter *pi) ...@@ -200,9 +179,9 @@ static void bpck6_log_adapter(struct pi_adapter *pi)
char *mode_string[5]= char *mode_string[5]=
{"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"};
printk("BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", dev_info(&pi->dev, "BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n",
BACKPACK_VERSION, pi->port); BACKPACK_VERSION, pi->port);
printk("Unit: %d Mode:%d (%s) Delay %d\n", dev_info(&pi->dev, "Unit: %d Mode:%d (%s) Delay %d\n",
pi->unit,pi->mode,mode_string[pi->mode],pi->delay); pi->unit,pi->mode,mode_string[pi->mode],pi->delay);
} }
...@@ -215,7 +194,7 @@ static int bpck6_init_proto(struct pi_adapter *pi) ...@@ -215,7 +194,7 @@ static int bpck6_init_proto(struct pi_adapter *pi)
return 0; return 0;
} }
printk(KERN_ERR "ERROR COULDN'T ALLOCATE MEMORY\n"); dev_err(&pi->dev, "ERROR COULDN'T ALLOCATE MEMORY\n");
return -1; return -1;
} }
......
...@@ -183,8 +183,8 @@ static void comm_log_adapter(struct pi_adapter *pi) ...@@ -183,8 +183,8 @@ static void comm_log_adapter(struct pi_adapter *pi)
{ char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"};
printk("comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port); dev_info(&pi->dev, "comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
} }
......
...@@ -195,8 +195,8 @@ static void dstr_log_adapter(struct pi_adapter *pi) ...@@ -195,8 +195,8 @@ static void dstr_log_adapter(struct pi_adapter *pi)
{ char *mode_string[5] = {"4-bit","8-bit","EPP-8", { char *mode_string[5] = {"4-bit","8-bit","EPP-8",
"EPP-16","EPP-32"}; "EPP-16","EPP-32"};
printk("dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port); dev_info(&pi->dev, "dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
} }
......
...@@ -279,10 +279,8 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) ...@@ -279,10 +279,8 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
} }
epat_disconnect(pi); epat_disconnect(pi);
if (verbose) { dev_dbg(&pi->dev, "epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n",
printk("epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", pi->port, pi->mode, cc, e[0], e[1], f);
pi->port, pi->mode, cc, e[0], e[1], f);
}
return (e[0] && e[1]) || f; return (e[0] && e[1]) || f;
} }
...@@ -298,9 +296,9 @@ static void epat_log_adapter(struct pi_adapter *pi) ...@@ -298,9 +296,9 @@ static void epat_log_adapter(struct pi_adapter *pi)
ver = RR(0xb); ver = RR(0xb);
epat_disconnect(pi); epat_disconnect(pi);
printk("epat %s, Shuttle EPAT chip %x at 0x%x, ", dev_info(&pi->dev, "epat %s, Shuttle EPAT chip %x at 0x%x, ",
EPAT_VERSION, ver, pi->port); EPAT_VERSION, ver, pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
} }
......
...@@ -262,10 +262,8 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) ...@@ -262,10 +262,8 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
WR(0x84,0); WR(0x84,0);
epia_disconnect(pi); epia_disconnect(pi);
if (verbose) { dev_dbg(&pi->dev, "epia: port 0x%x, mode %d, test=(%d,%d,%d)\n",
printk("epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", pi->port, pi->mode, e[0], e[1], f);
pi->port, pi->mode, e[0], e[1], f);
}
return (e[0] && e[1]) || f; return (e[0] && e[1]) || f;
...@@ -277,8 +275,8 @@ static void epia_log_adapter(struct pi_adapter *pi) ...@@ -277,8 +275,8 @@ static void epia_log_adapter(struct pi_adapter *pi)
{ char *mode_string[6] = {"4-bit","5/3","8-bit", { char *mode_string[6] = {"4-bit","5/3","8-bit",
"EPP-8","EPP-16","EPP-32"}; "EPP-8","EPP-16","EPP-32"};
printk("epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); dev_info(&pi->dev, "epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
} }
......
...@@ -116,7 +116,7 @@ static void fit2_disconnect(struct pi_adapter *pi) ...@@ -116,7 +116,7 @@ static void fit2_disconnect(struct pi_adapter *pi)
static void fit2_log_adapter(struct pi_adapter *pi) static void fit2_log_adapter(struct pi_adapter *pi)
{ {
printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", dev_info(&pi->dev, "fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n",
FIT2_VERSION, pi->port, pi->delay); FIT2_VERSION, pi->port, pi->delay);
} }
......
...@@ -173,7 +173,7 @@ static void fit3_log_adapter(struct pi_adapter *pi) ...@@ -173,7 +173,7 @@ static void fit3_log_adapter(struct pi_adapter *pi)
{ char *mode_string[3] = {"4-bit","8-bit","EPP"}; { char *mode_string[3] = {"4-bit","8-bit","EPP"};
printk("fit3 %s, FIT 3000 adapter at 0x%x, " dev_info(&pi->dev, "fit3 %s, FIT 3000 adapter at 0x%x, "
"mode %d (%s), delay %d\n", "mode %d (%s), delay %d\n",
FIT3_VERSION, pi->port, FIT3_VERSION, pi->port,
pi->mode,mode_string[pi->mode],pi->delay); pi->mode,mode_string[pi->mode],pi->delay);
......
...@@ -207,10 +207,8 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) ...@@ -207,10 +207,8 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
for (k=0;k<128;k++) if (scratch[k] != k) r++; for (k=0;k<128;k++) if (scratch[k] != k) r++;
friq_disconnect(pi); friq_disconnect(pi);
if (verbose) { dev_dbg(&pi->dev, "friq: port 0x%x, mode %d, test=(%d,%d,%d)\n",
printk("friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", pi->port, pi->mode, e[0], e[1], r);
pi->port, pi->mode, e[0], e[1], r);
}
return (r || (e[0] && e[1])); return (r || (e[0] && e[1]));
} }
...@@ -221,9 +219,9 @@ static void friq_log_adapter(struct pi_adapter *pi) ...@@ -221,9 +219,9 @@ static void friq_log_adapter(struct pi_adapter *pi)
{ char *mode_string[6] = {"4-bit","8-bit", { char *mode_string[6] = {"4-bit","8-bit",
"EPP-8","EPP-16","EPP-32"}; "EPP-8","EPP-16","EPP-32"};
printk("friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", dev_info(&pi->dev, "friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ",
FRIQ_VERSION,pi->port); FRIQ_VERSION,pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
pi->private = 1; pi->private = 1;
......
...@@ -230,14 +230,12 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) ...@@ -230,14 +230,12 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
pi->private = frpw_test_pnp(pi) + 2*pi->port; pi->private = frpw_test_pnp(pi) + 2*pi->port;
if (((pi->private%2) == 0) && (pi->mode > 2)) { if (((pi->private%2) == 0) && (pi->mode > 2)) {
if (verbose) dev_dbg(&pi->dev, "frpw: Xilinx does not support mode %d\n", pi->mode);
printk("frpw: Xilinx does not support mode %d\n", pi->mode);
return 1; return 1;
} }
if (((pi->private%2) == 1) && (pi->mode == 2)) { if (((pi->private%2) == 1) && (pi->mode == 2)) {
if (verbose) dev_dbg(&pi->dev, "frpw: ASIC does not support mode 2\n");
printk("frpw: ASIC does not support mode 2\n");
return 1; return 1;
} }
...@@ -258,10 +256,8 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) ...@@ -258,10 +256,8 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose)
for (k=0;k<128;k++) if (scratch[k] != k) r++; for (k=0;k<128;k++) if (scratch[k] != k) r++;
frpw_disconnect(pi); frpw_disconnect(pi);
if (verbose) { dev_dbg(&pi->dev, "frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n",
printk("frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n", pi->port, (pi->private%2), pi->mode, e[0], e[1], r);
pi->port, (pi->private%2), pi->mode, e[0], e[1], r);
}
return (r || (e[0] && e[1])); return (r || (e[0] && e[1]));
} }
...@@ -272,9 +268,9 @@ static void frpw_log_adapter(struct pi_adapter *pi) ...@@ -272,9 +268,9 @@ static void frpw_log_adapter(struct pi_adapter *pi)
{ char *mode_string[6] = {"4-bit","8-bit","EPP", { char *mode_string[6] = {"4-bit","8-bit","EPP",
"EPP-8","EPP-16","EPP-32"}; "EPP-8","EPP-16","EPP-32"};
printk("frpw %s, Freecom (%s) adapter at 0x%x, ", dev_info(&pi->dev, "frpw %s, Freecom (%s) adapter at 0x%x, ",
FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port); FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
} }
......
...@@ -234,8 +234,8 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *chip) ...@@ -234,8 +234,8 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *chip)
{ char *mode_string[6] = {"4-bit","5/3","8-bit", { char *mode_string[6] = {"4-bit","5/3","8-bit",
"EPP-8","EPP_16","EPP-32"}; "EPP-8","EPP_16","EPP-32"};
printk("kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); dev_info(&pi->dev, "kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
} }
......
...@@ -93,7 +93,7 @@ static void ktti_disconnect(struct pi_adapter *pi) ...@@ -93,7 +93,7 @@ static void ktti_disconnect(struct pi_adapter *pi)
static void ktti_log_adapter(struct pi_adapter *pi) static void ktti_log_adapter(struct pi_adapter *pi)
{ {
printk("ktti %s, KT adapter at 0x%x, delay %d\n", dev_info(&pi->dev, "ktti %s, KT adapter at 0x%x, delay %d\n",
KTTI_VERSION, pi->port, pi->delay); KTTI_VERSION, pi->port, pi->delay);
} }
......
...@@ -115,8 +115,8 @@ static void on20_log_adapter(struct pi_adapter *pi) ...@@ -115,8 +115,8 @@ static void on20_log_adapter(struct pi_adapter *pi)
{ char *mode_string[2] = {"4-bit","8-bit"}; { char *mode_string[2] = {"4-bit","8-bit"};
printk("on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); dev_info(&pi->dev, "on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
} }
......
...@@ -167,7 +167,7 @@ static int on26_test_port(struct pi_adapter *pi) /* hard reset */ ...@@ -167,7 +167,7 @@ static int on26_test_port(struct pi_adapter *pi) /* hard reset */
} }
if (i == RESET_WAIT) if (i == RESET_WAIT)
printk("on26: Device reset failed (%x,%x)\n",x,y); dev_err(&pi->dev, "on26: Device reset failed (%x,%x)\n", x, y);
w0(4); P1; w0(4); P1; w0(4); P1; w0(4); P1;
} }
...@@ -280,8 +280,8 @@ static void on26_log_adapter(struct pi_adapter *pi) ...@@ -280,8 +280,8 @@ static void on26_log_adapter(struct pi_adapter *pi)
{ char *mode_string[5] = {"4-bit","8-bit","EPP-8", { char *mode_string[5] = {"4-bit","8-bit","EPP-8",
"EPP-16","EPP-32"}; "EPP-16","EPP-32"};
printk("on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); dev_info(&pi->dev, "on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port);
printk("mode %d (%s), delay %d\n",pi->mode, dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode,
mode_string[pi->mode],pi->delay); mode_string[pi->mode],pi->delay);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment