Skip to content

Commit 42b3820

Browse files
samueliggregkh
authored andcommitted
Staging: ipack/devices/ipoctal: change pr_* usage for dev_* functions
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a23d320 commit 42b3820

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

‎drivers/staging/ipack/devices/ipoctal.c‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
* Software Foundation; version 2 of the License.
1212
*/
1313

14-
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
15-
1614
#include <linux/device.h>
1715
#include <linux/module.h>
1816
#include <linux/moduleparam.h>
@@ -116,7 +114,8 @@ static int ipoctal_port_activate(struct tty_port *port, struct tty_struct *tty)
116114
ipoctal = ipoctal_find_board(tty);
117115

118116
if (ipoctal == NULL) {
119-
pr_err("Device not found. Major %d\n", tty->driver->major);
117+
dev_err(tty->dev, "Device not found. Major %d\n",
118+
tty->driver->major);
120119
return -ENODEV;
121120
}
122121

@@ -136,7 +135,8 @@ static int ipoctal_open(struct tty_struct *tty, struct file *file)
136135
ipoctal = ipoctal_find_board(tty);
137136

138137
if (ipoctal == NULL) {
139-
pr_err("Device not found. Major %d\n", tty->driver->major);
138+
dev_err(tty->dev, "Device not found. Major %d\n",
139+
tty->driver->major);
140140
return -ENODEV;
141141
}
142142

@@ -381,7 +381,9 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
381381
res = ipoctal->dev->bus->ops->map_space(ipoctal->dev, 0,
382382
IPACK_ID_SPACE);
383383
if (res) {
384-
pr_err("Unable to map slot [%d:%d] ID space!\n", bus_nr, slot);
384+
dev_err(&ipoctal->dev->dev,
385+
"Unable to map slot [%d:%d] ID space!\n",
386+
bus_nr, slot);
385387
return res;
386388
}
387389

@@ -396,14 +398,18 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
396398
res = ipoctal->dev->bus->ops->map_space(ipoctal->dev, 0,
397399
IPACK_IO_SPACE);
398400
if (res) {
399-
pr_err("Unable to map slot [%d:%d] IO space!\n", bus_nr, slot);
401+
dev_err(&ipoctal->dev->dev,
402+
"Unable to map slot [%d:%d] IO space!\n",
403+
bus_nr, slot);
400404
goto out_unregister_id_space;
401405
}
402406

403407
res = ipoctal->dev->bus->ops->map_space(ipoctal->dev,
404408
0x8000, IPACK_MEM_SPACE);
405409
if (res) {
406-
pr_err("Unable to map slot [%d:%d] MEM space!\n", bus_nr, slot);
410+
dev_err(&ipoctal->dev->dev,
411+
"Unable to map slot [%d:%d] MEM space!\n",
412+
bus_nr, slot);
407413
goto out_unregister_io_space;
408414
}
409415

@@ -472,7 +478,7 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
472478
tty_set_operations(tty, &ipoctal_fops);
473479
res = tty_register_driver(tty);
474480
if (res) {
475-
pr_err("Can't register tty driver.\n");
481+
dev_err(&ipoctal->dev->dev, "Can't register tty driver.\n");
476482
put_tty_driver(tty);
477483
goto out_unregister_slot_unmap;
478484
}

0 commit comments

Comments
 (0)