summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-01-23 00:29:03 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-23 00:29:03 -0200
commit3967ce8c026d574a6d51824795dc798f90db65bd (patch)
tree9af686d50b122b3eb040ec07cd88d67c2776bed2
parent7731e329cb5e3c27b6cd3649e613b7f55b63cd51 (diff)
downloadmediapointer-dvb-s2-3967ce8c026d574a6d51824795dc798f90db65bd.tar.gz
mediapointer-dvb-s2-3967ce8c026d574a6d51824795dc798f90db65bd.tar.bz2
Reverting changeset 10298. It were committed with a wrong From: meta-tag
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--linux/drivers/media/video/dabusb.c74
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c12
-rw-r--r--linux/drivers/media/video/s2255drv.c38
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-core.c44
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-i2c.c6
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-video.c36
6 files changed, 81 insertions, 129 deletions
diff --git a/linux/drivers/media/video/dabusb.c b/linux/drivers/media/video/dabusb.c
index b399f18c1..7ba206b34 100644
--- a/linux/drivers/media/video/dabusb.c
+++ b/linux/drivers/media/video/dabusb.c
@@ -199,20 +199,17 @@ static void dabusb_iso_complete (struct urb *purb)
dst += len;
}
else
- dev_err(&purb->dev->dev,
- "dabusb_iso_complete: invalid len %d\n", len);
+ err("dabusb_iso_complete: invalid len %d", len);
}
else
dev_warn(&purb->dev->dev, "dabusb_iso_complete: corrupted packet status: %d\n", purb->iso_frame_desc[i].status);
if (dst != purb->actual_length)
- dev_err(&purb->dev->dev,
- "dst!=purb->actual_length:%d!=%d\n",
- dst, purb->actual_length);
+ err("dst!=purb->actual_length:%d!=%d", dst, purb->actual_length);
}
if (atomic_dec_and_test (&s->pending_io) && !s->remove_pending && s->state != _stopped) {
s->overruns++;
- dev_err(&purb->dev->dev, "overrun (%d)\n", s->overruns);
+ err("overrun (%d)", s->overruns);
}
wake_up (&s->wait);
}
@@ -233,14 +230,13 @@ static int dabusb_alloc_buffers (pdabusb_t s)
while (transfer_len < (s->total_buffer_size << 10)) {
b = kzalloc(sizeof (buff_t), GFP_KERNEL);
if (!b) {
- dev_err(&s->usbdev->dev,
- "kzalloc(sizeof(buff_t))==NULL\n");
+ err("kzalloc(sizeof(buff_t))==NULL");
goto err;
}
b->s = s;
b->purb = usb_alloc_urb(packets, GFP_KERNEL);
if (!b->purb) {
- dev_err(&s->usbdev->dev, "usb_alloc_urb == NULL\n");
+ err("usb_alloc_urb == NULL");
kfree (b);
goto err;
}
@@ -249,8 +245,7 @@ static int dabusb_alloc_buffers (pdabusb_t s)
if (!b->purb->transfer_buffer) {
kfree (b->purb);
kfree (b);
- dev_err(&s->usbdev->dev,
- "kmalloc(%d)==NULL\n", transfer_buffer_length);
+ err("kmalloc(%d)==NULL", transfer_buffer_length);
goto err;
}
@@ -294,11 +289,10 @@ static int dabusb_bulk (pdabusb_t s, pbulk_transfer_t pb)
ret=usb_bulk_msg(s->usbdev, pipe, pb->data, pb->size, &actual_length, 100);
if(ret<0) {
- dev_err(&s->usbdev->dev,
- "usb_bulk_msg failed(%d)\n", ret);
+ err("dabusb: usb_bulk_msg failed(%d)",ret);
if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) {
- dev_err(&s->usbdev->dev, "set_interface failed\n");
+ err("set_interface failed");
return -EINVAL;
}
@@ -307,7 +301,7 @@ static int dabusb_bulk (pdabusb_t s, pbulk_transfer_t pb)
if( ret == -EPIPE ) {
dev_warn(&s->usbdev->dev, "CLEAR_FEATURE request to remove STALL condition.\n");
if(usb_clear_halt(s->usbdev, usb_pipeendpoint(pipe)))
- dev_err(&s->usbdev->dev, "request failed\n");
+ err("request failed");
}
pb->size = actual_length;
@@ -325,8 +319,7 @@ static int dabusb_writemem (pdabusb_t s, int pos, const unsigned char *data,
unsigned char *transfer_buffer = kmalloc (len, GFP_KERNEL);
if (!transfer_buffer) {
- dev_err(&s->usbdev->dev,
- "dabusb_writemem: kmalloc(%d) failed.\n", len);
+ err("dabusb_writemem: kmalloc(%d) failed.", len);
return -ENOMEM;
}
@@ -359,8 +352,7 @@ static int dabusb_loadmem (pdabusb_t s, const char *fname)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
ret = request_ihex_firmware(&fw, "dabusb/firmware.fw", &s->usbdev->dev);
if (ret) {
- dev_err(&s->usbdev->dev,
- "Failed to load \"dabusb/firmware.fw\": %d\n", ret);
+ err("Failed to load \"dabusb/firmware.fw\": %d\n", ret);
goto out;
}
#endif
@@ -386,14 +378,11 @@ static int dabusb_loadmem (pdabusb_t s, const char *fname)
#endif
if (ret < 0) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
- dev_err(&s->usbdev->dev,
- "dabusb_writemem failed (%d %04X %p %d)\n",
- ret, ptr->Address, ptr->Data, ptr->Length);
+ err("dabusb_writemem failed (%d %04X %p %d)", ret, ptr->Address, ptr->Data, ptr->Length);
#else
- dev_err(&s->usbdev->dev,
- "dabusb_writemem failed (%d %04X %p %d)\n",
- ret, be32_to_cpu(rec->addr),
- rec->data, be16_to_cpu(rec->len));
+ err("dabusb_writemem failed (%d %04X %p %d)", ret,
+ be32_to_cpu(rec->addr), rec->data,
+ be16_to_cpu(rec->len));
#endif
break;
}
@@ -454,16 +443,14 @@ static int dabusb_fpga_download (pdabusb_t s, const char *fname)
dbg("Enter dabusb_fpga_download (internal)");
if (!b) {
- dev_err(&s->usbdev->dev,
- "kmalloc(sizeof(bulk_transfer_t))==NULL\n");
+ err("kmalloc(sizeof(bulk_transfer_t))==NULL");
return -ENOMEM;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
ret = request_firmware(&fw, "dabusb/bitstream.bin", &s->usbdev->dev);
if (ret) {
- dev_err(&s->usbdev->dev,
- "Failed to load \"dabusb/bitstream.bin\": %d\n", ret);
+ err("Failed to load \"dabusb/bitstream.bin\": %d\n", ret);
kfree(b);
return ret;
}
@@ -495,7 +482,7 @@ static int dabusb_fpga_download (pdabusb_t s, const char *fname)
#endif
ret = dabusb_bulk (s, b);
if (ret < 0) {
- dev_err(&s->usbdev->dev, "dabusb_bulk failed.\n");
+ err("dabusb_bulk failed.");
break;
}
mdelay (1);
@@ -550,11 +537,9 @@ static int dabusb_startrek (pdabusb_t s)
ret = usb_submit_urb (end->purb, GFP_KERNEL);
if (ret) {
- dev_err(&s->usbdev->dev,
- "usb_submit_urb returned:%d\n", ret);
+ err("usb_submit_urb returned:%d", ret);
if (dabusb_add_buf_tail (s, &s->free_buff_list, &s->rec_buff_list))
- dev_err(&s->usbdev->dev,
- "startrek: dabusb_add_buf_tail failed\n");
+ err("startrek: dabusb_add_buf_tail failed");
break;
}
else
@@ -597,8 +582,7 @@ static ssize_t dabusb_read (struct file *file, char __user *buf, size_t count, l
spin_unlock_irqrestore(&s->lock, flags);
- dev_err(&s->usbdev->dev,
- "error: rec_buf_list is empty\n");
+ err("error: rec_buf_list is empty");
goto err;
}
@@ -627,8 +611,7 @@ static ssize_t dabusb_read (struct file *file, char __user *buf, size_t count, l
if (list_empty (&s->rec_buff_list)) {
spin_unlock_irqrestore(&s->lock, flags);
- dev_err(&s->usbdev->dev,
- "error: still no buffer available.\n");
+ err("error: still no buffer available.");
goto err;
}
spin_unlock_irqrestore(&s->lock, flags);
@@ -649,7 +632,7 @@ static ssize_t dabusb_read (struct file *file, char __user *buf, size_t count, l
dbg("copy_to_user:%p %p %d",buf, purb->transfer_buffer + s->readptr, cnt);
if (copy_to_user (buf, purb->transfer_buffer + s->readptr, cnt)) {
- dev_err(&s->usbdev->dev, "read: copy_to_user failed\n");
+ err("read: copy_to_user failed");
if (!ret)
ret = -EFAULT;
goto err;
@@ -663,8 +646,7 @@ static ssize_t dabusb_read (struct file *file, char __user *buf, size_t count, l
if (s->readptr == purb->actual_length) {
// finished, take next buffer
if (dabusb_add_buf_tail (s, &s->free_buff_list, &s->rec_buff_list))
- dev_err(&s->usbdev->dev,
- "read: dabusb_add_buf_tail failed\n");
+ err("read: dabusb_add_buf_tail failed");
s->readptr = 0;
}
}
@@ -700,7 +682,7 @@ static int dabusb_open (struct inode *inode, struct file *file)
}
if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) {
mutex_unlock(&s->mutex);
- dev_err(&s->usbdev->dev, "set_interface failed\n");
+ err("set_interface failed");
return -EINVAL;
}
s->opened = 1;
@@ -725,7 +707,7 @@ static int dabusb_release (struct inode *inode, struct file *file)
if (!s->remove_pending) {
if (usb_set_interface (s->usbdev, _DABUSB_IF, 0) < 0)
- dev_err(&s->usbdev->dev, "set_interface failed\n");
+ err("set_interface failed");
}
else
wake_up (&s->remove_ok);
@@ -845,7 +827,7 @@ static int dabusb_probe (struct usb_interface *intf,
s->devnum = intf->minor;
if (usb_reset_configuration (usbdev) < 0) {
- dev_err(&intf->dev, "reset_configuration failed\n");
+ err("reset_configuration failed");
goto reject;
}
if (le16_to_cpu(usbdev->descriptor.idProduct) == 0x2131) {
@@ -856,7 +838,7 @@ static int dabusb_probe (struct usb_interface *intf,
dabusb_fpga_download (s, NULL);
if (usb_set_interface (s->usbdev, _DABUSB_IF, 0) < 0) {
- dev_err(&intf->dev, "set_interface failed\n");
+ err("set_interface failed");
goto reject;
}
}
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index e4bf0278c..26da521f1 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -1275,9 +1275,8 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
dip->minor_type = pvr2_v4l_type_video;
nr_ptr = video_nr;
if (!dip->stream) {
- pr_err(KBUILD_MODNAME
- ": Failed to set up pvrusb2 v4l video dev"
- " due to missing stream instance\n");
+ err("Failed to set up pvrusb2 v4l video dev"
+ " due to missing stream instance");
return;
}
break;
@@ -1294,8 +1293,8 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
break;
default:
/* Bail out (this should be impossible) */
- pr_err(KBUILD_MODNAME ": Failed to set up pvrusb2 v4l dev"
- " due to unrecognized config\n");
+ err("Failed to set up pvrusb2 v4l dev"
+ " due to unrecognized config");
return;
}
@@ -1311,8 +1310,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
dip->v4l_type, mindevnum) < 0) &&
(video_register_device(&dip->devbase,
dip->v4l_type, -1) < 0)) {
- pr_err(KBUILD_MODNAME
- ": Failed to register pvrusb2 v4l device\n");
+ err("Failed to register pvrusb2 v4l device");
}
printk(KERN_INFO "pvrusb2: registered device %s%u [%s]\n",
diff --git a/linux/drivers/media/video/s2255drv.c b/linux/drivers/media/video/s2255drv.c
index ffa2928b2..2a2cbb418 100644
--- a/linux/drivers/media/video/s2255drv.c
+++ b/linux/drivers/media/video/s2255drv.c
@@ -337,19 +337,14 @@ static long s2255_vendor_req(struct s2255_dev *dev, unsigned char req,
u16 index, u16 value, void *buf,
s32 buf_len, int bOut);
-/* dev_err macro with driver name */
-#define S2255_DRIVER_NAME "s2255"
-#define s2255_dev_err(dev, fmt, arg...) \
- dev_err(dev, S2255_DRIVER_NAME " - " fmt, ##arg)
-
#define dprintk(level, fmt, arg...) \
do { \
if (*s2255_debug >= (level)) { \
- printk(KERN_DEBUG S2255_DRIVER_NAME \
- ": " fmt, ##arg); \
+ printk(KERN_DEBUG "s2255: " fmt, ##arg); \
} \
} while (0)
+
static struct usb_driver s2255_driver;
@@ -534,14 +529,14 @@ static void s2255_fwchunk_complete(struct urb *urb)
int len;
dprintk(100, "udev %p urb %p", udev, urb);
if (urb->status) {
- dev_err(&udev->dev, "URB failed with status %d\n", urb->status);
+ dev_err(&udev->dev, "URB failed with status %d", urb->status);
atomic_set(&data->fw_state, S2255_FW_FAILED);
/* wake up anything waiting for the firmware */
wake_up(&data->wait_fw);
return;
}
if (data->fw_urb == NULL) {
- s2255_dev_err(&udev->dev, "disconnected\n");
+ dev_err(&udev->dev, "s2255 disconnected\n");
atomic_set(&data->fw_state, S2255_FW_FAILED);
/* wake up anything waiting for the firmware */
wake_up(&data->wait_fw);
@@ -1284,7 +1279,7 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
}
if (!res_get(dev, fh)) {
- s2255_dev_err(&dev->udev->dev, "stream busy\n");
+ dev_err(&dev->udev->dev, "s2255: stream busy\n");
return -EBUSY;
}
@@ -1551,8 +1546,7 @@ static int s2255_open(struct file *file)
switch (atomic_read(&dev->fw_data->fw_state)) {
case S2255_FW_FAILED:
- s2255_dev_err(&dev->udev->dev,
- "firmware load failed. retrying.\n");
+ err("2255 firmware load failed. retrying.\n");
s2255_fwload_start(dev, 1);
wait_event_timeout(dev->fw_data->wait_fw,
((atomic_read(&dev->fw_data->fw_state)
@@ -2180,8 +2174,7 @@ static int s2255_board_init(struct s2255_dev *dev)
printk(KERN_INFO "2255 usb firmware version %d \n", fw_ver);
if (fw_ver < CUR_USB_FWVER)
- dev_err(&dev->udev->dev,
- "usb firmware not up to date %d\n", fw_ver);
+ err("usb firmware not up to date %d\n", fw_ver);
for (j = 0; j < MAX_CHANNELS; j++) {
dev->b_acquire[j] = 0;
@@ -2236,13 +2229,13 @@ static void read_pipe_completion(struct urb *purb)
dprintk(100, "read pipe completion %p, status %d\n", purb,
purb->status);
if (pipe_info == NULL) {
- dev_err(&purb->dev->dev, "no context!\n");
+ err("no context !");
return;
}
dev = pipe_info->dev;
if (dev == NULL) {
- dev_err(&purb->dev->dev, "no context!\n");
+ err("no context !");
return;
}
status = purb->status;
@@ -2294,7 +2287,7 @@ static int s2255_start_readpipe(struct s2255_dev *dev)
pipe_info->stream_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!pipe_info->stream_urb) {
dev_err(&dev->udev->dev,
- "ReadStream: Unable to alloc URB\n");
+ "ReadStream: Unable to alloc URB");
return -ENOMEM;
}
/* transfer buffer allocated in board_init */
@@ -2399,7 +2392,7 @@ static void s2255_stop_readpipe(struct s2255_dev *dev)
int j;
if (dev == NULL) {
- s2255_dev_err(&dev->udev->dev, "invalid device\n");
+ err("s2255: invalid device");
return;
}
dprintk(4, "stop read pipe\n");
@@ -2461,7 +2454,7 @@ static int s2255_probe(struct usb_interface *interface,
/* allocate memory for our device state and initialize it to zero */
dev = kzalloc(sizeof(struct s2255_dev), GFP_KERNEL);
if (dev == NULL) {
- s2255_dev_err(&interface->dev, "out of memory\n");
+ err("s2255: out of memory");
goto error;
}
@@ -2495,7 +2488,7 @@ static int s2255_probe(struct usb_interface *interface,
}
if (!dev->read_endpoint) {
- dev_err(&interface->dev, "Could not find bulk-in endpoint\n");
+ dev_err(&interface->dev, "Could not find bulk-in endpoint");
goto error;
}
@@ -2591,7 +2584,7 @@ static void s2255_disconnect(struct usb_interface *interface)
}
static struct usb_driver s2255_driver = {
- .name = S2255_DRIVER_NAME,
+ .name = "s2255",
.probe = s2255_probe,
.disconnect = s2255_disconnect,
.id_table = s2255_table,
@@ -2605,8 +2598,7 @@ static int __init usb_s2255_init(void)
result = usb_register(&s2255_driver);
if (result)
- pr_err(KBUILD_MODNAME
- ": usb_register failed. Error number %d\n", result);
+ err("usb_register failed. Error number %d", result);
dprintk(2, "s2255_init: done\n");
return result;
diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c
index 440f1b05a..33f37ac46 100644
--- a/linux/drivers/media/video/usbvision/usbvision-core.c
+++ b/linux/drivers/media/video/usbvision/usbvision-core.c
@@ -381,9 +381,8 @@ int usbvision_scratch_alloc(struct usb_usbvision *usbvision)
usbvision->scratch = vmalloc_32(scratch_buf_size);
scratch_reset(usbvision);
if(usbvision->scratch == NULL) {
- dev_err(&usbvision->dev->dev,
- "%s: unable to allocate %d bytes for scratch\n",
- __func__, scratch_buf_size);
+ err("%s: unable to allocate %d bytes for scratch",
+ __func__, scratch_buf_size);
return -ENOMEM;
}
return 0;
@@ -492,9 +491,8 @@ int usbvision_decompress_alloc(struct usb_usbvision *usbvision)
int IFB_size = MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT * 3 / 2;
usbvision->IntraFrameBuffer = vmalloc_32(IFB_size);
if (usbvision->IntraFrameBuffer == NULL) {
- dev_err(&usbvision->dev->dev,
- "%s: unable to allocate %d for compr. frame buffer\n",
- __func__, IFB_size);
+ err("%s: unable to allocate %d for compr. frame buffer",
+ __func__, IFB_size);
return -ENOMEM;
}
return 0;
@@ -1521,9 +1519,8 @@ static void usbvision_isocIrq(struct urb *urb, struct pt_regs *regs)
errCode = usb_submit_urb (urb, GFP_ATOMIC);
if(errCode) {
- dev_err(&usbvision->dev->dev,
- "%s: usb_submit_urb failed: error %d\n",
- __func__, errCode);
+ err("%s: usb_submit_urb failed: error %d",
+ __func__, errCode);
}
return;
@@ -1554,8 +1551,7 @@ int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg)
0, (__u16) reg, buffer, 1, HZ);
if (errCode < 0) {
- dev_err(&usbvision->dev->dev,
- "%s: failed: error %d\n", __func__, errCode);
+ err("%s: failed: error %d", __func__, errCode);
return errCode;
}
return buffer[0];
@@ -1583,8 +1579,7 @@ int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg,
USB_RECIP_ENDPOINT, 0, (__u16) reg, &value, 1, HZ);
if (errCode < 0) {
- dev_err(&usbvision->dev->dev,
- "%s: failed: error %d\n", __func__, errCode);
+ err("%s: failed: error %d", __func__, errCode);
}
return errCode;
}
@@ -1864,8 +1859,7 @@ int usbvision_set_output(struct usb_usbvision *usbvision, int width,
0, (__u16) USBVISION_LXSIZE_O, value, 4, HZ);
if (errCode < 0) {
- dev_err(&usbvision->dev->dev,
- "%s failed: error %d\n", __func__, errCode);
+ err("%s failed: error %d", __func__, errCode);
return errCode;
}
usbvision->curwidth = usbvision->stretch_width * UsbWidth;
@@ -2251,7 +2245,7 @@ static int usbvision_set_dram_settings(struct usb_usbvision *usbvision)
(__u16) USBVISION_DRM_PRM1, value, 8, HZ);
if (rc < 0) {
- dev_err(&usbvision->dev->dev, "%sERROR=%d\n", __func__, rc);
+ err("%sERROR=%d", __func__, rc);
return rc;
}
@@ -2459,9 +2453,8 @@ int usbvision_set_alternate(struct usb_usbvision *dev)
PDEBUG(DBG_FUNC,"setting alternate %d with wMaxPacketSize=%u", dev->ifaceAlt,dev->isocPacketSize);
errCode = usb_set_interface(dev->dev, dev->iface, dev->ifaceAlt);
if (errCode < 0) {
- dev_err(&dev->dev->dev,
- "cannot change alternate number to %d (error=%i)\n",
- dev->ifaceAlt, errCode);
+ err ("cannot change alternate number to %d (error=%i)",
+ dev->ifaceAlt, errCode);
return errCode;
}
}
@@ -2512,8 +2505,7 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
if (urb == NULL) {
- dev_err(&usbvision->dev->dev,
- "%s: usb_alloc_urb() failed\n", __func__);
+ err("%s: usb_alloc_urb() failed", __func__);
return -ENOMEM;
}
usbvision->sbuf[bufIdx].urb = urb;
@@ -2545,9 +2537,8 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb,
GFP_KERNEL);
if (errCode) {
- dev_err(&usbvision->dev->dev,
- "%s: usb_submit_urb(%d) failed: error %d\n",
- __func__, bufIdx, errCode);
+ err("%s: usb_submit_urb(%d) failed: error %d",
+ __func__, bufIdx, errCode);
}
}
@@ -2596,9 +2587,8 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision)
errCode = usb_set_interface(usbvision->dev, usbvision->iface,
usbvision->ifaceAlt);
if (errCode < 0) {
- dev_err(&usbvision->dev->dev,
- "%s: usb_set_interface() failed: error %d\n",
- __func__, errCode);
+ err("%s: usb_set_interface() failed: error %d",
+ __func__, errCode);
usbvision->last_error = errCode;
}
regValue = (16-usbvision_read_reg(usbvision, USBVISION_ALTER_REG)) & 0x0F;
diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c
index 4c74861f4..1d37e6206 100644
--- a/linux/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c
@@ -120,8 +120,7 @@ static inline int usb_find_address(struct i2c_adapter *i2c_adap,
/* try extended address code... */
ret = try_write_address(i2c_adap, addr, retries);
if (ret != 1) {
- dev_err(&i2c_adap->dev,
- "died at extended address code, while writing\n");
+ err("died at extended address code, while writing");
return -EREMOTEIO;
}
add[0] = addr;
@@ -130,8 +129,7 @@ static inline int usb_find_address(struct i2c_adapter *i2c_adap,
addr |= 0x01;
ret = try_read_address(i2c_adap, addr, retries);
if (ret != 1) {
- dev_err(&i2c_adap->dev,
- "died at extended address code, while reading\n");
+ err("died at extended address code, while reading");
return -EREMOTEIO;
}
}
diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c
index 47d672da5..2622de003 100644
--- a/linux/drivers/media/video/usbvision/usbvision-video.c
+++ b/linux/drivers/media/video/usbvision/usbvision-video.c
@@ -329,7 +329,7 @@ static void usbvision_create_sysfs(struct video_device *vdev)
return;
} while (0);
- dev_err(&vdev->dev, "%s error: %d\n", __func__, res);
+ err("%s error: %d\n", __func__, res);
}
static void usbvision_remove_sysfs(struct video_device *vdev)
@@ -487,9 +487,8 @@ static int vidioc_g_register (struct file *file, void *priv,
/* NT100x has a 8-bit register space */
errCode = usbvision_read_reg(usbvision, reg->reg&0xff);
if (errCode < 0) {
- dev_err(&usbvision->vdev->dev,
- "%s: VIDIOC_DBG_G_REGISTER failed: error %d\n",
- __func__, errCode);
+ err("%s: VIDIOC_DBG_G_REGISTER failed: error %d",
+ __func__, errCode);
return errCode;
}
reg->val = errCode;
@@ -508,9 +507,8 @@ static int vidioc_s_register (struct file *file, void *priv,
/* NT100x has a 8-bit register space */
errCode = usbvision_write_reg(usbvision, reg->reg&0xff, reg->val);
if (errCode < 0) {
- dev_err(&usbvision->vdev->dev,
- "%s: VIDIOC_DBG_S_REGISTER failed: error %d\n",
- __func__, errCode);
+ err("%s: VIDIOC_DBG_S_REGISTER failed: error %d",
+ __func__, errCode);
return errCode;
}
return 0;
@@ -1191,9 +1189,7 @@ static int usbvision_radio_open(struct file *file)
mutex_lock(&usbvision->lock);
if (usbvision->user) {
- dev_err(&usbvision->rdev->dev,
- "%s: Someone tried to open an already opened USBVision Radio!\n",
- __func__);
+ err("%s: Someone tried to open an already opened USBVision Radio!", __func__);
errCode = -EBUSY;
}
else {
@@ -1417,8 +1413,7 @@ static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision,
struct video_device *vdev;
if (usb_dev == NULL) {
- dev_err(&usbvision->dev->dev,
- "%s: usbvision->dev is not set\n", __func__);
+ err("%s: usbvision->dev is not set", __func__);
return NULL;
}
@@ -1529,9 +1524,7 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
return 0;
err_exit:
- dev_err(&usbvision->dev->dev,
- "USBVision[%d]: video_register_device() failed\n",
- usbvision->nr);
+ err("USBVision[%d]: video_register_device() failed", usbvision->nr);
usbvision_unregister_video(usbvision);
return -1;
}
@@ -1682,20 +1675,20 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
}
endpoint = &interface->endpoint[1].desc;
if (!usb_endpoint_xfer_isoc(endpoint)) {
- dev_err(&intf->dev, "%s: interface %d. has non-ISO endpoint!\n",
+ err("%s: interface %d. has non-ISO endpoint!",
__func__, ifnum);
- dev_err(&intf->dev, "%s: Endpoint attributes %d",
+ err("%s: Endpoint attributes %d",
__func__, endpoint->bmAttributes);
return -ENODEV;
}
if (usb_endpoint_dir_out(endpoint)) {
- dev_err(&intf->dev, "%s: interface %d. has ISO OUT endpoint!\n",
+ err("%s: interface %d. has ISO OUT endpoint!",
__func__, ifnum);
return -ENODEV;
}
if ((usbvision = usbvision_alloc(dev)) == NULL) {
- dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__);
+ err("%s: couldn't allocate USBVision struct", __func__);
return -ENOMEM;
}
@@ -1718,7 +1711,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
usbvision->alt_max_pkt_size = kmalloc(32*
usbvision->num_alt,GFP_KERNEL);
if (usbvision->alt_max_pkt_size == NULL) {
- dev_err(&intf->dev, "usbvision: out of memory!\n");
+ err("usbvision: out of memory!\n");
mutex_unlock(&usbvision->lock);
return -ENOMEM;
}
@@ -1779,8 +1772,7 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf)
PDEBUG(DBG_PROBE, "");
if (usbvision == NULL) {
- dev_err(&usbvision->dev->dev,
- "%s: usb_get_intfdata() failed\n", __func__);
+ err("%s: usb_get_intfdata() failed", __func__);
return;
}
usb_set_intfdata (intf, NULL);