Commit 6546f08d authored by J.R. Mauro's avatar J.R. Mauro Committed by Greg Kroah-Hartman

Staging: rspiusb: make driver compile

Convert undefined info() function calls to dev_err, making rspiusb compile
Signed-off-by: default avatarJ.R. Mauro <jrm8005@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f82ebea5
...@@ -217,7 +217,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -217,7 +217,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case PIUSB_GETVNDCMD: case PIUSB_GETVNDCMD:
if (copy_from_user if (copy_from_user
(&ctrl, (void __user *)arg, sizeof(struct ioctl_struct))) (&ctrl, (void __user *)arg, sizeof(struct ioctl_struct)))
info("copy_from_user failed\n"); dev_err(&pdx->udev->dev, "copy_from_user failed\n");
dbg("%s %x\n", "Get Vendor Command = ", ctrl.cmd); dbg("%s %x\n", "Get Vendor Command = ", ctrl.cmd);
retval = retval =
usb_control_msg(pdx->udev, usb_rcvctrlpipe(pdx->udev, 0), usb_control_msg(pdx->udev, usb_rcvctrlpipe(pdx->udev, 0),
...@@ -231,7 +231,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -231,7 +231,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case PIUSB_SETVNDCMD: case PIUSB_SETVNDCMD:
if (copy_from_user if (copy_from_user
(&ctrl, (void __user *)arg, sizeof(struct ioctl_struct))) (&ctrl, (void __user *)arg, sizeof(struct ioctl_struct)))
info("copy_from_user failed\n"); dev_err(&pdx->udev->dev, "copy_from_user failed\n");
// dbg( "%s %x", "Set Vendor Command = ",ctrl.cmd ); // dbg( "%s %x", "Set Vendor Command = ",ctrl.cmd );
controlData = ctrl.pData[0]; controlData = ctrl.pData[0];
controlData |= (ctrl.pData[1] << 8); controlData |= (ctrl.pData[1] << 8);
...@@ -247,7 +247,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -247,7 +247,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
break; break;
case PIUSB_WRITEPIPE: case PIUSB_WRITEPIPE:
if (copy_from_user(&ctrl, (void __user *)arg, _IOC_SIZE(cmd))) if (copy_from_user(&ctrl, (void __user *)arg, _IOC_SIZE(cmd)))
info("copy_from_user WRITE_DUMMY failed\n"); dev_err(&pdx->udev->dev, "copy_from_user WRITE_DUMMY failed\n");
if (!access_ok(VERIFY_READ, ctrl.pData, ctrl.numbytes)) { if (!access_ok(VERIFY_READ, ctrl.pData, ctrl.numbytes)) {
dbg("can't access pData"); dbg("can't access pData");
return 0; return 0;
...@@ -258,7 +258,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -258,7 +258,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case PIUSB_USERBUFFER: case PIUSB_USERBUFFER:
if (copy_from_user if (copy_from_user
(&ctrl, (void __user *)arg, sizeof(struct ioctl_struct))) (&ctrl, (void __user *)arg, sizeof(struct ioctl_struct)))
info("copy_from_user failed\n"); dev_err(&pdx->udev->dev, "copy_from_user failed\n");
return MapUserBuffer((struct ioctl_struct *) & ctrl, pdx); return MapUserBuffer((struct ioctl_struct *) & ctrl, pdx);
break; break;
case PIUSB_UNMAP_USERBUFFER: case PIUSB_UNMAP_USERBUFFER:
...@@ -268,7 +268,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -268,7 +268,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case PIUSB_READPIPE: case PIUSB_READPIPE:
if (copy_from_user if (copy_from_user
(&ctrl, (void __user *)arg, sizeof(struct ioctl_struct))) (&ctrl, (void __user *)arg, sizeof(struct ioctl_struct)))
info("copy_from_user failed\n"); dev_err(&pdx->udev->dev, "copy_from_user failed\n");
switch (ctrl.endpoint) { switch (ctrl.endpoint) {
case 0: //ST133 Pixel Data or PIXIS IO case 0: //ST133 Pixel Data or PIXIS IO
if (pdx->iama == PIXIS_PID) { if (pdx->iama == PIXIS_PID) {
...@@ -387,7 +387,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -387,7 +387,7 @@ static int piusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
dbg("PIUSB_SETFRAMESIZE"); dbg("PIUSB_SETFRAMESIZE");
if (copy_from_user if (copy_from_user
(&ctrl, (void __user *)arg, sizeof(struct ioctl_struct))) (&ctrl, (void __user *)arg, sizeof(struct ioctl_struct)))
info("copy_from_user failed\n"); dev_err(&pdx->udev->dev, "copy_from_user failed\n");
pdx->frameSize = ctrl.numbytes; pdx->frameSize = ctrl.numbytes;
pdx->num_frames = ctrl.numFrames; pdx->num_frames = ctrl.numFrames;
if (!pdx->sgl) if (!pdx->sgl)
...@@ -449,7 +449,7 @@ int piusb_output(struct ioctl_struct * io, unsigned char *uBuf, int len, ...@@ -449,7 +449,7 @@ int piusb_output(struct ioctl_struct * io, unsigned char *uBuf, int len,
usb_buffer_alloc(pdx->udev, len, GFP_KERNEL, usb_buffer_alloc(pdx->udev, len, GFP_KERNEL,
&urb->transfer_dma); &urb->transfer_dma);
if (!kbuf) { if (!kbuf) {
info("buffer_alloc failed\n"); dev_err(&pdx->udev->dev, "buffer_alloc failed\n");
return -ENOMEM; return -ENOMEM;
} }
memcpy(kbuf, uBuf, len); memcpy(kbuf, uBuf, len);
......
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