[media] Don't export format_by_forcc on two different drivers

Drivers should append their name on exported symbols, to avoid
conflicts with allyesconfig:

drivers/staging/built-in.o: In function `format_by_fourcc':
/home/v4l/work_trees/linus/drivers/staging/cx25821/cx25821-video.c:96: multiple definition of `format_by_fourcc'
drivers/media/built-in.o:/home/v4l/work_trees/linus/drivers/media/common/saa7146_video.c:88: first defined here

Let's rename both occurences with a small shellscript:

for i in drivers/staging/cx25821/*.[ch]; do sed s,format_by_fourcc,cx25821_format_by_fourcc,g <$i >a && mv a $i; done
for i in drivers/media/common/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done
for i in include/media/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

+18 -18
+4 -4
drivers/media/common/saa7146_hlp.c
··· 558 558 static void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int w_height, enum v4l2_field field, u32 pixelformat) 559 559 { 560 560 struct saa7146_vv *vv = dev->vv_data; 561 - struct saa7146_format *sfmt = format_by_fourcc(dev, pixelformat); 561 + struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev, pixelformat); 562 562 563 563 int b_depth = vv->ov_fmt->depth; 564 564 int b_bpl = vv->ov_fb.fmt.bytesperline; ··· 702 702 struct saa7146_vv *vv = dev->vv_data; 703 703 struct saa7146_video_dma vdma1; 704 704 705 - struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); 705 + struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat); 706 706 707 707 int width = buf->fmt->width; 708 708 int height = buf->fmt->height; ··· 827 827 struct saa7146_video_dma vdma2; 828 828 struct saa7146_video_dma vdma3; 829 829 830 - struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); 830 + struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat); 831 831 832 832 int width = buf->fmt->width; 833 833 int height = buf->fmt->height; ··· 994 994 995 995 void saa7146_set_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, struct saa7146_buf *next) 996 996 { 997 - struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); 997 + struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat); 998 998 struct saa7146_vv *vv = dev->vv_data; 999 999 u32 vdma1_prot_addr; 1000 1000
+8 -8
drivers/media/common/saa7146_video.c
··· 84 84 85 85 static int NUM_FORMATS = sizeof(formats)/sizeof(struct saa7146_format); 86 86 87 - struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc) 87 + struct saa7146_format* saa7146_format_by_fourcc(struct saa7146_dev *dev, int fourcc) 88 88 { 89 89 int i, j = NUM_FORMATS; 90 90 ··· 266 266 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); 267 267 struct scatterlist *list = dma->sglist; 268 268 int length = dma->sglen; 269 - struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); 269 + struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat); 270 270 271 271 DEB_EE(("dev:%p, buf:%p, sg_len:%d\n",dev,buf,length)); 272 272 ··· 408 408 } 409 409 } 410 410 411 - fmt = format_by_fourcc(dev,fh->video_fmt.pixelformat); 411 + fmt = saa7146_format_by_fourcc(dev,fh->video_fmt.pixelformat); 412 412 /* we need to have a valid format set here */ 413 413 BUG_ON(NULL == fmt); 414 414 ··· 460 460 return -EBUSY; 461 461 } 462 462 463 - fmt = format_by_fourcc(dev,fh->video_fmt.pixelformat); 463 + fmt = saa7146_format_by_fourcc(dev,fh->video_fmt.pixelformat); 464 464 /* we need to have a valid format set here */ 465 465 BUG_ON(NULL == fmt); 466 466 ··· 536 536 return -EPERM; 537 537 538 538 /* check args */ 539 - fmt = format_by_fourcc(dev, fb->fmt.pixelformat); 539 + fmt = saa7146_format_by_fourcc(dev, fb->fmt.pixelformat); 540 540 if (NULL == fmt) 541 541 return -EINVAL; 542 542 ··· 760 760 761 761 DEB_EE(("V4L2_BUF_TYPE_VIDEO_CAPTURE: dev:%p, fh:%p\n", dev, fh)); 762 762 763 - fmt = format_by_fourcc(dev, f->fmt.pix.pixelformat); 763 + fmt = saa7146_format_by_fourcc(dev, f->fmt.pix.pixelformat); 764 764 if (NULL == fmt) 765 765 return -EINVAL; 766 766 ··· 1264 1264 buf->fmt = &fh->video_fmt; 1265 1265 buf->vb.field = fh->video_fmt.field; 1266 1266 1267 - sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); 1267 + sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat); 1268 1268 1269 1269 release_all_pagetables(dev, buf); 1270 1270 if( 0 != IS_PLANAR(sfmt->trans)) { ··· 1378 1378 fh->video_fmt.pixelformat = V4L2_PIX_FMT_BGR24; 1379 1379 fh->video_fmt.bytesperline = 0; 1380 1380 fh->video_fmt.field = V4L2_FIELD_ANY; 1381 - sfmt = format_by_fourcc(dev,fh->video_fmt.pixelformat); 1381 + sfmt = saa7146_format_by_fourcc(dev,fh->video_fmt.pixelformat); 1382 1382 fh->video_fmt.sizeimage = (fh->video_fmt.width * fh->video_fmt.height * sfmt->depth)/8; 1383 1383 1384 1384 videobuf_queue_sg_init(&fh->video_q, &video_qops,
+4 -4
drivers/staging/cx25821/cx25821-video.c
··· 92 92 return ARRAY_SIZE(formats); 93 93 } 94 94 95 - struct cx25821_fmt *format_by_fourcc(unsigned int fourcc) 95 + struct cx25821_fmt *cx25821_format_by_fourcc(unsigned int fourcc) 96 96 { 97 97 unsigned int i; 98 98 ··· 848 848 pix_format = 849 849 (dev->channels[ch_id].pixel_formats == 850 850 PIXEL_FRMT_411) ? V4L2_PIX_FMT_Y41P : V4L2_PIX_FMT_YUYV; 851 - fh->fmt = format_by_fourcc(pix_format); 851 + fh->fmt = cx25821_format_by_fourcc(pix_format); 852 852 853 853 v4l2_prio_open(&dev->channels[ch_id].prio, &fh->prio); 854 854 ··· 1010 1010 if (0 != err) 1011 1011 return err; 1012 1012 1013 - fh->fmt = format_by_fourcc(f->fmt.pix.pixelformat); 1013 + fh->fmt = cx25821_format_by_fourcc(f->fmt.pix.pixelformat); 1014 1014 fh->vidq.field = f->fmt.pix.field; 1015 1015 1016 1016 /* check if width and height is valid based on set standard */ ··· 1119 1119 enum v4l2_field field; 1120 1120 unsigned int maxw, maxh; 1121 1121 1122 - fmt = format_by_fourcc(f->fmt.pix.pixelformat); 1122 + fmt = cx25821_format_by_fourcc(f->fmt.pix.pixelformat); 1123 1123 if (NULL == fmt) 1124 1124 return -EINVAL; 1125 1125
+1 -1
drivers/staging/cx25821/cx25821-video.h
··· 87 87 88 88 #define FORMAT_FLAGS_PACKED 0x01 89 89 extern struct cx25821_fmt formats[]; 90 - extern struct cx25821_fmt *format_by_fourcc(unsigned int fourcc); 90 + extern struct cx25821_fmt *cx25821_format_by_fourcc(unsigned int fourcc); 91 91 extern struct cx25821_data timeout_data[MAX_VID_CHANNEL_NUM]; 92 92 93 93 extern void cx25821_dump_video_queue(struct cx25821_dev *dev,
+1 -1
include/media/saa7146.h
··· 161 161 extern struct mutex saa7146_devices_lock; 162 162 int saa7146_register_extension(struct saa7146_extension*); 163 163 int saa7146_unregister_extension(struct saa7146_extension*); 164 - struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); 164 + struct saa7146_format* saa7146_format_by_fourcc(struct saa7146_dev *dev, int fourcc); 165 165 int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt); 166 166 void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt); 167 167 int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length );