aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-03-10 22:28:33 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:17 -0400
commitc61402bae843f1f7ec29a6fe81681be21c3d201c (patch)
tree4d7f7496263cb8f6b46e5db8e4b07e26d04bac52 /drivers/media
parente5ee3f643dd6d25c73cfd1e943abc9b529d63697 (diff)
V4L/DVB (10934): zoran: replace functions names in strings with __func__
It reduces the size of the driver over all, and the function names in strings need to be manually kept up to date while __func__ doesn't. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/zoran/zoran_card.c115
-rw-r--r--drivers/media/video/zoran/zoran_driver.c254
2 files changed, 173 insertions, 196 deletions
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c
index 3ffdbe34ecc1..b5d228d91b06 100644
--- a/drivers/media/video/zoran/zoran_card.c
+++ b/drivers/media/video/zoran/zoran_card.c
@@ -254,7 +254,7 @@ zr36016_write (struct videocodec *codec,
254static void 254static void
255dc10_init (struct zoran *zr) 255dc10_init (struct zoran *zr)
256{ 256{
257 dprintk(3, KERN_DEBUG "%s: dc10_init()\n", ZR_DEVNAME(zr)); 257 dprintk(3, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__);
258 258
259 /* Pixel clock selection */ 259 /* Pixel clock selection */
260 GPIO(zr, 4, 0); 260 GPIO(zr, 4, 0);
@@ -266,13 +266,13 @@ dc10_init (struct zoran *zr)
266static void 266static void
267dc10plus_init (struct zoran *zr) 267dc10plus_init (struct zoran *zr)
268{ 268{
269 dprintk(3, KERN_DEBUG "%s: dc10plus_init()\n", ZR_DEVNAME(zr)); 269 dprintk(3, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__);
270} 270}
271 271
272static void 272static void
273buz_init (struct zoran *zr) 273buz_init (struct zoran *zr)
274{ 274{
275 dprintk(3, KERN_DEBUG "%s: buz_init()\n", ZR_DEVNAME(zr)); 275 dprintk(3, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__);
276 276
277 /* some stuff from Iomega */ 277 /* some stuff from Iomega */
278 pci_write_config_dword(zr->pci_dev, 0xfc, 0x90680f15); 278 pci_write_config_dword(zr->pci_dev, 0xfc, 0x90680f15);
@@ -283,7 +283,7 @@ buz_init (struct zoran *zr)
283static void 283static void
284lml33_init (struct zoran *zr) 284lml33_init (struct zoran *zr)
285{ 285{
286 dprintk(3, KERN_DEBUG "%s: lml33_init()\n", ZR_DEVNAME(zr)); 286 dprintk(3, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__);
287 287
288 GPIO(zr, 2, 1); // Set Composite input/output 288 GPIO(zr, 2, 1); // Set Composite input/output
289} 289}
@@ -758,13 +758,13 @@ zoran_check_jpg_settings (struct zoran *zr,
758 758
759 dprintk(4, 759 dprintk(4,
760 KERN_DEBUG 760 KERN_DEBUG
761 "%s: check_jpg_settings() - dec: %d, Hdcm: %d, Vdcm: %d, Tdcm: %d\n", 761 "%s: %s - dec: %d, Hdcm: %d, Vdcm: %d, Tdcm: %d\n",
762 ZR_DEVNAME(zr), settings->decimation, settings->HorDcm, 762 ZR_DEVNAME(zr), __func__, settings->decimation, settings->HorDcm,
763 settings->VerDcm, settings->TmpDcm); 763 settings->VerDcm, settings->TmpDcm);
764 dprintk(4, 764 dprintk(4,
765 KERN_DEBUG 765 KERN_DEBUG
766 "%s: check_jpg_settings() - x: %d, y: %d, w: %d, y: %d\n", 766 "%s: %s - x: %d, y: %d, w: %d, y: %d\n",
767 ZR_DEVNAME(zr), settings->img_x, settings->img_y, 767 ZR_DEVNAME(zr), __func__, settings->img_x, settings->img_y,
768 settings->img_width, settings->img_height); 768 settings->img_width, settings->img_height);
769 /* Check decimation, set default values for decimation = 1, 2, 4 */ 769 /* Check decimation, set default values for decimation = 1, 2, 4 */
770 switch (settings->decimation) { 770 switch (settings->decimation) {
@@ -796,8 +796,8 @@ zoran_check_jpg_settings (struct zoran *zr,
796 if (zr->card.type == DC10_new) { 796 if (zr->card.type == DC10_new) {
797 dprintk(1, 797 dprintk(1,
798 KERN_DEBUG 798 KERN_DEBUG
799 "%s: check_jpg_settings() - HDec by 4 is not supported on the DC10\n", 799 "%s: %s - HDec by 4 is not supported on the DC10\n",
800 ZR_DEVNAME(zr)); 800 ZR_DEVNAME(zr), __func__);
801 err0++; 801 err0++;
802 break; 802 break;
803 } 803 }
@@ -874,16 +874,16 @@ zoran_check_jpg_settings (struct zoran *zr,
874 if (!try && err0) { 874 if (!try && err0) {
875 dprintk(1, 875 dprintk(1,
876 KERN_ERR 876 KERN_ERR
877 "%s: check_jpg_settings() - error in params for decimation = 0\n", 877 "%s: %s - error in params for decimation = 0\n",
878 ZR_DEVNAME(zr)); 878 ZR_DEVNAME(zr), __func__);
879 err++; 879 err++;
880 } 880 }
881 break; 881 break;
882 default: 882 default:
883 dprintk(1, 883 dprintk(1,
884 KERN_ERR 884 KERN_ERR
885 "%s: check_jpg_settings() - decimation = %d, must be 0, 1, 2 or 4\n", 885 "%s: %s - decimation = %d, must be 0, 1, 2 or 4\n",
886 ZR_DEVNAME(zr), settings->decimation); 886 ZR_DEVNAME(zr), __func__, settings->decimation);
887 err++; 887 err++;
888 break; 888 break;
889 } 889 }
@@ -963,10 +963,8 @@ zoran_open_init_params (struct zoran *zr)
963 JPEG_MARKER_DHT | JPEG_MARKER_DQT; 963 JPEG_MARKER_DHT | JPEG_MARKER_DQT;
964 i = zoran_check_jpg_settings(zr, &zr->jpg_settings, 0); 964 i = zoran_check_jpg_settings(zr, &zr->jpg_settings, 0);
965 if (i) 965 if (i)
966 dprintk(1, 966 dprintk(1, KERN_ERR "%s: %s internal error\n",
967 KERN_ERR 967 ZR_DEVNAME(zr), __func__);
968 "%s: zoran_open_init_params() internal error\n",
969 ZR_DEVNAME(zr));
970 968
971 clear_interrupt_counters(zr); 969 clear_interrupt_counters(zr);
972 zr->testing = 0; 970 zr->testing = 0;
@@ -1005,8 +1003,8 @@ zr36057_init (struct zoran *zr)
1005 1003
1006 dprintk(1, 1004 dprintk(1,
1007 KERN_INFO 1005 KERN_INFO
1008 "%s: zr36057_init() - initializing card[%d], zr=%p\n", 1006 "%s: %s - initializing card[%d], zr=%p\n",
1009 ZR_DEVNAME(zr), zr->id, zr); 1007 ZR_DEVNAME(zr), __func__, zr->id, zr);
1010 1008
1011 /* default setup of all parameters which will persist between opens */ 1009 /* default setup of all parameters which will persist between opens */
1012 zr->user = 0; 1010 zr->user = 0;
@@ -1039,8 +1037,8 @@ zr36057_init (struct zoran *zr)
1039 if (zr->timing == NULL) { 1037 if (zr->timing == NULL) {
1040 dprintk(1, 1038 dprintk(1,
1041 KERN_WARNING 1039 KERN_WARNING
1042 "%s: zr36057_init() - default TV standard not supported by hardware. PAL will be used.\n", 1040 "%s: %s - default TV standard not supported by hardware. PAL will be used.\n",
1043 ZR_DEVNAME(zr)); 1041 ZR_DEVNAME(zr), __func__);
1044 zr->norm = V4L2_STD_PAL; 1042 zr->norm = V4L2_STD_PAL;
1045 zr->timing = zr->card.tvn[0]; 1043 zr->timing = zr->card.tvn[0];
1046 } 1044 }
@@ -1064,8 +1062,8 @@ zr36057_init (struct zoran *zr)
1064 if (!zr->stat_com || !zr->video_dev) { 1062 if (!zr->stat_com || !zr->video_dev) {
1065 dprintk(1, 1063 dprintk(1,
1066 KERN_ERR 1064 KERN_ERR
1067 "%s: zr36057_init() - kmalloc (STAT_COM) failed\n", 1065 "%s: %s - kmalloc (STAT_COM) failed\n",
1068 ZR_DEVNAME(zr)); 1066 ZR_DEVNAME(zr), __func__);
1069 err = -ENOMEM; 1067 err = -ENOMEM;
1070 goto exit_free; 1068 goto exit_free;
1071 } 1069 }
@@ -1159,10 +1157,8 @@ zoran_setup_videocodec (struct zoran *zr,
1159 1157
1160 m = kmalloc(sizeof(struct videocodec_master), GFP_KERNEL); 1158 m = kmalloc(sizeof(struct videocodec_master), GFP_KERNEL);
1161 if (!m) { 1159 if (!m) {
1162 dprintk(1, 1160 dprintk(1, KERN_ERR "%s: %s - no memory\n",
1163 KERN_ERR 1161 ZR_DEVNAME(zr), __func__);
1164 "%s: zoran_setup_videocodec() - no memory\n",
1165 ZR_DEVNAME(zr));
1166 return m; 1162 return m;
1167 } 1163 }
1168 1164
@@ -1219,19 +1215,15 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
1219 1215
1220 nr = zoran_num++; 1216 nr = zoran_num++;
1221 if (nr >= BUZ_MAX) { 1217 if (nr >= BUZ_MAX) {
1222 dprintk(1, 1218 dprintk(1, KERN_ERR "%s: driver limited to %d card(s) maximum\n",
1223 KERN_ERR
1224 "%s: driver limited to %d card(s) maximum\n",
1225 ZORAN_NAME, BUZ_MAX); 1219 ZORAN_NAME, BUZ_MAX);
1226 return -ENOENT; 1220 return -ENOENT;
1227 } 1221 }
1228 1222
1229 zr = kzalloc(sizeof(struct zoran), GFP_KERNEL); 1223 zr = kzalloc(sizeof(struct zoran), GFP_KERNEL);
1230 if (!zr) { 1224 if (!zr) {
1231 dprintk(1, 1225 dprintk(1, KERN_ERR "%s: %s - kzalloc failed\n",
1232 KERN_ERR 1226 ZORAN_NAME, __func__);
1233 "%s: find_zr36057() - kzalloc failed\n",
1234 ZORAN_NAME);
1235 return -ENOMEM; 1227 return -ENOMEM;
1236 } 1228 }
1237 if (v4l2_device_register(&pdev->dev, &zr->v4l2_dev)) 1229 if (v4l2_device_register(&pdev->dev, &zr->v4l2_dev))
@@ -1306,9 +1298,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
1306 1298
1307 zr->zr36057_mem = pci_ioremap_bar(zr->pci_dev, 0); 1299 zr->zr36057_mem = pci_ioremap_bar(zr->pci_dev, 0);
1308 if (!zr->zr36057_mem) { 1300 if (!zr->zr36057_mem) {
1309 dprintk(1, 1301 dprintk(1, KERN_ERR "%s: %s() - ioremap failed\n",
1310 KERN_ERR
1311 "%s: %s() - ioremap failed\n",
1312 ZR_DEVNAME(zr), __func__); 1302 ZR_DEVNAME(zr), __func__);
1313 goto zr_unreg; 1303 goto zr_unreg;
1314 } 1304 }
@@ -1319,18 +1309,18 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
1319 if (result == -EINVAL) { 1309 if (result == -EINVAL) {
1320 dprintk(1, 1310 dprintk(1,
1321 KERN_ERR 1311 KERN_ERR
1322 "%s: find_zr36057() - bad irq number or handler\n", 1312 "%s: %s - bad irq number or handler\n",
1323 ZR_DEVNAME(zr)); 1313 ZR_DEVNAME(zr), __func__);
1324 } else if (result == -EBUSY) { 1314 } else if (result == -EBUSY) {
1325 dprintk(1, 1315 dprintk(1,
1326 KERN_ERR 1316 KERN_ERR
1327 "%s: find_zr36057() - IRQ %d busy, change your PnP config in BIOS\n", 1317 "%s: %s - IRQ %d busy, change your PnP config in BIOS\n",
1328 ZR_DEVNAME(zr), zr->pci_dev->irq); 1318 ZR_DEVNAME(zr), __func__, zr->pci_dev->irq);
1329 } else { 1319 } else {
1330 dprintk(1, 1320 dprintk(1,
1331 KERN_ERR 1321 KERN_ERR
1332 "%s: find_zr36057() - can't assign irq, error code %d\n", 1322 "%s: %s - can't assign irq, error code %d\n",
1333 ZR_DEVNAME(zr), result); 1323 ZR_DEVNAME(zr), __func__, result);
1334 } 1324 }
1335 goto zr_unmap; 1325 goto zr_unmap;
1336 } 1326 }
@@ -1340,9 +1330,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
1340 &latency); 1330 &latency);
1341 need_latency = zr->revision > 1 ? 32 : 48; 1331 need_latency = zr->revision > 1 ? 32 : 48;
1342 if (latency != need_latency) { 1332 if (latency != need_latency) {
1343 dprintk(2, 1333 dprintk(2, KERN_INFO "%s: Changing PCI latency from %d to %d\n",
1344 KERN_INFO
1345 "%s: Changing PCI latency from %d to %d\n",
1346 ZR_DEVNAME(zr), latency, need_latency); 1334 ZR_DEVNAME(zr), latency, need_latency);
1347 pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, 1335 pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER,
1348 need_latency); 1336 need_latency);
@@ -1354,10 +1342,8 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
1354 ZR_DEVNAME(zr)); 1342 ZR_DEVNAME(zr));
1355 1343
1356 if (zoran_register_i2c(zr) < 0) { 1344 if (zoran_register_i2c(zr) < 0) {
1357 dprintk(1, 1345 dprintk(1, KERN_ERR "%s: %s - can't initialize i2c bus\n",
1358 KERN_ERR 1346 ZR_DEVNAME(zr), __func__);
1359 "%s: find_zr36057() - can't initialize i2c bus\n",
1360 ZR_DEVNAME(zr));
1361 goto zr_free_irq; 1347 goto zr_free_irq;
1362 } 1348 }
1363 1349
@@ -1409,17 +1395,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
1409 goto zr_unreg_i2c; 1395 goto zr_unreg_i2c;
1410 zr->codec = videocodec_attach(master_codec); 1396 zr->codec = videocodec_attach(master_codec);
1411 if (!zr->codec) { 1397 if (!zr->codec) {
1412 dprintk(1, 1398 dprintk(1, KERN_ERR "%s: %s - no codec found\n",
1413 KERN_ERR 1399 ZR_DEVNAME(zr), __func__);
1414 "%s: find_zr36057() - no codec found\n",
1415 ZR_DEVNAME(zr));
1416 goto zr_free_codec; 1400 goto zr_free_codec;
1417 } 1401 }
1418 if (zr->codec->type != zr->card.video_codec) { 1402 if (zr->codec->type != zr->card.video_codec) {
1419 dprintk(1, 1403 dprintk(1, KERN_ERR "%s: %s - wrong codec\n",
1420 KERN_ERR 1404 ZR_DEVNAME(zr), __func__);
1421 "%s: find_zr36057() - wrong codec\n",
1422 ZR_DEVNAME(zr));
1423 goto zr_detach_codec; 1405 goto zr_detach_codec;
1424 } 1406 }
1425 } 1407 }
@@ -1429,17 +1411,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
1429 goto zr_detach_codec; 1411 goto zr_detach_codec;
1430 zr->vfe = videocodec_attach(master_vfe); 1412 zr->vfe = videocodec_attach(master_vfe);
1431 if (!zr->vfe) { 1413 if (!zr->vfe) {
1432 dprintk(1, 1414 dprintk(1, KERN_ERR "%s: %s - no VFE found\n",
1433 KERN_ERR 1415 ZR_DEVNAME(zr), __func__);
1434 "%s: find_zr36057() - no VFE found\n",
1435 ZR_DEVNAME(zr));
1436 goto zr_free_vfe; 1416 goto zr_free_vfe;
1437 } 1417 }
1438 if (zr->vfe->type != zr->card.video_vfe) { 1418 if (zr->vfe->type != zr->card.video_vfe) {
1439 dprintk(1, 1419 dprintk(1, KERN_ERR "%s: %s = wrong VFE\n",
1440 KERN_ERR 1420 ZR_DEVNAME(zr), __func__);
1441 "%s: find_zr36057() = wrong VFE\n",
1442 ZR_DEVNAME(zr));
1443 goto zr_detach_vfe; 1421 goto zr_detach_vfe;
1444 } 1422 }
1445 } 1423 }
@@ -1447,8 +1425,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
1447 /* take care of Natoma chipset and a revision 1 zr36057 */ 1425 /* take care of Natoma chipset and a revision 1 zr36057 */
1448 if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) { 1426 if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) {
1449 zr->jpg_buffers.need_contiguous = 1; 1427 zr->jpg_buffers.need_contiguous = 1;
1450 dprintk(1, 1428 dprintk(1, KERN_INFO
1451 KERN_INFO
1452 "%s: ZR36057/Natoma bug, max. buffer size is 128K\n", 1429 "%s: ZR36057/Natoma bug, max. buffer size is 128K\n",
1453 ZR_DEVNAME(zr)); 1430 ZR_DEVNAME(zr));
1454 } 1431 }
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
index 5343a8aeb64a..60501f256b28 100644
--- a/drivers/media/video/zoran/zoran_driver.c
+++ b/drivers/media/video/zoran/zoran_driver.c
@@ -223,8 +223,8 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh)
223 if (fh->buffers.buffer[i].v4l.fbuffer) 223 if (fh->buffers.buffer[i].v4l.fbuffer)
224 dprintk(2, 224 dprintk(2,
225 KERN_WARNING 225 KERN_WARNING
226 "%s: v4l_fbuffer_alloc() - buffer %d already allocated!?\n", 226 "%s: %s - buffer %d already allocated!?\n",
227 ZR_DEVNAME(zr), i); 227 ZR_DEVNAME(zr), __func__, i);
228 228
229 //udelay(20); 229 //udelay(20);
230 mem = kmalloc(fh->buffers.buffer_size, 230 mem = kmalloc(fh->buffers.buffer_size,
@@ -232,8 +232,8 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh)
232 if (!mem) { 232 if (!mem) {
233 dprintk(1, 233 dprintk(1,
234 KERN_ERR 234 KERN_ERR
235 "%s: v4l_fbuffer_alloc() - kmalloc for V4L buf %d failed\n", 235 "%s: %s - kmalloc for V4L buf %d failed\n",
236 ZR_DEVNAME(zr), i); 236 ZR_DEVNAME(zr), __func__, i);
237 v4l_fbuffer_free(fh); 237 v4l_fbuffer_free(fh);
238 return -ENOBUFS; 238 return -ENOBUFS;
239 } 239 }
@@ -245,8 +245,8 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh)
245 SetPageReserved(virt_to_page(mem + off)); 245 SetPageReserved(virt_to_page(mem + off));
246 dprintk(4, 246 dprintk(4,
247 KERN_INFO 247 KERN_INFO
248 "%s: v4l_fbuffer_alloc() - V4L frame %d mem 0x%lx (bus: 0x%lx)\n", 248 "%s: %s - V4L frame %d mem 0x%lx (bus: 0x%lx)\n",
249 ZR_DEVNAME(zr), i, (unsigned long) mem, 249 ZR_DEVNAME(zr), __func__, i, (unsigned long) mem,
250 virt_to_bus(mem)); 250 virt_to_bus(mem));
251 } 251 }
252 252
@@ -262,7 +262,7 @@ static void v4l_fbuffer_free(struct zoran_fh *fh)
262 int i, off; 262 int i, off;
263 unsigned char *mem; 263 unsigned char *mem;
264 264
265 dprintk(4, KERN_INFO "%s: v4l_fbuffer_free()\n", ZR_DEVNAME(zr)); 265 dprintk(4, KERN_INFO "%s: %s\n", ZR_DEVNAME(zr), __func__);
266 266
267 for (i = 0; i < fh->buffers.num_buffers; i++) { 267 for (i = 0; i < fh->buffers.num_buffers; i++) {
268 if (!fh->buffers.buffer[i].v4l.fbuffer) 268 if (!fh->buffers.buffer[i].v4l.fbuffer)
@@ -317,8 +317,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
317 if (fh->buffers.buffer[i].jpg.frag_tab) 317 if (fh->buffers.buffer[i].jpg.frag_tab)
318 dprintk(2, 318 dprintk(2,
319 KERN_WARNING 319 KERN_WARNING
320 "%s: jpg_fbuffer_alloc() - buffer %d already allocated!?\n", 320 "%s: %s - buffer %d already allocated!?\n",
321 ZR_DEVNAME(zr), i); 321 ZR_DEVNAME(zr), __func__, i);
322 322
323 /* Allocate fragment table for this buffer */ 323 /* Allocate fragment table for this buffer */
324 324
@@ -326,8 +326,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
326 if (mem == 0) { 326 if (mem == 0) {
327 dprintk(1, 327 dprintk(1,
328 KERN_ERR 328 KERN_ERR
329 "%s: jpg_fbuffer_alloc() - get_zeroed_page (frag_tab) failed for buffer %d\n", 329 "%s: %s - get_zeroed_page (frag_tab) failed for buffer %d\n",
330 ZR_DEVNAME(zr), i); 330 ZR_DEVNAME(zr), __func__, i);
331 jpg_fbuffer_free(fh); 331 jpg_fbuffer_free(fh);
332 return -ENOBUFS; 332 return -ENOBUFS;
333 } 333 }
@@ -339,8 +339,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
339 if (mem == NULL) { 339 if (mem == NULL) {
340 dprintk(1, 340 dprintk(1,
341 KERN_ERR 341 KERN_ERR
342 "%s: jpg_fbuffer_alloc() - kmalloc failed for buffer %d\n", 342 "%s: %s - kmalloc failed for buffer %d\n",
343 ZR_DEVNAME(zr), i); 343 ZR_DEVNAME(zr), __func__, i);
344 jpg_fbuffer_free(fh); 344 jpg_fbuffer_free(fh);
345 return -ENOBUFS; 345 return -ENOBUFS;
346 } 346 }
@@ -357,8 +357,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
357 if (mem == NULL) { 357 if (mem == NULL) {
358 dprintk(1, 358 dprintk(1,
359 KERN_ERR 359 KERN_ERR
360 "%s: jpg_fbuffer_alloc() - get_zeroed_page failed for buffer %d\n", 360 "%s: %s - get_zeroed_page failed for buffer %d\n",
361 ZR_DEVNAME(zr), i); 361 ZR_DEVNAME(zr), __func__, i);
362 jpg_fbuffer_free(fh); 362 jpg_fbuffer_free(fh);
363 return -ENOBUFS; 363 return -ENOBUFS;
364 } 364 }
@@ -375,8 +375,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
375 } 375 }
376 376
377 dprintk(4, 377 dprintk(4,
378 KERN_DEBUG "%s: jpg_fbuffer_alloc() - %d KB allocated\n", 378 KERN_DEBUG "%s: %s - %d KB allocated\n",
379 ZR_DEVNAME(zr), 379 ZR_DEVNAME(zr), __func__,
380 (fh->buffers.num_buffers * fh->buffers.buffer_size) >> 10); 380 (fh->buffers.num_buffers * fh->buffers.buffer_size) >> 10);
381 381
382 fh->buffers.allocated = 1; 382 fh->buffers.allocated = 1;
@@ -393,7 +393,7 @@ static void jpg_fbuffer_free(struct zoran_fh *fh)
393 __le32 frag_tab; 393 __le32 frag_tab;
394 struct zoran_buffer *buffer; 394 struct zoran_buffer *buffer;
395 395
396 dprintk(4, KERN_DEBUG "%s: jpg_fbuffer_free()\n", ZR_DEVNAME(zr)); 396 dprintk(4, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__);
397 397
398 for (i = 0, buffer = &fh->buffers.buffer[0]; 398 for (i = 0, buffer = &fh->buffers.buffer[0];
399 i < fh->buffers.num_buffers; i++, buffer++) { 399 i < fh->buffers.num_buffers; i++, buffer++) {
@@ -450,8 +450,8 @@ zoran_v4l_set_format (struct zoran_fh *fh,
450 height > BUZ_MAX_HEIGHT || width > BUZ_MAX_WIDTH) { 450 height > BUZ_MAX_HEIGHT || width > BUZ_MAX_WIDTH) {
451 dprintk(1, 451 dprintk(1,
452 KERN_ERR 452 KERN_ERR
453 "%s: v4l_set_format() - wrong frame size (%dx%d)\n", 453 "%s: %s - wrong frame size (%dx%d)\n",
454 ZR_DEVNAME(zr), width, height); 454 ZR_DEVNAME(zr), __func__, width, height);
455 return -EINVAL; 455 return -EINVAL;
456 } 456 }
457 457
@@ -461,8 +461,8 @@ zoran_v4l_set_format (struct zoran_fh *fh,
461 if (height * width * bpp > fh->buffers.buffer_size) { 461 if (height * width * bpp > fh->buffers.buffer_size) {
462 dprintk(1, 462 dprintk(1,
463 KERN_ERR 463 KERN_ERR
464 "%s: v4l_set_format() - video buffer size (%d kB) is too small\n", 464 "%s: %s - video buffer size (%d kB) is too small\n",
465 ZR_DEVNAME(zr), fh->buffers.buffer_size >> 10); 465 ZR_DEVNAME(zr), __func__, fh->buffers.buffer_size >> 10);
466 return -EINVAL; 466 return -EINVAL;
467 } 467 }
468 468
@@ -471,8 +471,8 @@ zoran_v4l_set_format (struct zoran_fh *fh,
471 if ((bpp == 2 && (width & 1)) || (bpp == 3 && (width & 3))) { 471 if ((bpp == 2 && (width & 1)) || (bpp == 3 && (width & 3))) {
472 dprintk(1, 472 dprintk(1,
473 KERN_ERR 473 KERN_ERR
474 "%s: v4l_set_format() - wrong frame alignment\n", 474 "%s: %s - wrong frame alignment\n",
475 ZR_DEVNAME(zr)); 475 ZR_DEVNAME(zr), __func__);
476 return -EINVAL; 476 return -EINVAL;
477 } 477 }
478 478
@@ -493,8 +493,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
493 if (!fh->buffers.allocated) { 493 if (!fh->buffers.allocated) {
494 dprintk(1, 494 dprintk(1,
495 KERN_ERR 495 KERN_ERR
496 "%s: v4l_queue_frame() - buffers not yet allocated\n", 496 "%s: %s - buffers not yet allocated\n",
497 ZR_DEVNAME(zr)); 497 ZR_DEVNAME(zr), __func__);
498 res = -ENOMEM; 498 res = -ENOMEM;
499 } 499 }
500 500
@@ -502,8 +502,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
502 if (num >= fh->buffers.num_buffers || num < 0) { 502 if (num >= fh->buffers.num_buffers || num < 0) {
503 dprintk(1, 503 dprintk(1,
504 KERN_ERR 504 KERN_ERR
505 "%s: v4l_queue_frame() - buffer %d is out of range\n", 505 "%s: %s - buffer %d is out of range\n",
506 ZR_DEVNAME(zr), num); 506 ZR_DEVNAME(zr), __func__, num);
507 res = -EINVAL; 507 res = -EINVAL;
508 } 508 }
509 509
@@ -516,8 +516,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
516 } else { 516 } else {
517 dprintk(1, 517 dprintk(1,
518 KERN_ERR 518 KERN_ERR
519 "%s: v4l_queue_frame() - another session is already capturing\n", 519 "%s: %s - another session is already capturing\n",
520 ZR_DEVNAME(zr)); 520 ZR_DEVNAME(zr), __func__);
521 res = -EBUSY; 521 res = -EBUSY;
522 } 522 }
523 } 523 }
@@ -536,8 +536,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
536 case BUZ_STATE_DONE: 536 case BUZ_STATE_DONE:
537 dprintk(2, 537 dprintk(2,
538 KERN_WARNING 538 KERN_WARNING
539 "%s: v4l_queue_frame() - queueing buffer %d in state DONE!?\n", 539 "%s: %s - queueing buffer %d in state DONE!?\n",
540 ZR_DEVNAME(zr), num); 540 ZR_DEVNAME(zr), __func__, num);
541 case BUZ_STATE_USER: 541 case BUZ_STATE_USER:
542 /* since there is at least one unused buffer there's room for at least 542 /* since there is at least one unused buffer there's room for at least
543 * one more pend[] entry */ 543 * one more pend[] entry */
@@ -571,16 +571,16 @@ static int v4l_sync(struct zoran_fh *fh, int frame)
571 if (fh->buffers.active == ZORAN_FREE) { 571 if (fh->buffers.active == ZORAN_FREE) {
572 dprintk(1, 572 dprintk(1,
573 KERN_ERR 573 KERN_ERR
574 "%s: v4l_sync() - no grab active for this session\n", 574 "%s: %s - no grab active for this session\n",
575 ZR_DEVNAME(zr)); 575 ZR_DEVNAME(zr), __func__);
576 return -EINVAL; 576 return -EINVAL;
577 } 577 }
578 578
579 /* check passed-in frame number */ 579 /* check passed-in frame number */
580 if (frame >= fh->buffers.num_buffers || frame < 0) { 580 if (frame >= fh->buffers.num_buffers || frame < 0) {
581 dprintk(1, 581 dprintk(1,
582 KERN_ERR "%s: v4l_sync() - frame %d is invalid\n", 582 KERN_ERR "%s: %s - frame %d is invalid\n",
583 ZR_DEVNAME(zr), frame); 583 ZR_DEVNAME(zr), __func__, frame);
584 return -EINVAL; 584 return -EINVAL;
585 } 585 }
586 586
@@ -588,8 +588,8 @@ static int v4l_sync(struct zoran_fh *fh, int frame)
588 if (zr->v4l_buffers.buffer[frame].state == BUZ_STATE_USER) { 588 if (zr->v4l_buffers.buffer[frame].state == BUZ_STATE_USER) {
589 dprintk(1, 589 dprintk(1,
590 KERN_ERR 590 KERN_ERR
591 "%s: v4l_sync() - attempt to sync on a buffer which was not queued?\n", 591 "%s: %s - attempt to sync on a buffer which was not queued?\n",
592 ZR_DEVNAME(zr)); 592 ZR_DEVNAME(zr), __func__);
593 return -EPROTO; 593 return -EPROTO;
594 } 594 }
595 595
@@ -603,8 +603,8 @@ static int v4l_sync(struct zoran_fh *fh, int frame)
603 /* buffer should now be in BUZ_STATE_DONE */ 603 /* buffer should now be in BUZ_STATE_DONE */
604 if (zr->v4l_buffers.buffer[frame].state != BUZ_STATE_DONE) 604 if (zr->v4l_buffers.buffer[frame].state != BUZ_STATE_DONE)
605 dprintk(2, 605 dprintk(2,
606 KERN_ERR "%s: v4l_sync() - internal state error\n", 606 KERN_ERR "%s: %s - internal state error\n",
607 ZR_DEVNAME(zr)); 607 ZR_DEVNAME(zr), __func__);
608 608
609 zr->v4l_buffers.buffer[frame].state = BUZ_STATE_USER; 609 zr->v4l_buffers.buffer[frame].state = BUZ_STATE_USER;
610 fh->buffers.buffer[frame] = zr->v4l_buffers.buffer[frame]; 610 fh->buffers.buffer[frame] = zr->v4l_buffers.buffer[frame];
@@ -640,8 +640,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
640 if (!fh->buffers.allocated) { 640 if (!fh->buffers.allocated) {
641 dprintk(1, 641 dprintk(1,
642 KERN_ERR 642 KERN_ERR
643 "%s: jpg_queue_frame() - buffers not yet allocated\n", 643 "%s: %s - buffers not yet allocated\n",
644 ZR_DEVNAME(zr)); 644 ZR_DEVNAME(zr), __func__);
645 return -ENOMEM; 645 return -ENOMEM;
646 } 646 }
647 647
@@ -649,8 +649,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
649 if (num >= fh->buffers.num_buffers || num < 0) { 649 if (num >= fh->buffers.num_buffers || num < 0) {
650 dprintk(1, 650 dprintk(1,
651 KERN_ERR 651 KERN_ERR
652 "%s: jpg_queue_frame() - buffer %d out of range\n", 652 "%s: %s - buffer %d out of range\n",
653 ZR_DEVNAME(zr), num); 653 ZR_DEVNAME(zr), __func__, num);
654 return -EINVAL; 654 return -EINVAL;
655 } 655 }
656 656
@@ -661,8 +661,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
661 /* wrong codec mode active - invalid */ 661 /* wrong codec mode active - invalid */
662 dprintk(1, 662 dprintk(1,
663 KERN_ERR 663 KERN_ERR
664 "%s: jpg_queue_frame() - codec in wrong mode\n", 664 "%s: %s - codec in wrong mode\n",
665 ZR_DEVNAME(zr)); 665 ZR_DEVNAME(zr), __func__);
666 return -EINVAL; 666 return -EINVAL;
667 } 667 }
668 668
@@ -673,8 +673,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
673 } else { 673 } else {
674 dprintk(1, 674 dprintk(1,
675 KERN_ERR 675 KERN_ERR
676 "%s: jpg_queue_frame() - another session is already capturing\n", 676 "%s: %s - another session is already capturing\n",
677 ZR_DEVNAME(zr)); 677 ZR_DEVNAME(zr), __func__);
678 res = -EBUSY; 678 res = -EBUSY;
679 } 679 }
680 } 680 }
@@ -691,8 +691,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
691 case BUZ_STATE_DONE: 691 case BUZ_STATE_DONE:
692 dprintk(2, 692 dprintk(2,
693 KERN_WARNING 693 KERN_WARNING
694 "%s: jpg_queue_frame() - queing frame in BUZ_STATE_DONE state!?\n", 694 "%s: %s - queing frame in BUZ_STATE_DONE state!?\n",
695 ZR_DEVNAME(zr)); 695 ZR_DEVNAME(zr), __func__);
696 case BUZ_STATE_USER: 696 case BUZ_STATE_USER:
697 /* since there is at least one unused buffer there's room for at 697 /* since there is at least one unused buffer there's room for at
698 *least one more pend[] entry */ 698 *least one more pend[] entry */
@@ -732,8 +732,8 @@ static int jpg_qbuf(struct zoran_fh *fh, int frame, enum zoran_codec_mode mode)
732 if (fh->buffers.active == ZORAN_FREE) { 732 if (fh->buffers.active == ZORAN_FREE) {
733 dprintk(1, 733 dprintk(1,
734 KERN_ERR 734 KERN_ERR
735 "%s: jpg_qbuf(-1) - session not active\n", 735 "%s: %s(-1) - session not active\n",
736 ZR_DEVNAME(zr)); 736 ZR_DEVNAME(zr), __func__);
737 return -EINVAL; 737 return -EINVAL;
738 } 738 }
739 fh->buffers.active = zr->jpg_buffers.active = ZORAN_FREE; 739 fh->buffers.active = zr->jpg_buffers.active = ZORAN_FREE;
@@ -743,8 +743,8 @@ static int jpg_qbuf(struct zoran_fh *fh, int frame, enum zoran_codec_mode mode)
743 } else { 743 } else {
744 dprintk(1, 744 dprintk(1,
745 KERN_ERR 745 KERN_ERR
746 "%s: jpg_qbuf() - stop streaming but not in streaming mode\n", 746 "%s: %s - stop streaming but not in streaming mode\n",
747 ZR_DEVNAME(zr)); 747 ZR_DEVNAME(zr), __func__);
748 return -EINVAL; 748 return -EINVAL;
749 } 749 }
750 } 750 }
@@ -772,16 +772,16 @@ static int jpg_sync(struct zoran_fh *fh, struct zoran_sync *bs)
772 if (fh->buffers.active == ZORAN_FREE) { 772 if (fh->buffers.active == ZORAN_FREE) {
773 dprintk(1, 773 dprintk(1,
774 KERN_ERR 774 KERN_ERR
775 "%s: jpg_sync() - capture is not currently active\n", 775 "%s: %s - capture is not currently active\n",
776 ZR_DEVNAME(zr)); 776 ZR_DEVNAME(zr), __func__);
777 return -EINVAL; 777 return -EINVAL;
778 } 778 }
779 if (zr->codec_mode != BUZ_MODE_MOTION_DECOMPRESS && 779 if (zr->codec_mode != BUZ_MODE_MOTION_DECOMPRESS &&
780 zr->codec_mode != BUZ_MODE_MOTION_COMPRESS) { 780 zr->codec_mode != BUZ_MODE_MOTION_COMPRESS) {
781 dprintk(1, 781 dprintk(1,
782 KERN_ERR 782 KERN_ERR
783 "%s: jpg_sync() - codec not in streaming mode\n", 783 "%s: %s - codec not in streaming mode\n",
784 ZR_DEVNAME(zr)); 784 ZR_DEVNAME(zr), __func__);
785 return -EINVAL; 785 return -EINVAL;
786 } 786 }
787 if (!wait_event_interruptible_timeout(zr->jpg_capq, 787 if (!wait_event_interruptible_timeout(zr->jpg_capq,
@@ -796,8 +796,8 @@ static int jpg_sync(struct zoran_fh *fh, struct zoran_sync *bs)
796 sizeof(isr), &isr); 796 sizeof(isr), &isr);
797 dprintk(1, 797 dprintk(1,
798 KERN_ERR 798 KERN_ERR
799 "%s: jpg_sync() - timeout: codec isr=0x%02x\n", 799 "%s: %s - timeout: codec isr=0x%02x\n",
800 ZR_DEVNAME(zr), isr); 800 ZR_DEVNAME(zr), __func__, isr);
801 801
802 return -ETIME; 802 return -ETIME;
803 803
@@ -815,8 +815,8 @@ static int jpg_sync(struct zoran_fh *fh, struct zoran_sync *bs)
815 /* buffer should now be in BUZ_STATE_DONE */ 815 /* buffer should now be in BUZ_STATE_DONE */
816 if (zr->jpg_buffers.buffer[frame].state != BUZ_STATE_DONE) 816 if (zr->jpg_buffers.buffer[frame].state != BUZ_STATE_DONE)
817 dprintk(2, 817 dprintk(2,
818 KERN_ERR "%s: jpg_sync() - internal state error\n", 818 KERN_ERR "%s: %s - internal state error\n",
819 ZR_DEVNAME(zr)); 819 ZR_DEVNAME(zr), __func__);
820 820
821 *bs = zr->jpg_buffers.buffer[frame].bs; 821 *bs = zr->jpg_buffers.buffer[frame].bs;
822 bs->frame = frame; 822 bs->frame = frame;
@@ -909,8 +909,8 @@ static int zoran_open(struct file *file)
909 struct zoran_fh *fh; 909 struct zoran_fh *fh;
910 int res, first_open = 0; 910 int res, first_open = 0;
911 911
912 dprintk(2, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", 912 dprintk(2, KERN_INFO "%s: %s(%s, pid=[%d]), users(-)=%d\n",
913 ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user + 1); 913 ZR_DEVNAME(zr), __func__, current->comm, task_pid_nr(current), zr->user + 1);
914 914
915 lock_kernel(); 915 lock_kernel();
916 916
@@ -926,8 +926,8 @@ static int zoran_open(struct file *file)
926 if (!fh) { 926 if (!fh) {
927 dprintk(1, 927 dprintk(1,
928 KERN_ERR 928 KERN_ERR
929 "%s: zoran_open() - allocation of zoran_fh failed\n", 929 "%s: %s - allocation of zoran_fh failed\n",
930 ZR_DEVNAME(zr)); 930 ZR_DEVNAME(zr), __func__);
931 res = -ENOMEM; 931 res = -ENOMEM;
932 goto fail_unlock; 932 goto fail_unlock;
933 } 933 }
@@ -938,8 +938,8 @@ static int zoran_open(struct file *file)
938 if (!fh->overlay_mask) { 938 if (!fh->overlay_mask) {
939 dprintk(1, 939 dprintk(1,
940 KERN_ERR 940 KERN_ERR
941 "%s: zoran_open() - allocation of overlay_mask failed\n", 941 "%s: %s - allocation of overlay_mask failed\n",
942 ZR_DEVNAME(zr)); 942 ZR_DEVNAME(zr), __func__);
943 res = -ENOMEM; 943 res = -ENOMEM;
944 goto fail_fh; 944 goto fail_fh;
945 } 945 }
@@ -983,8 +983,8 @@ zoran_close(struct file *file)
983 struct zoran_fh *fh = file->private_data; 983 struct zoran_fh *fh = file->private_data;
984 struct zoran *zr = fh->zr; 984 struct zoran *zr = fh->zr;
985 985
986 dprintk(2, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", 986 dprintk(2, KERN_INFO "%s: %s(%s, pid=[%d]), users(+)=%d\n",
987 ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user - 1); 987 ZR_DEVNAME(zr), __func__, current->comm, task_pid_nr(current), zr->user - 1);
988 988
989 /* kernel locks (fs/device.c), so don't do that ourselves 989 /* kernel locks (fs/device.c), so don't do that ourselves
990 * (prevents deadlocks) */ 990 * (prevents deadlocks) */
@@ -1029,7 +1029,7 @@ zoran_close(struct file *file)
1029 kfree(fh->overlay_mask); 1029 kfree(fh->overlay_mask);
1030 kfree(fh); 1030 kfree(fh);
1031 1031
1032 dprintk(4, KERN_INFO "%s: zoran_close() done\n", ZR_DEVNAME(zr)); 1032 dprintk(4, KERN_INFO "%s: %s done\n", ZR_DEVNAME(zr), __func__);
1033 1033
1034 return 0; 1034 return 0;
1035} 1035}
@@ -1091,8 +1091,8 @@ static int setup_fbuffer(struct zoran_fh *fh,
1091 * friendly and silently do as if nothing went wrong */ 1091 * friendly and silently do as if nothing went wrong */
1092 dprintk(3, 1092 dprintk(3,
1093 KERN_ERR 1093 KERN_ERR
1094 "%s: setup_fbuffer() - forced overlay turnoff because framebuffer changed\n", 1094 "%s: %s - forced overlay turnoff because framebuffer changed\n",
1095 ZR_DEVNAME(zr)); 1095 ZR_DEVNAME(zr), __func__);
1096 zr36057_overlay(zr, 0); 1096 zr36057_overlay(zr, 0);
1097 } 1097 }
1098#endif 1098#endif
@@ -1100,22 +1100,22 @@ static int setup_fbuffer(struct zoran_fh *fh,
1100 if (!(fmt->flags & ZORAN_FORMAT_OVERLAY)) { 1100 if (!(fmt->flags & ZORAN_FORMAT_OVERLAY)) {
1101 dprintk(1, 1101 dprintk(1,
1102 KERN_ERR 1102 KERN_ERR
1103 "%s: setup_fbuffer() - no valid overlay format given\n", 1103 "%s: %s - no valid overlay format given\n",
1104 ZR_DEVNAME(zr)); 1104 ZR_DEVNAME(zr), __func__);
1105 return -EINVAL; 1105 return -EINVAL;
1106 } 1106 }
1107 if (height <= 0 || width <= 0 || bytesperline <= 0) { 1107 if (height <= 0 || width <= 0 || bytesperline <= 0) {
1108 dprintk(1, 1108 dprintk(1,
1109 KERN_ERR 1109 KERN_ERR
1110 "%s: setup_fbuffer() - invalid height/width/bpl value (%d|%d|%d)\n", 1110 "%s: %s - invalid height/width/bpl value (%d|%d|%d)\n",
1111 ZR_DEVNAME(zr), width, height, bytesperline); 1111 ZR_DEVNAME(zr), __func__, width, height, bytesperline);
1112 return -EINVAL; 1112 return -EINVAL;
1113 } 1113 }
1114 if (bytesperline & 3) { 1114 if (bytesperline & 3) {
1115 dprintk(1, 1115 dprintk(1,
1116 KERN_ERR 1116 KERN_ERR
1117 "%s: setup_fbuffer() - bytesperline (%d) must be 4-byte aligned\n", 1117 "%s: %s - bytesperline (%d) must be 4-byte aligned\n",
1118 ZR_DEVNAME(zr), bytesperline); 1118 ZR_DEVNAME(zr), __func__, bytesperline);
1119 return -EINVAL; 1119 return -EINVAL;
1120 } 1120 }
1121 1121
@@ -1144,16 +1144,16 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height
1144 if (!zr->vbuf_base) { 1144 if (!zr->vbuf_base) {
1145 dprintk(1, 1145 dprintk(1,
1146 KERN_ERR 1146 KERN_ERR
1147 "%s: setup_window() - frame buffer has to be set first\n", 1147 "%s: %s - frame buffer has to be set first\n",
1148 ZR_DEVNAME(zr)); 1148 ZR_DEVNAME(zr), __func__);
1149 return -EINVAL; 1149 return -EINVAL;
1150 } 1150 }
1151 1151
1152 if (!fh->overlay_settings.format) { 1152 if (!fh->overlay_settings.format) {
1153 dprintk(1, 1153 dprintk(1,
1154 KERN_ERR 1154 KERN_ERR
1155 "%s: setup_window() - no overlay format set\n", 1155 "%s: %s - no overlay format set\n",
1156 ZR_DEVNAME(zr)); 1156 ZR_DEVNAME(zr), __func__);
1157 return -EINVAL; 1157 return -EINVAL;
1158 } 1158 }
1159 1159
@@ -1183,8 +1183,8 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height
1183 width > BUZ_MAX_WIDTH || height > BUZ_MAX_HEIGHT) { 1183 width > BUZ_MAX_WIDTH || height > BUZ_MAX_HEIGHT) {
1184 dprintk(1, 1184 dprintk(1,
1185 KERN_ERR 1185 KERN_ERR
1186 "%s: setup_window() - width = %d or height = %d invalid\n", 1186 "%s: %s - width = %d or height = %d invalid\n",
1187 ZR_DEVNAME(zr), width, height); 1187 ZR_DEVNAME(zr), __func__, width, height);
1188 return -EINVAL; 1188 return -EINVAL;
1189 } 1189 }
1190 1190
@@ -1226,8 +1226,8 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height
1226 if (vcp == NULL) { 1226 if (vcp == NULL) {
1227 dprintk(1, 1227 dprintk(1,
1228 KERN_ERR 1228 KERN_ERR
1229 "%s: setup_window() - Alloc of clip mask failed\n", 1229 "%s: %s - Alloc of clip mask failed\n",
1230 ZR_DEVNAME(zr)); 1230 ZR_DEVNAME(zr), __func__);
1231 return -ENOMEM; 1231 return -ENOMEM;
1232 } 1232 }
1233 if (copy_from_user 1233 if (copy_from_user
@@ -1265,16 +1265,16 @@ static int setup_overlay(struct zoran_fh *fh, int on)
1265 fh->overlay_active == ZORAN_FREE) { 1265 fh->overlay_active == ZORAN_FREE) {
1266 dprintk(1, 1266 dprintk(1,
1267 KERN_ERR 1267 KERN_ERR
1268 "%s: setup_overlay() - overlay is already active for another session\n", 1268 "%s: %s - overlay is already active for another session\n",
1269 ZR_DEVNAME(zr)); 1269 ZR_DEVNAME(zr), __func__);
1270 return -EBUSY; 1270 return -EBUSY;
1271 } 1271 }
1272 if (!on && zr->overlay_active != ZORAN_FREE && 1272 if (!on && zr->overlay_active != ZORAN_FREE &&
1273 fh->overlay_active == ZORAN_FREE) { 1273 fh->overlay_active == ZORAN_FREE) {
1274 dprintk(1, 1274 dprintk(1,
1275 KERN_ERR 1275 KERN_ERR
1276 "%s: setup_overlay() - you cannot cancel someone else's session\n", 1276 "%s: %s - you cannot cancel someone else's session\n",
1277 ZR_DEVNAME(zr)); 1277 ZR_DEVNAME(zr), __func__);
1278 return -EPERM; 1278 return -EPERM;
1279 } 1279 }
1280 1280
@@ -1290,15 +1290,15 @@ static int setup_overlay(struct zoran_fh *fh, int on)
1290 if (!zr->vbuf_base || !fh->overlay_settings.is_set) { 1290 if (!zr->vbuf_base || !fh->overlay_settings.is_set) {
1291 dprintk(1, 1291 dprintk(1,
1292 KERN_ERR 1292 KERN_ERR
1293 "%s: setup_overlay() - buffer or window not set\n", 1293 "%s: %s - buffer or window not set\n",
1294 ZR_DEVNAME(zr)); 1294 ZR_DEVNAME(zr), __func__);
1295 return -EINVAL; 1295 return -EINVAL;
1296 } 1296 }
1297 if (!fh->overlay_settings.format) { 1297 if (!fh->overlay_settings.format) {
1298 dprintk(1, 1298 dprintk(1,
1299 KERN_ERR 1299 KERN_ERR
1300 "%s: setup_overlay() - no overlay format set\n", 1300 "%s: %s - no overlay format set\n",
1301 ZR_DEVNAME(zr)); 1301 ZR_DEVNAME(zr), __func__);
1302 return -EINVAL; 1302 return -EINVAL;
1303 } 1303 }
1304 zr->overlay_active = fh->overlay_active = ZORAN_LOCKED; 1304 zr->overlay_active = fh->overlay_active = ZORAN_LOCKED;
@@ -1331,8 +1331,8 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh,
1331 !fh->buffers.allocated) { 1331 !fh->buffers.allocated) {
1332 dprintk(1, 1332 dprintk(1,
1333 KERN_ERR 1333 KERN_ERR
1334 "%s: v4l2_buffer_status() - wrong number or buffers not allocated\n", 1334 "%s: %s - wrong number or buffers not allocated\n",
1335 ZR_DEVNAME(zr)); 1335 ZR_DEVNAME(zr), __func__);
1336 return -EINVAL; 1336 return -EINVAL;
1337 } 1337 }
1338 1338
@@ -1375,8 +1375,8 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh,
1375 !fh->buffers.allocated) { 1375 !fh->buffers.allocated) {
1376 dprintk(1, 1376 dprintk(1,
1377 KERN_ERR 1377 KERN_ERR
1378 "%s: v4l2_buffer_status() - wrong number or buffers not allocated\n", 1378 "%s: %s - wrong number or buffers not allocated\n",
1379 ZR_DEVNAME(zr)); 1379 ZR_DEVNAME(zr), __func__);
1380 return -EINVAL; 1380 return -EINVAL;
1381 } 1381 }
1382 1382
@@ -1410,8 +1410,8 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh,
1410 1410
1411 dprintk(5, 1411 dprintk(5,
1412 KERN_ERR 1412 KERN_ERR
1413 "%s: v4l2_buffer_status() - invalid buffer type|map_mode (%d|%d)\n", 1413 "%s: %s - invalid buffer type|map_mode (%d|%d)\n",
1414 ZR_DEVNAME(zr), buf->type, fh->map_mode); 1414 ZR_DEVNAME(zr), __func__, buf->type, fh->map_mode);
1415 return -EINVAL; 1415 return -EINVAL;
1416 } 1416 }
1417 1417
@@ -1432,15 +1432,15 @@ zoran_set_norm (struct zoran *zr,
1432 zr->jpg_buffers.active != ZORAN_FREE) { 1432 zr->jpg_buffers.active != ZORAN_FREE) {
1433 dprintk(1, 1433 dprintk(1,
1434 KERN_WARNING 1434 KERN_WARNING
1435 "%s: set_norm() called while in playback/capture mode\n", 1435 "%s: %s called while in playback/capture mode\n",
1436 ZR_DEVNAME(zr)); 1436 ZR_DEVNAME(zr), __func__);
1437 return -EBUSY; 1437 return -EBUSY;
1438 } 1438 }
1439 1439
1440 if (!(norm & zr->card.norms)) { 1440 if (!(norm & zr->card.norms)) {
1441 dprintk(1, 1441 dprintk(1,
1442 KERN_ERR "%s: set_norm() - unsupported norm %llx\n", 1442 KERN_ERR "%s: %s - unsupported norm %llx\n",
1443 ZR_DEVNAME(zr), norm); 1443 ZR_DEVNAME(zr), __func__, norm);
1444 return -EINVAL; 1444 return -EINVAL;
1445 } 1445 }
1446 1446
@@ -1458,8 +1458,8 @@ zoran_set_norm (struct zoran *zr,
1458 if (status & V4L2_IN_ST_NO_SIGNAL) { 1458 if (status & V4L2_IN_ST_NO_SIGNAL) {
1459 dprintk(1, 1459 dprintk(1,
1460 KERN_ERR 1460 KERN_ERR
1461 "%s: set_norm() - no norm detected\n", 1461 "%s: %s - no norm detected\n",
1462 ZR_DEVNAME(zr)); 1462 ZR_DEVNAME(zr), __func__);
1463 /* reset norm */ 1463 /* reset norm */
1464 decoder_s_std(zr, zr->norm); 1464 decoder_s_std(zr, zr->norm);
1465 return -EIO; 1465 return -EIO;
@@ -1506,16 +1506,16 @@ zoran_set_input (struct zoran *zr,
1506 zr->jpg_buffers.active != ZORAN_FREE) { 1506 zr->jpg_buffers.active != ZORAN_FREE) {
1507 dprintk(1, 1507 dprintk(1,
1508 KERN_WARNING 1508 KERN_WARNING
1509 "%s: set_input() called while in playback/capture mode\n", 1509 "%s: %s called while in playback/capture mode\n",
1510 ZR_DEVNAME(zr)); 1510 ZR_DEVNAME(zr), __func__);
1511 return -EBUSY; 1511 return -EBUSY;
1512 } 1512 }
1513 1513
1514 if (input < 0 || input >= zr->card.inputs) { 1514 if (input < 0 || input >= zr->card.inputs) {
1515 dprintk(1, 1515 dprintk(1,
1516 KERN_ERR 1516 KERN_ERR
1517 "%s: set_input() - unnsupported input %d\n", 1517 "%s: %s - unnsupported input %d\n",
1518 ZR_DEVNAME(zr), input); 1518 ZR_DEVNAME(zr), __func__, input);
1519 return -EINVAL; 1519 return -EINVAL;
1520 } 1520 }
1521 1521
@@ -3101,8 +3101,8 @@ zoran_poll (struct file *file,
3101 default: 3101 default:
3102 dprintk(1, 3102 dprintk(1,
3103 KERN_ERR 3103 KERN_ERR
3104 "%s: zoran_poll() - internal error, unknown map_mode=%d\n", 3104 "%s: %s - internal error, unknown map_mode=%d\n",
3105 ZR_DEVNAME(zr), fh->map_mode); 3105 ZR_DEVNAME(zr), __func__, fh->map_mode);
3106 res = POLLNVAL; 3106 res = POLLNVAL;
3107 } 3107 }
3108 3108
@@ -3205,16 +3205,16 @@ zoran_mmap (struct file *file,
3205 int res = 0; 3205 int res = 0;
3206 3206
3207 dprintk(3, 3207 dprintk(3,
3208 KERN_INFO "%s: mmap(%s) of 0x%08lx-0x%08lx (size=%lu)\n", 3208 KERN_INFO "%s: %s(%s) of 0x%08lx-0x%08lx (size=%lu)\n",
3209 ZR_DEVNAME(zr), 3209 ZR_DEVNAME(zr), __func__,
3210 mode_name(fh->map_mode), vma->vm_start, vma->vm_end, size); 3210 mode_name(fh->map_mode), vma->vm_start, vma->vm_end, size);
3211 3211
3212 if (!(vma->vm_flags & VM_SHARED) || !(vma->vm_flags & VM_READ) || 3212 if (!(vma->vm_flags & VM_SHARED) || !(vma->vm_flags & VM_READ) ||
3213 !(vma->vm_flags & VM_WRITE)) { 3213 !(vma->vm_flags & VM_WRITE)) {
3214 dprintk(1, 3214 dprintk(1,
3215 KERN_ERR 3215 KERN_ERR
3216 "%s: mmap() - no MAP_SHARED/PROT_{READ,WRITE} given\n", 3216 "%s: %s - no MAP_SHARED/PROT_{READ,WRITE} given\n",
3217 ZR_DEVNAME(zr)); 3217 ZR_DEVNAME(zr), __func__);
3218 return -EINVAL; 3218 return -EINVAL;
3219 } 3219 }
3220 3220
@@ -3223,8 +3223,8 @@ zoran_mmap (struct file *file,
3223 if (!fh->buffers.allocated) { 3223 if (!fh->buffers.allocated) {
3224 dprintk(1, 3224 dprintk(1,
3225 KERN_ERR 3225 KERN_ERR
3226 "%s: zoran_mmap(%s) - buffers not yet allocated\n", 3226 "%s: %s(%s) - buffers not yet allocated\n",
3227 ZR_DEVNAME(zr), mode_name(fh->map_mode)); 3227 ZR_DEVNAME(zr), __func__, mode_name(fh->map_mode));
3228 res = -ENOMEM; 3228 res = -ENOMEM;
3229 goto mmap_unlock_and_return; 3229 goto mmap_unlock_and_return;
3230 } 3230 }
@@ -3237,8 +3237,8 @@ zoran_mmap (struct file *file,
3237 last >= fh->buffers.buffer_size) { 3237 last >= fh->buffers.buffer_size) {
3238 dprintk(1, 3238 dprintk(1,
3239 KERN_ERR 3239 KERN_ERR
3240 "%s: mmap(%s) - offset=%lu or size=%lu invalid for bufsize=%d and numbufs=%d\n", 3240 "%s: %s(%s) - offset=%lu or size=%lu invalid for bufsize=%d and numbufs=%d\n",
3241 ZR_DEVNAME(zr), mode_name(fh->map_mode), offset, size, 3241 ZR_DEVNAME(zr), __func__, mode_name(fh->map_mode), offset, size,
3242 fh->buffers.buffer_size, 3242 fh->buffers.buffer_size,
3243 fh->buffers.num_buffers); 3243 fh->buffers.num_buffers);
3244 res = -EINVAL; 3244 res = -EINVAL;
@@ -3250,8 +3250,8 @@ zoran_mmap (struct file *file,
3250 if (fh->buffers.buffer[i].map) { 3250 if (fh->buffers.buffer[i].map) {
3251 dprintk(1, 3251 dprintk(1,
3252 KERN_ERR 3252 KERN_ERR
3253 "%s: mmap(%s) - buffer %d already mapped\n", 3253 "%s: %s(%s) - buffer %d already mapped\n",
3254 ZR_DEVNAME(zr), mode_name(fh->map_mode), i); 3254 ZR_DEVNAME(zr), __func__, mode_name(fh->map_mode), i);
3255 res = -EBUSY; 3255 res = -EBUSY;
3256 goto mmap_unlock_and_return; 3256 goto mmap_unlock_and_return;
3257 } 3257 }
@@ -3280,8 +3280,8 @@ zoran_mmap (struct file *file,
3280 todo, PAGE_SHARED)) { 3280 todo, PAGE_SHARED)) {
3281 dprintk(1, 3281 dprintk(1,
3282 KERN_ERR 3282 KERN_ERR
3283 "%s: zoran_mmap(V4L) - remap_pfn_range failed\n", 3283 "%s: %s(V4L) - remap_pfn_range failed\n",
3284 ZR_DEVNAME(zr)); 3284 ZR_DEVNAME(zr), __func__);
3285 res = -EAGAIN; 3285 res = -EAGAIN;
3286 goto mmap_unlock_and_return; 3286 goto mmap_unlock_and_return;
3287 } 3287 }
@@ -3312,8 +3312,8 @@ zoran_mmap (struct file *file,
3312 todo, PAGE_SHARED)) { 3312 todo, PAGE_SHARED)) {
3313 dprintk(1, 3313 dprintk(1,
3314 KERN_ERR 3314 KERN_ERR
3315 "%s: zoran_mmap(V4L) - remap_pfn_range failed\n", 3315 "%s: %s(V4L) - remap_pfn_range failed\n",
3316 ZR_DEVNAME(zr)); 3316 ZR_DEVNAME(zr), __func__);
3317 res = -EAGAIN; 3317 res = -EAGAIN;
3318 goto mmap_unlock_and_return; 3318 goto mmap_unlock_and_return;
3319 } 3319 }