Commit aa82661b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: remove warn() macro from usb media drivers

USB should not be having it's own printk macros, so remove warn() and
use the system-wide standard of dev_warn() wherever possible.  In the
few places that will not work out, use a basic printk().

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1817b169
......@@ -310,7 +310,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
radio->curfreq = f->frequency;
if (dsbr100_setfreq(radio, radio->curfreq)==-1)
warn("Set frequency failed");
dev_warn(&radio->usbdev->dev, "Set frequency failed\n");
return 0;
}
......@@ -361,12 +361,14 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
case V4L2_CID_AUDIO_MUTE:
if (ctrl->value) {
if (dsbr100_stop(radio) == -1) {
warn("Radio did not respond properly");
dev_warn(&radio->usbdev->dev,
"Radio did not respond properly\n");
return -EBUSY;
}
} else {
if (dsbr100_start(radio) == -1) {
warn("Radio did not respond properly");
dev_warn(&radio->usbdev->dev,
"Radio did not respond properly\n");
return -EBUSY;
}
}
......@@ -416,7 +418,8 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
radio->muted = 1;
if (dsbr100_start(radio)<0) {
warn("Radio did not start up properly");
dev_warn(&radio->usbdev->dev,
"Radio did not start up properly\n");
radio->users = 0;
unlock_kernel();
return -EIO;
......@@ -501,7 +504,7 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
radio->curfreq = FREQ_MIN*FREQ_MUL;
video_set_drvdata(radio->videodev, radio);
if (video_register_device(radio->videodev, VFL_TYPE_RADIO, radio_nr) < 0) {
warn("Could not register video device");
dev_warn(&intf->dev, "Could not register video device\n");
video_device_release(radio->videodev);
kfree(radio->transfer_buffer);
kfree(radio);
......
......@@ -192,7 +192,7 @@ static void dabusb_iso_complete (struct urb *purb)
err("dabusb_iso_complete: invalid len %d", len);
}
else
warn("dabusb_iso_complete: corrupted packet status: %d", purb->iso_frame_desc[i].status);
dev_warn(&purb->dev->dev, "dabusb_iso_complete: corrupted packet status: %d\n", purb->iso_frame_desc[i].status);
if (dst != purb->actual_length)
err("dst!=purb->actual_length:%d!=%d", dst, purb->actual_length);
}
......@@ -289,7 +289,7 @@ static int dabusb_bulk (pdabusb_t s, pbulk_transfer_t pb)
}
if( ret == -EPIPE ) {
warn("CLEAR_FEATURE request to remove STALL condition.");
dev_warn(&s->usbdev->dev, "CLEAR_FEATURE request to remove STALL condition.\n");
if(usb_clear_halt(s->usbdev, usb_pipeendpoint(pipe)))
err("request failed");
}
......
......@@ -1098,9 +1098,10 @@ ov51x_clear_snapshot(struct usb_ov511 *ov)
reg_w(ov, R51x_SYS_SNAP, 0x02);
reg_w(ov, R51x_SYS_SNAP, 0x00);
} else if (ov->bclass == BCL_OV518) {
warn("snapshot reset not supported yet on OV518(+)");
dev_warn(&ov->dev->dev,
"snapshot reset not supported yet on OV518(+)\n");
} else {
err("clear snap: invalid bridge type");
dev_err(&ov->dev->dev, "clear snap: invalid bridge type\n");
}
}
......@@ -1115,14 +1116,16 @@ ov51x_check_snapshot(struct usb_ov511 *ov)
if (ov->bclass == BCL_OV511) {
ret = reg_r(ov, R51x_SYS_SNAP);
if (ret < 0) {
err("Error checking snspshot status (%d)", ret);
dev_err(&ov->dev->dev,
"Error checking snspshot status (%d)\n", ret);
} else if (ret & 0x08) {
status = 1;
}
} else if (ov->bclass == BCL_OV518) {
warn("snapshot check not supported yet on OV518(+)");
dev_warn(&ov->dev->dev,
"snapshot check not supported yet on OV518(+)\n");
} else {
err("check snap: invalid bridge type");
dev_err(&ov->dev->dev, "clear snap: invalid bridge type\n");
}
return status;
......@@ -5217,7 +5220,8 @@ saa7111a_configure(struct usb_ov511 *ov)
if (ov->bclass == BCL_OV511)
reg_w(ov, 0x11, 0x00);
else
warn("SAA7111A not yet supported with OV518/OV518+");
dev_warn(&ov->dev->dev,
"SAA7111A not yet supported with OV518/OV518+\n");
return 0;
}
......@@ -5456,7 +5460,8 @@ ov518_configure(struct usb_ov511 *ov)
* required. OV518 has no uncompressed mode, to save RAM. */
if (!dumppix && !ov->compress) {
ov->compress = 1;
warn("Compression required with OV518...enabling");
dev_warn(&ov->dev->dev,
"Compression required with OV518...enabling\n");
}
if (ov->bridge == BRG_OV518) {
......
......@@ -229,7 +229,8 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
cam->input = input_dev = input_allocate_device();
if (!input_dev) {
warn("Not enough memory for camera's input device\n");
dev_warn(&dev->dev,
"Not enough memory for camera's input device\n");
return;
}
......@@ -243,8 +244,9 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
error = input_register_device(cam->input);
if (error) {
warn("Failed to register camera's input device, err: %d\n",
error);
dev_warn(&dev->dev,
"Failed to register camera's input device, err: %d\n",
error);
input_free_device(cam->input);
cam->input = NULL;
}
......
......@@ -93,7 +93,7 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
cam->input = input_dev = input_allocate_device();
if (!input_dev) {
warn("insufficient mem for cam input device");
dev_warn(&dev->dev, "insufficient mem for cam input device\n");
return;
}
......@@ -107,8 +107,9 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
error = input_register_device(cam->input);
if (error) {
warn("Failed to register camera's input device, err: %d\n",
error);
dev_warn(&dev->dev,
"Failed to register camera's input device, err: %d\n",
error);
input_free_device(cam->input);
cam->input = NULL;
}
......@@ -587,8 +588,9 @@ static int qcm_compress_iso(struct uvd *uvd, struct urb *dataurb)
dataurb->iso_frame_desc[i].offset;
if (st < 0) {
warn("Data error: packet=%d. len=%d. status=%d.",
i, n, st);
dev_warn(&uvd->dev->dev,
"Data error: packet=%d. len=%d. status=%d.\n",
i, n, st);
uvd->stats.iso_err_count++;
continue;
}
......@@ -699,7 +701,7 @@ static void qcm_stop_data(struct uvd *uvd)
ret = qcm_camera_off(uvd);
if (ret)
warn("couldn't turn the cam off.");
dev_warn(&uvd->dev->dev, "couldn't turn the cam off.\n");
uvd->streaming = 0;
......
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