hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/parport/probe.c
....@@ -38,16 +38,16 @@
3838 {
3939 struct parport_device_info *info = &port->probe_info[device + 1];
4040
41
- printk(KERN_INFO "%s", port->name);
41
+ pr_info("%s", port->name);
4242
4343 if (device >= 0)
44
- printk (" (addr %d)", device);
44
+ pr_cont(" (addr %d)", device);
4545
46
- printk (": %s", classes[info->class].descr);
46
+ pr_cont(": %s", classes[info->class].descr);
4747 if (info->class)
48
- printk(", %s %s", info->mfr, info->model);
48
+ pr_cont(", %s %s", info->mfr, info->model);
4949
50
- printk("\n");
50
+ pr_cont("\n");
5151 }
5252
5353 static void parse_data(struct parport *port, int device, char *str)
....@@ -58,7 +58,7 @@
5858 struct parport_device_info *info = &port->probe_info[device + 1];
5959
6060 if (!txt) {
61
- printk(KERN_WARNING "%s probe: memory squeeze\n", port->name);
61
+ pr_warn("%s probe: memory squeeze\n", port->name);
6262 return;
6363 }
6464 strcpy(txt, str);
....@@ -98,7 +98,8 @@
9898 goto rock_on;
9999 }
100100 }
101
- printk(KERN_WARNING "%s probe: warning, class '%s' not understood.\n", port->name, sep);
101
+ pr_warn("%s probe: warning, class '%s' not understood\n",
102
+ port->name, sep);
102103 info->class = PARPORT_CLASS_OTHER;
103104 } else if (!strcmp(p, "CMD") ||
104105 !strcmp(p, "COMMAND SET")) {
....@@ -177,9 +178,8 @@
177178 * just return constant nibble forever. This catches
178179 * also those cases. */
179180 if (idlens[0] == 0 || idlens[0] > 0xFFF) {
180
- printk (KERN_DEBUG "%s: reported broken Device ID"
181
- " length of %#zX bytes\n",
182
- port->name, idlens[0]);
181
+ printk(KERN_DEBUG "%s: reported broken Device ID length of %#zX bytes\n",
182
+ port->name, idlens[0]);
183183 return -EIO;
184184 }
185185 numidlens = 2;
....@@ -201,10 +201,8 @@
201201
202202 if (port->physport->ieee1284.phase != IEEE1284_PH_HBUSY_DAVAIL) {
203203 if (belen != len) {
204
- printk (KERN_DEBUG "%s: Device ID was %zd bytes"
205
- " while device told it would be %d"
206
- " bytes\n",
207
- port->name, len, belen);
204
+ printk(KERN_DEBUG "%s: Device ID was %zd bytes while device told it would be %d bytes\n",
205
+ port->name, len, belen);
208206 }
209207 goto done;
210208 }
....@@ -214,11 +212,9 @@
214212 * the first 256 bytes or so that we must have read so
215213 * far. */
216214 if (buffer[len-1] == ';') {
217
- printk (KERN_DEBUG "%s: Device ID reading stopped"
218
- " before device told data not available. "
219
- "Current idlen %u of %u, len bytes %02X %02X\n",
220
- port->name, current_idlen, numidlens,
221
- length[0], length[1]);
215
+ printk(KERN_DEBUG "%s: Device ID reading stopped before device told data not available. Current idlen %u of %u, len bytes %02X %02X\n",
216
+ port->name, current_idlen, numidlens,
217
+ length[0], length[1]);
222218 goto done;
223219 }
224220 }
....@@ -257,7 +253,7 @@
257253 ssize_t parport_device_id (int devnum, char *buffer, size_t count)
258254 {
259255 ssize_t retval = -ENXIO;
260
- struct pardevice *dev = parport_open (devnum, "Device ID probe");
256
+ struct pardevice *dev = parport_open(devnum, daisy_dev_name);
261257 if (!dev)
262258 return -ENXIO;
263259