summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/s2255drv.c
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 /linux/drivers/media/video/s2255drv.c
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>
Diffstat (limited to 'linux/drivers/media/video/s2255drv.c')
-rw-r--r--linux/drivers/media/video/s2255drv.c38
1 files changed, 15 insertions, 23 deletions
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;