if (result == -ETIMEDOUT)
                                retries--;
                        else if (result < 0) {
-                               err("Error executing ioctrl. code = %d", result);
+                               dev_err(&rio->rio_dev->dev,
+                                       "Error executing ioctrl. code = %d\n",
+                                       result);
                                retries = 0;
                        } else {
                                dbg("Executed ioctl. Result = %d (data=%02x)",
                        if (result == -ETIMEDOUT)
                                retries--;
                        else if (result < 0) {
-                               err("Error executing ioctrl. code = %d", result);
+                               dev_err(&rio->rio_dev->dev,
+                                       "Error executing ioctrl. code = %d\n",
+                                       result);
                                retries = 0;
                        } else {
                                dbg("Executed ioctl. Result = %d", result);
                                break;
                };
                if (result) {
-                       err("Write Whoops - %x", result);
+                       dev_err(&rio->rio_dev->dev, "Write Whoops - %x\n",
+                               result);
                        errn = -EIO;
                        goto error;
                }
                } else if (result == -ETIMEDOUT || result == 15) {      /* FIXME: 15 ??? */
                        if (!maxretry--) {
                                mutex_unlock(&(rio->lock));
-                               err("read_rio: maxretry timeout");
+                               dev_err(&rio->rio_dev->dev,
+                                       "read_rio: maxretry timeout\n");
                                return -ETIME;
                        }
                        prepare_to_wait(&rio->wait_q, &wait, TASK_INTERRUPTIBLE);
                        continue;
                } else if (result != -EREMOTEIO) {
                        mutex_unlock(&(rio->lock));
-                       err("Read Whoops - result:%u partial:%u this_read:%u",
-                            result, partial, this_read);
+                       dev_err(&rio->rio_dev->dev,
+                               "Read Whoops - result:%u partial:%u this_read:%u\n",
+                               result, partial, this_read);
                        return -EIO;
                } else {
                        mutex_unlock(&(rio->lock));
 
        retval = usb_register_dev(intf, &usb_rio_class);
        if (retval) {
-               err("Not able to get a minor for this device.");
+               dev_err(&dev->dev,
+                       "Not able to get a minor for this device.\n");
                return -ENOMEM;
        }
 
        rio->rio_dev = dev;
 
        if (!(rio->obuf = kmalloc(OBUF_SIZE, GFP_KERNEL))) {
-               err("probe_rio: Not enough memory for the output buffer");
+               dev_err(&dev->dev,
+                       "probe_rio: Not enough memory for the output buffer\n");
                usb_deregister_dev(intf, &usb_rio_class);
                return -ENOMEM;
        }
        dbg("probe_rio: obuf address:%p", rio->obuf);
 
        if (!(rio->ibuf = kmalloc(IBUF_SIZE, GFP_KERNEL))) {
-               err("probe_rio: Not enough memory for the input buffer");
+               dev_err(&dev->dev,
+                       "probe_rio: Not enough memory for the input buffer\n");
                usb_deregister_dev(intf, &usb_rio_class);
                kfree(rio->obuf);
                return -ENOMEM;