All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] media tree reorganization part 2 (second version)
@ 2012-08-14 20:55 Mauro Carvalho Chehab
  2012-08-14 20:55 ` [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir Mauro Carvalho Chehab
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-14 20:55 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Ok, it is now everything almost done... there are of course
cleanups that may happen, and there are still some things
to do at drivers/media/platform, but most of the things are
there.

If there isn't any big problem, I'll be merging them tomorrow.

So, please review.

Thanks!
Mauro

-

Mauro Carvalho Chehab (12):
  [media] rename most media/video usb drivers to media/usb
  [media] move the remaining USB drivers to drivers/media/usb
  [media] bt8xx: move analog TV part to be together with DTV one
  [media] rename most media/video pci drivers to media/pci
  [media] move analog PCI saa7146 drivers to its own dir
  [media] move the remaining PCI devices to drivers/media/pci
  [media] move parallel port/isa video drivers to
    drivers/media/parport/
  [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver
  [media] reorganize the API core items
  [media] move i2c files into drivers/media/i2c
  [media] move soc_camera i2c drivers into its own dir
  [media] rename drivers/media/video to platform

 MAINTAINERS                                        |   24 +-
 drivers/media/Kconfig                              |   18 +-
 drivers/media/Makefile                             |    8 +-
 drivers/media/i2c/Kconfig                          |  570 ++
 drivers/media/i2c/Makefile                         |   64 +
 drivers/media/i2c/adp1653.c                        |  487 ++
 drivers/media/i2c/adv7170.c                        |  410 +
 drivers/media/i2c/adv7175.c                        |  460 ++
 drivers/media/i2c/adv7180.c                        |  667 ++
 drivers/media/i2c/adv7183.c                        |  699 ++
 drivers/media/i2c/adv7183_regs.h                   |  107 +
 drivers/media/i2c/adv7343.c                        |  476 ++
 drivers/media/i2c/adv7343_regs.h                   |  181 +
 drivers/media/i2c/adv7393.c                        |  487 ++
 drivers/media/i2c/adv7393_regs.h                   |  188 +
 drivers/media/i2c/ak881x.c                         |  359 +
 drivers/media/i2c/aptina-pll.c                     |  173 +
 drivers/media/i2c/aptina-pll.h                     |   56 +
 drivers/media/i2c/as3645a.c                        |  888 +++
 drivers/media/i2c/bt819.c                          |  517 ++
 drivers/media/i2c/bt856.c                          |  273 +
 drivers/media/i2c/bt866.c                          |  243 +
 drivers/media/i2c/btcx-risc.c                      |  260 +
 drivers/media/i2c/btcx-risc.h                      |   34 +
 drivers/media/i2c/cs5345.c                         |  252 +
 drivers/media/i2c/cs53l32a.c                       |  251 +
 drivers/media/i2c/cx2341x.c                        | 1726 +++++
 drivers/media/i2c/cx25840/Kconfig                  |    8 +
 drivers/media/i2c/cx25840/Makefile                 |    6 +
 drivers/media/i2c/cx25840/cx25840-audio.c          |  571 ++
 drivers/media/i2c/cx25840/cx25840-core.c           | 5340 +++++++++++++
 drivers/media/i2c/cx25840/cx25840-core.h           |  137 +
 drivers/media/i2c/cx25840/cx25840-firmware.c       |  175 +
 drivers/media/i2c/cx25840/cx25840-ir.c             | 1281 ++++
 drivers/media/i2c/cx25840/cx25840-vbi.c            |  256 +
 drivers/media/i2c/ir-kbd-i2c.c                     |  489 ++
 drivers/media/i2c/ks0127.c                         |  724 ++
 drivers/media/i2c/ks0127.h                         |   51 +
 drivers/media/i2c/m52790.c                         |  216 +
 drivers/media/i2c/m5mols/Kconfig                   |    6 +
 drivers/media/i2c/m5mols/Makefile                  |    3 +
 drivers/media/i2c/m5mols/m5mols.h                  |  334 +
 drivers/media/i2c/m5mols/m5mols_capture.c          |  155 +
 drivers/media/i2c/m5mols/m5mols_controls.c         |  628 ++
 drivers/media/i2c/m5mols/m5mols_core.c             |  990 +++
 drivers/media/i2c/m5mols/m5mols_reg.h              |  362 +
 drivers/media/i2c/msp3400-driver.c                 |  899 +++
 drivers/media/i2c/msp3400-driver.h                 |  137 +
 drivers/media/i2c/msp3400-kthreads.c               | 1165 +++
 drivers/media/i2c/mt9m032.c                        |  878 +++
 drivers/media/i2c/mt9p031.c                        | 1071 +++
 drivers/media/i2c/mt9t001.c                        |  833 ++
 drivers/media/i2c/mt9v011.c                        |  712 ++
 drivers/media/i2c/mt9v032.c                        |  763 ++
 drivers/media/i2c/noon010pc30.c                    |  851 +++
 drivers/media/i2c/ov7670.c                         | 1586 ++++
 drivers/media/i2c/s5k6aa.c                         | 1667 ++++
 drivers/media/i2c/saa6588.c                        |  542 ++
 drivers/media/i2c/saa7110.c                        |  494 ++
 drivers/media/i2c/saa7115.c                        | 1727 +++++
 drivers/media/i2c/saa711x_regs.h                   |  549 ++
 drivers/media/i2c/saa7127.c                        |  852 +++
 drivers/media/i2c/saa717x.c                        | 1378 ++++
 drivers/media/i2c/saa7185.c                        |  377 +
 drivers/media/i2c/saa7191.c                        |  659 ++
 drivers/media/i2c/saa7191.h                        |  245 +
 drivers/media/i2c/smiapp-pll.c                     |  418 +
 drivers/media/i2c/smiapp-pll.h                     |  103 +
 drivers/media/i2c/smiapp/Kconfig                   |    7 +
 drivers/media/i2c/smiapp/Makefile                  |    5 +
 drivers/media/i2c/smiapp/smiapp-core.c             | 2895 +++++++
 drivers/media/i2c/smiapp/smiapp-limits.c           |  132 +
 drivers/media/i2c/smiapp/smiapp-limits.h           |  128 +
 drivers/media/i2c/smiapp/smiapp-quirk.c            |  306 +
 drivers/media/i2c/smiapp/smiapp-quirk.h            |   83 +
 drivers/media/i2c/smiapp/smiapp-reg-defs.h         |  503 ++
 drivers/media/i2c/smiapp/smiapp-reg.h              |  122 +
 drivers/media/i2c/smiapp/smiapp-regs.c             |  273 +
 drivers/media/i2c/smiapp/smiapp-regs.h             |   49 +
 drivers/media/i2c/smiapp/smiapp.h                  |  252 +
 drivers/media/i2c/soc_camera/Kconfig               |   89 +
 drivers/media/i2c/soc_camera/Makefile              |   14 +
 drivers/media/i2c/soc_camera/imx074.c              |  475 ++
 drivers/media/i2c/soc_camera/mt9m001.c             |  737 ++
 drivers/media/i2c/soc_camera/mt9m111.c             | 1014 +++
 drivers/media/i2c/soc_camera/mt9t031.c             |  857 +++
 drivers/media/i2c/soc_camera/mt9t112.c             | 1125 +++
 drivers/media/i2c/soc_camera/mt9v022.c             |  879 +++
 drivers/media/i2c/soc_camera/ov2640.c              | 1108 +++
 drivers/media/i2c/soc_camera/ov5642.c              | 1073 +++
 drivers/media/i2c/soc_camera/ov6650.c              | 1053 +++
 drivers/media/i2c/soc_camera/ov772x.c              | 1126 +++
 drivers/media/i2c/soc_camera/ov9640.c              |  746 ++
 drivers/media/i2c/soc_camera/ov9640.h              |  207 +
 drivers/media/i2c/soc_camera/ov9740.c              | 1005 +++
 drivers/media/i2c/soc_camera/rj54n1cb0c.c          | 1414 ++++
 drivers/media/i2c/soc_camera/sh_mobile_csi2.c      |  398 +
 drivers/media/i2c/soc_camera/tw9910.c              |  956 +++
 drivers/media/i2c/sr030pc30.c                      |  871 +++
 drivers/media/i2c/tcm825x.c                        |  937 +++
 drivers/media/i2c/tcm825x.h                        |  200 +
 drivers/media/i2c/tda7432.c                        |  485 ++
 drivers/media/i2c/tda9840.c                        |  224 +
 drivers/media/i2c/tea6415c.c                       |  187 +
 drivers/media/i2c/tea6415c.h                       |   27 +
 drivers/media/i2c/tea6420.c                        |  169 +
 drivers/media/i2c/tea6420.h                        |   24 +
 drivers/media/i2c/ths7303.c                        |  140 +
 drivers/media/i2c/tlv320aic23b.c                   |  230 +
 drivers/media/i2c/tvaudio.c                        | 2118 ++++++
 drivers/media/i2c/tveeprom.c                       |  792 ++
 drivers/media/i2c/tvp514x.c                        | 1166 +++
 drivers/media/i2c/tvp514x_regs.h                   |  287 +
 drivers/media/i2c/tvp5150.c                        | 1274 ++++
 drivers/media/i2c/tvp5150_reg.h                    |  139 +
 drivers/media/i2c/tvp7002.c                        | 1145 +++
 drivers/media/i2c/tvp7002_reg.h                    |  150 +
 drivers/media/i2c/upd64031a.c                      |  274 +
 drivers/media/i2c/upd64083.c                       |  246 +
 drivers/media/i2c/vp27smpx.c                       |  211 +
 drivers/media/i2c/vpx3220.c                        |  591 ++
 drivers/media/i2c/vs6624.c                         |  928 +++
 drivers/media/i2c/vs6624_regs.h                    |  337 +
 drivers/media/i2c/wm8739.c                         |  294 +
 drivers/media/i2c/wm8775.c                         |  342 +
 drivers/media/mmc/Kconfig                          |    1 +
 drivers/media/parport/Kconfig                      |   47 +
 drivers/media/parport/Makefile                     |    4 +
 drivers/media/parport/bw-qcam.c                    | 1113 +++
 drivers/media/parport/c-qcam.c                     |  883 +++
 drivers/media/parport/pms.c                        | 1152 +++
 drivers/media/parport/w9966.c                      |  981 +++
 drivers/media/pci/Kconfig                          |   56 +-
 drivers/media/pci/Makefile                         |   16 +-
 drivers/media/pci/bt8xx/Kconfig                    |   23 +-
 drivers/media/pci/bt8xx/Makefile                   |    7 +-
 drivers/media/pci/bt8xx/bt848.h                    |  369 +
 drivers/media/pci/bt8xx/bttv-audio-hook.c          |  382 +
 drivers/media/pci/bt8xx/bttv-audio-hook.h          |   23 +
 drivers/media/pci/bt8xx/bttv-cards.c               | 4895 ++++++++++++
 drivers/media/pci/bt8xx/bttv-driver.c              | 4630 +++++++++++
 drivers/media/pci/bt8xx/bttv-gpio.c                |  189 +
 drivers/media/pci/bt8xx/bttv-i2c.c                 |  397 +
 drivers/media/pci/bt8xx/bttv-if.c                  |  121 +
 drivers/media/pci/bt8xx/bttv-input.c               |  589 ++
 drivers/media/pci/bt8xx/bttv-risc.c                |  909 +++
 drivers/media/pci/bt8xx/bttv-vbi.c                 |  459 ++
 drivers/media/pci/bt8xx/bttv.h                     |  376 +
 drivers/media/pci/bt8xx/bttvp.h                    |  535 ++
 drivers/media/pci/cx18/Kconfig                     |   35 +
 drivers/media/pci/cx18/Makefile                    |   13 +
 drivers/media/pci/cx18/cx18-alsa-main.c            |  295 +
 drivers/media/pci/cx18/cx18-alsa-mixer.c           |  175 +
 drivers/media/pci/cx18/cx18-alsa-mixer.h           |   23 +
 drivers/media/pci/cx18/cx18-alsa-pcm.c             |  356 +
 drivers/media/pci/cx18/cx18-alsa-pcm.h             |   27 +
 drivers/media/pci/cx18/cx18-alsa.h                 |   75 +
 drivers/media/pci/cx18/cx18-audio.c                |   92 +
 drivers/media/pci/cx18/cx18-audio.h                |   24 +
 drivers/media/pci/cx18/cx18-av-audio.c             |  471 ++
 drivers/media/pci/cx18/cx18-av-core.c              | 1401 ++++
 drivers/media/pci/cx18/cx18-av-core.h              |  391 +
 drivers/media/pci/cx18/cx18-av-firmware.c          |  225 +
 drivers/media/pci/cx18/cx18-av-vbi.c               |  311 +
 drivers/media/pci/cx18/cx18-cards.c                |  638 ++
 drivers/media/pci/cx18/cx18-cards.h                |  157 +
 drivers/media/pci/cx18/cx18-controls.c             |  131 +
 drivers/media/pci/cx18/cx18-controls.h             |   24 +
 drivers/media/pci/cx18/cx18-driver.c               | 1360 ++++
 drivers/media/pci/cx18/cx18-driver.h               |  730 ++
 drivers/media/pci/cx18/cx18-dvb.c                  |  609 ++
 drivers/media/pci/cx18/cx18-dvb.h                  |   25 +
 drivers/media/pci/cx18/cx18-fileops.c              |  881 +++
 drivers/media/pci/cx18/cx18-fileops.h              |   41 +
 drivers/media/pci/cx18/cx18-firmware.c             |  459 ++
 drivers/media/pci/cx18/cx18-firmware.h             |   25 +
 drivers/media/pci/cx18/cx18-gpio.c                 |  347 +
 drivers/media/pci/cx18/cx18-gpio.h                 |   34 +
 drivers/media/pci/cx18/cx18-i2c.c                  |  330 +
 drivers/media/pci/cx18/cx18-i2c.h                  |   29 +
 drivers/media/pci/cx18/cx18-io.c                   |   97 +
 drivers/media/pci/cx18/cx18-io.h                   |  191 +
 drivers/media/pci/cx18/cx18-ioctl.c                | 1194 +++
 drivers/media/pci/cx18/cx18-ioctl.h                |   31 +
 drivers/media/pci/cx18/cx18-irq.c                  |   81 +
 drivers/media/pci/cx18/cx18-irq.h                  |   35 +
 drivers/media/pci/cx18/cx18-mailbox.c              |  870 +++
 drivers/media/pci/cx18/cx18-mailbox.h              |   95 +
 drivers/media/pci/cx18/cx18-queue.c                |  443 ++
 drivers/media/pci/cx18/cx18-queue.h                |   98 +
 drivers/media/pci/cx18/cx18-scb.c                  |  122 +
 drivers/media/pci/cx18/cx18-scb.h                  |  280 +
 drivers/media/pci/cx18/cx18-streams.c              | 1060 +++
 drivers/media/pci/cx18/cx18-streams.h              |   62 +
 drivers/media/pci/cx18/cx18-vbi.c                  |  277 +
 drivers/media/pci/cx18/cx18-vbi.h                  |   26 +
 drivers/media/pci/cx18/cx18-version.h              |   28 +
 drivers/media/pci/cx18/cx18-video.c                |   32 +
 drivers/media/pci/cx18/cx18-video.h                |   22 +
 drivers/media/pci/cx18/cx23418.h                   |  492 ++
 drivers/media/pci/cx23885/Kconfig                  |   46 +
 drivers/media/pci/cx23885/Makefile                 |   15 +
 drivers/media/pci/cx23885/altera-ci.c              |  837 ++
 drivers/media/pci/cx23885/altera-ci.h              |  100 +
 drivers/media/pci/cx23885/cimax2.c                 |  536 ++
 drivers/media/pci/cx23885/cimax2.h                 |   47 +
 drivers/media/pci/cx23885/cx23885-417.c            | 1790 +++++
 drivers/media/pci/cx23885/cx23885-alsa.c           |  535 ++
 drivers/media/pci/cx23885/cx23885-av.c             |   35 +
 drivers/media/pci/cx23885/cx23885-av.h             |   27 +
 drivers/media/pci/cx23885/cx23885-cards.c          | 1684 ++++
 drivers/media/pci/cx23885/cx23885-core.c           | 2234 ++++++
 drivers/media/pci/cx23885/cx23885-dvb.c            | 1356 ++++
 drivers/media/pci/cx23885/cx23885-f300.c           |  177 +
 drivers/media/pci/cx23885/cx23885-f300.h           |    2 +
 drivers/media/pci/cx23885/cx23885-i2c.c            |  396 +
 drivers/media/pci/cx23885/cx23885-input.c          |  365 +
 drivers/media/pci/cx23885/cx23885-input.h          |   30 +
 drivers/media/pci/cx23885/cx23885-ioctl.c          |  208 +
 drivers/media/pci/cx23885/cx23885-ioctl.h          |   39 +
 drivers/media/pci/cx23885/cx23885-ir.c             |  117 +
 drivers/media/pci/cx23885/cx23885-ir.h             |   31 +
 drivers/media/pci/cx23885/cx23885-reg.h            |  452 ++
 drivers/media/pci/cx23885/cx23885-vbi.c            |  295 +
 drivers/media/pci/cx23885/cx23885-video.c          | 1926 +++++
 drivers/media/pci/cx23885/cx23885.h                |  653 ++
 drivers/media/pci/cx23885/cx23888-ir.c             | 1271 ++++
 drivers/media/pci/cx23885/cx23888-ir.h             |   28 +
 drivers/media/pci/cx23885/netup-eeprom.c           |  107 +
 drivers/media/pci/cx23885/netup-eeprom.h           |   42 +
 drivers/media/pci/cx23885/netup-init.c             |  125 +
 drivers/media/pci/cx23885/netup-init.h             |   25 +
 drivers/media/pci/cx25821/Kconfig                  |   34 +
 drivers/media/pci/cx25821/Makefile                 |   13 +
 drivers/media/pci/cx25821/cx25821-alsa.c           |  784 ++
 drivers/media/pci/cx25821/cx25821-audio-upstream.c |  778 ++
 drivers/media/pci/cx25821/cx25821-audio-upstream.h |   62 +
 drivers/media/pci/cx25821/cx25821-audio.h          |   62 +
 drivers/media/pci/cx25821/cx25821-biffuncs.h       |   45 +
 drivers/media/pci/cx25821/cx25821-cards.c          |   72 +
 drivers/media/pci/cx25821/cx25821-core.c           | 1502 ++++
 drivers/media/pci/cx25821/cx25821-gpio.c           |   98 +
 drivers/media/pci/cx25821/cx25821-i2c.c            |  416 +
 drivers/media/pci/cx25821/cx25821-medusa-defines.h |   42 +
 drivers/media/pci/cx25821/cx25821-medusa-reg.h     |  455 ++
 drivers/media/pci/cx25821/cx25821-medusa-video.c   |  787 ++
 drivers/media/pci/cx25821/cx25821-medusa-video.h   |   49 +
 drivers/media/pci/cx25821/cx25821-reg.h            | 1592 ++++
 drivers/media/pci/cx25821/cx25821-sram.h           |  261 +
 .../media/pci/cx25821/cx25821-video-upstream-ch2.c |  802 ++
 .../media/pci/cx25821/cx25821-video-upstream-ch2.h |  138 +
 drivers/media/pci/cx25821/cx25821-video-upstream.c |  856 +++
 drivers/media/pci/cx25821/cx25821-video-upstream.h |  139 +
 drivers/media/pci/cx25821/cx25821-video.c          | 1990 +++++
 drivers/media/pci/cx25821/cx25821-video.h          |  186 +
 drivers/media/pci/cx25821/cx25821.h                |  615 ++
 drivers/media/pci/cx88/Kconfig                     |   86 +
 drivers/media/pci/cx88/Makefile                    |   16 +
 drivers/media/pci/cx88/cx88-alsa.c                 |  975 +++
 drivers/media/pci/cx88/cx88-blackbird.c            | 1299 ++++
 drivers/media/pci/cx88/cx88-cards.c                | 3811 ++++++++++
 drivers/media/pci/cx88/cx88-core.c                 | 1131 +++
 drivers/media/pci/cx88/cx88-dsp.c                  |  322 +
 drivers/media/pci/cx88/cx88-dvb.c                  | 1778 +++++
 drivers/media/pci/cx88/cx88-i2c.c                  |  184 +
 drivers/media/pci/cx88/cx88-input.c                |  635 ++
 drivers/media/pci/cx88/cx88-mpeg.c                 |  929 +++
 drivers/media/pci/cx88/cx88-reg.h                  |  836 ++
 drivers/media/pci/cx88/cx88-tvaudio.c              | 1059 +++
 drivers/media/pci/cx88/cx88-vbi.c                  |  245 +
 drivers/media/pci/cx88/cx88-video.c                | 2075 +++++
 drivers/media/pci/cx88/cx88-vp3054-i2c.c           |  159 +
 drivers/media/pci/cx88/cx88-vp3054-i2c.h           |   41 +
 drivers/media/pci/cx88/cx88.h                      |  748 ++
 drivers/media/pci/ivtv/Kconfig                     |   45 +
 drivers/media/pci/ivtv/Makefile                    |   14 +
 drivers/media/pci/ivtv/ivtv-cards.c                | 1370 ++++
 drivers/media/pci/ivtv/ivtv-cards.h                |  309 +
 drivers/media/pci/ivtv/ivtv-controls.c             |  163 +
 drivers/media/pci/ivtv/ivtv-controls.h             |   28 +
 drivers/media/pci/ivtv/ivtv-driver.c               | 1498 ++++
 drivers/media/pci/ivtv/ivtv-driver.h               |  839 ++
 drivers/media/pci/ivtv/ivtv-fileops.c              | 1070 +++
 drivers/media/pci/ivtv/ivtv-fileops.h              |   44 +
 drivers/media/pci/ivtv/ivtv-firmware.c             |  402 +
 drivers/media/pci/ivtv/ivtv-firmware.h             |   31 +
 drivers/media/pci/ivtv/ivtv-gpio.c                 |  374 +
 drivers/media/pci/ivtv/ivtv-gpio.h                 |   29 +
 drivers/media/pci/ivtv/ivtv-i2c.c                  |  760 ++
 drivers/media/pci/ivtv/ivtv-i2c.h                  |   32 +
 drivers/media/pci/ivtv/ivtv-ioctl.c                | 1899 +++++
 drivers/media/pci/ivtv/ivtv-ioctl.h                |   35 +
 drivers/media/pci/ivtv/ivtv-irq.c                  | 1038 +++
 drivers/media/pci/ivtv/ivtv-irq.h                  |   53 +
 drivers/media/pci/ivtv/ivtv-mailbox.c              |  387 +
 drivers/media/pci/ivtv/ivtv-mailbox.h              |   35 +
 drivers/media/pci/ivtv/ivtv-queue.c                |  297 +
 drivers/media/pci/ivtv/ivtv-queue.h                |   96 +
 drivers/media/pci/ivtv/ivtv-routing.c              |  119 +
 drivers/media/pci/ivtv/ivtv-routing.h              |   27 +
 drivers/media/pci/ivtv/ivtv-streams.c              | 1014 +++
 drivers/media/pci/ivtv/ivtv-streams.h              |   37 +
 drivers/media/pci/ivtv/ivtv-udma.c                 |  234 +
 drivers/media/pci/ivtv/ivtv-udma.h                 |   48 +
 drivers/media/pci/ivtv/ivtv-vbi.c                  |  549 ++
 drivers/media/pci/ivtv/ivtv-vbi.h                  |   34 +
 drivers/media/pci/ivtv/ivtv-version.h              |   26 +
 drivers/media/pci/ivtv/ivtv-yuv.c                  | 1296 ++++
 drivers/media/pci/ivtv/ivtv-yuv.h                  |   44 +
 drivers/media/pci/ivtv/ivtvfb.c                    | 1317 ++++
 drivers/media/pci/meye/Kconfig                     |   13 +
 drivers/media/pci/meye/Makefile                    |    1 +
 drivers/media/pci/meye/meye.c                      | 1964 +++++
 drivers/media/pci/meye/meye.h                      |  324 +
 drivers/media/pci/saa7134/Kconfig                  |   64 +
 drivers/media/pci/saa7134/Makefile                 |   16 +
 drivers/media/pci/saa7134/saa6752hs.c              | 1012 +++
 drivers/media/pci/saa7134/saa7134-alsa.c           | 1209 +++
 drivers/media/pci/saa7134/saa7134-cards.c          | 8026 ++++++++++++++++++++
 drivers/media/pci/saa7134/saa7134-core.c           | 1368 ++++
 drivers/media/pci/saa7134/saa7134-dvb.c            | 1936 +++++
 drivers/media/pci/saa7134/saa7134-empress.c        |  590 ++
 drivers/media/pci/saa7134/saa7134-i2c.c            |  435 ++
 drivers/media/pci/saa7134/saa7134-input.c          | 1041 +++
 drivers/media/pci/saa7134/saa7134-reg.h            |  378 +
 drivers/media/pci/saa7134/saa7134-ts.c             |  327 +
 drivers/media/pci/saa7134/saa7134-tvaudio.c        | 1087 +++
 drivers/media/pci/saa7134/saa7134-vbi.c            |  255 +
 drivers/media/pci/saa7134/saa7134-video.c          | 2661 +++++++
 drivers/media/pci/saa7134/saa7134.h                |  855 +++
 drivers/media/pci/saa7146/Kconfig                  |   38 +
 drivers/media/pci/saa7146/Makefile                 |    5 +
 drivers/media/pci/saa7146/hexium_gemini.c          |  430 ++
 drivers/media/pci/saa7146/hexium_orion.c           |  502 ++
 drivers/media/pci/saa7146/mxb.c                    |  886 +++
 drivers/media/pci/saa7164/Kconfig                  |   18 +
 drivers/media/pci/saa7164/Makefile                 |   12 +
 drivers/media/pci/saa7164/saa7164-api.c            | 1524 ++++
 drivers/media/pci/saa7164/saa7164-buffer.c         |  322 +
 drivers/media/pci/saa7164/saa7164-bus.c            |  475 ++
 drivers/media/pci/saa7164/saa7164-cards.c          |  773 ++
 drivers/media/pci/saa7164/saa7164-cmd.c            |  589 ++
 drivers/media/pci/saa7164/saa7164-core.c           | 1488 ++++
 drivers/media/pci/saa7164/saa7164-dvb.c            |  556 ++
 drivers/media/pci/saa7164/saa7164-encoder.c        | 1500 ++++
 drivers/media/pci/saa7164/saa7164-fw.c             |  613 ++
 drivers/media/pci/saa7164/saa7164-i2c.c            |  125 +
 drivers/media/pci/saa7164/saa7164-reg.h            |  219 +
 drivers/media/pci/saa7164/saa7164-types.h          |  442 ++
 drivers/media/pci/saa7164/saa7164-vbi.c            | 1374 ++++
 drivers/media/pci/saa7164/saa7164.h                |  616 ++
 drivers/media/pci/sta2x11/Kconfig                  |   12 +
 drivers/media/pci/sta2x11/Makefile                 |    1 +
 drivers/media/pci/sta2x11/sta2x11_vip.c            | 1550 ++++
 drivers/media/pci/sta2x11/sta2x11_vip.h            |   40 +
 drivers/media/pci/zoran/Kconfig                    |   74 +
 drivers/media/pci/zoran/Makefile                   |    6 +
 drivers/media/pci/zoran/videocodec.c               |  407 +
 drivers/media/pci/zoran/videocodec.h               |  353 +
 drivers/media/pci/zoran/zoran.h                    |  403 +
 drivers/media/pci/zoran/zoran_card.c               | 1524 ++++
 drivers/media/pci/zoran/zoran_card.h               |   54 +
 drivers/media/pci/zoran/zoran_device.c             | 1640 ++++
 drivers/media/pci/zoran/zoran_device.h             |   95 +
 drivers/media/pci/zoran/zoran_driver.c             | 3090 ++++++++
 drivers/media/pci/zoran/zoran_procfs.c             |  225 +
 drivers/media/pci/zoran/zoran_procfs.h             |   36 +
 drivers/media/pci/zoran/zr36016.c                  |  524 ++
 drivers/media/pci/zoran/zr36016.h                  |  111 +
 drivers/media/pci/zoran/zr36050.c                  |  900 +++
 drivers/media/pci/zoran/zr36050.h                  |  184 +
 drivers/media/pci/zoran/zr36057.h                  |  168 +
 drivers/media/pci/zoran/zr36060.c                  | 1010 +++
 drivers/media/pci/zoran/zr36060.h                  |  220 +
 drivers/media/platform/Kconfig                     |  297 +
 drivers/media/platform/Makefile                    |   66 +
 drivers/media/platform/arv.c                       |  885 +++
 drivers/media/platform/atmel-isi.c                 | 1099 +++
 drivers/media/platform/blackfin/Kconfig            |   10 +
 drivers/media/platform/blackfin/Makefile           |    2 +
 drivers/media/platform/blackfin/bfin_capture.c     | 1068 +++
 drivers/media/platform/blackfin/ppi.c              |  271 +
 drivers/media/platform/coda.c                      | 1849 +++++
 drivers/media/platform/coda.h                      |  216 +
 drivers/media/platform/davinci/Kconfig             |  121 +
 drivers/media/platform/davinci/Makefile            |   20 +
 drivers/media/platform/davinci/ccdc_hw_device.h    |  110 +
 drivers/media/platform/davinci/dm355_ccdc.c        | 1072 +++
 drivers/media/platform/davinci/dm355_ccdc_regs.h   |  310 +
 drivers/media/platform/davinci/dm644x_ccdc.c       | 1081 +++
 drivers/media/platform/davinci/dm644x_ccdc_regs.h  |  153 +
 drivers/media/platform/davinci/isif.c              | 1162 +++
 drivers/media/platform/davinci/isif_regs.h         |  269 +
 drivers/media/platform/davinci/vpbe.c              |  886 +++
 drivers/media/platform/davinci/vpbe_display.c      | 1838 +++++
 drivers/media/platform/davinci/vpbe_osd.c          | 1605 ++++
 drivers/media/platform/davinci/vpbe_osd_regs.h     |  364 +
 drivers/media/platform/davinci/vpbe_venc.c         |  706 ++
 drivers/media/platform/davinci/vpbe_venc_regs.h    |  177 +
 drivers/media/platform/davinci/vpfe_capture.c      | 2079 +++++
 drivers/media/platform/davinci/vpif.c              |  514 ++
 drivers/media/platform/davinci/vpif.h              |  688 ++
 drivers/media/platform/davinci/vpif_capture.c      | 2456 ++++++
 drivers/media/platform/davinci/vpif_capture.h      |  170 +
 drivers/media/platform/davinci/vpif_display.c      | 2010 +++++
 drivers/media/platform/davinci/vpif_display.h      |  181 +
 drivers/media/platform/davinci/vpss.c              |  482 ++
 drivers/media/platform/fsl-viu.c                   | 1690 +++++
 drivers/media/platform/indycam.c                   |  390 +
 drivers/media/platform/indycam.h                   |   93 +
 drivers/media/platform/m2m-deinterlace.c           | 1120 +++
 drivers/media/platform/marvell-ccic/Kconfig        |   23 +
 drivers/media/platform/marvell-ccic/Makefile       |    6 +
 drivers/media/platform/marvell-ccic/cafe-driver.c  |  654 ++
 drivers/media/platform/marvell-ccic/mcam-core.c    | 1878 +++++
 drivers/media/platform/marvell-ccic/mcam-core.h    |  322 +
 drivers/media/platform/marvell-ccic/mmp-driver.c   |  380 +
 drivers/media/platform/mem2mem_testdev.c           | 1131 +++
 drivers/media/platform/mx1_camera.c                |  889 +++
 drivers/media/platform/mx2_camera.c                | 1869 +++++
 drivers/media/platform/mx2_emmaprp.c               | 1037 +++
 drivers/media/platform/mx3_camera.c                | 1300 ++++
 drivers/media/platform/omap/Kconfig                |   14 +
 drivers/media/platform/omap/Makefile               |    8 +
 drivers/media/platform/omap/omap_vout.c            | 2289 ++++++
 drivers/media/platform/omap/omap_vout_vrfb.c       |  390 +
 drivers/media/platform/omap/omap_vout_vrfb.h       |   40 +
 drivers/media/platform/omap/omap_voutdef.h         |  225 +
 drivers/media/platform/omap/omap_voutlib.c         |  339 +
 drivers/media/platform/omap/omap_voutlib.h         |   36 +
 drivers/media/platform/omap1_camera.c              | 1723 +++++
 drivers/media/platform/omap24xxcam-dma.c           |  601 ++
 drivers/media/platform/omap24xxcam.c               | 1881 +++++
 drivers/media/platform/omap24xxcam.h               |  593 ++
 drivers/media/platform/omap3isp/Makefile           |   11 +
 drivers/media/platform/omap3isp/cfa_coef_table.h   |   61 +
 drivers/media/platform/omap3isp/gamma_table.h      |   90 +
 drivers/media/platform/omap3isp/isp.c              | 2241 ++++++
 drivers/media/platform/omap3isp/isp.h              |  352 +
 drivers/media/platform/omap3isp/ispccdc.c          | 2583 +++++++
 drivers/media/platform/omap3isp/ispccdc.h          |  172 +
 drivers/media/platform/omap3isp/ispccp2.c          | 1171 +++
 drivers/media/platform/omap3isp/ispccp2.h          |   98 +
 drivers/media/platform/omap3isp/ispcsi2.c          | 1328 ++++
 drivers/media/platform/omap3isp/ispcsi2.h          |  165 +
 drivers/media/platform/omap3isp/ispcsiphy.c        |  249 +
 drivers/media/platform/omap3isp/ispcsiphy.h        |   63 +
 drivers/media/platform/omap3isp/isph3a.h           |  117 +
 drivers/media/platform/omap3isp/isph3a_aewb.c      |  368 +
 drivers/media/platform/omap3isp/isph3a_af.c        |  423 ++
 drivers/media/platform/omap3isp/isphist.c          |  518 ++
 drivers/media/platform/omap3isp/isphist.h          |   40 +
 drivers/media/platform/omap3isp/isppreview.c       | 2348 ++++++
 drivers/media/platform/omap3isp/isppreview.h       |  174 +
 drivers/media/platform/omap3isp/ispqueue.c         | 1158 +++
 drivers/media/platform/omap3isp/ispqueue.h         |  187 +
 drivers/media/platform/omap3isp/ispreg.h           | 1586 ++++
 drivers/media/platform/omap3isp/ispresizer.c       | 1778 +++++
 drivers/media/platform/omap3isp/ispresizer.h       |  146 +
 drivers/media/platform/omap3isp/ispstat.c          | 1102 +++
 drivers/media/platform/omap3isp/ispstat.h          |  169 +
 drivers/media/platform/omap3isp/ispvideo.c         | 1403 ++++
 drivers/media/platform/omap3isp/ispvideo.h         |  216 +
 .../media/platform/omap3isp/luma_enhance_table.h   |   42 +
 .../media/platform/omap3isp/noise_filter_table.h   |   30 +
 drivers/media/platform/pxa_camera.c                | 1852 +++++
 drivers/media/platform/s5p-fimc/Kconfig            |   48 +
 drivers/media/platform/s5p-fimc/Makefile           |    7 +
 drivers/media/platform/s5p-fimc/fimc-capture.c     | 1738 +++++
 drivers/media/platform/s5p-fimc/fimc-core.c        | 1239 +++
 drivers/media/platform/s5p-fimc/fimc-core.h        |  713 ++
 drivers/media/platform/s5p-fimc/fimc-lite-reg.c    |  300 +
 drivers/media/platform/s5p-fimc/fimc-lite-reg.h    |  150 +
 drivers/media/platform/s5p-fimc/fimc-lite.c        | 1606 ++++
 drivers/media/platform/s5p-fimc/fimc-lite.h        |  213 +
 drivers/media/platform/s5p-fimc/fimc-m2m.c         |  854 +++
 drivers/media/platform/s5p-fimc/fimc-mdevice.c     | 1037 +++
 drivers/media/platform/s5p-fimc/fimc-mdevice.h     |  120 +
 drivers/media/platform/s5p-fimc/fimc-reg.c         |  775 ++
 drivers/media/platform/s5p-fimc/fimc-reg.h         |  326 +
 drivers/media/platform/s5p-fimc/mipi-csis.c        |  722 ++
 drivers/media/platform/s5p-fimc/mipi-csis.h        |   25 +
 drivers/media/platform/s5p-g2d/Makefile            |    3 +
 drivers/media/platform/s5p-g2d/g2d-hw.c            |  109 +
 drivers/media/platform/s5p-g2d/g2d-regs.h          |  115 +
 drivers/media/platform/s5p-g2d/g2d.c               |  847 +++
 drivers/media/platform/s5p-g2d/g2d.h               |   86 +
 drivers/media/platform/s5p-jpeg/Makefile           |    2 +
 drivers/media/platform/s5p-jpeg/jpeg-core.c        | 1529 ++++
 drivers/media/platform/s5p-jpeg/jpeg-core.h        |  150 +
 drivers/media/platform/s5p-jpeg/jpeg-hw.h          |  357 +
 drivers/media/platform/s5p-jpeg/jpeg-regs.h        |  170 +
 drivers/media/platform/s5p-mfc/Makefile            |    5 +
 drivers/media/platform/s5p-mfc/regs-mfc.h          |  418 +
 drivers/media/platform/s5p-mfc/s5p_mfc.c           | 1230 +++
 drivers/media/platform/s5p-mfc/s5p_mfc_cmd.c       |  120 +
 drivers/media/platform/s5p-mfc/s5p_mfc_cmd.h       |   30 +
 drivers/media/platform/s5p-mfc/s5p_mfc_common.h    |  570 ++
 drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c      |  343 +
 drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h      |   29 +
 drivers/media/platform/s5p-mfc/s5p_mfc_debug.h     |   48 +
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c       | 1044 +++
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.h       |   23 +
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c       | 1834 +++++
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.h       |   23 +
 drivers/media/platform/s5p-mfc/s5p_mfc_intr.c      |   92 +
 drivers/media/platform/s5p-mfc/s5p_mfc_intr.h      |   26 +
 drivers/media/platform/s5p-mfc/s5p_mfc_opr.c       | 1397 ++++
 drivers/media/platform/s5p-mfc/s5p_mfc_opr.h       |   93 +
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c        |  137 +
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.h        |   24 +
 drivers/media/platform/s5p-mfc/s5p_mfc_shm.c       |   47 +
 drivers/media/platform/s5p-mfc/s5p_mfc_shm.h       |   90 +
 drivers/media/platform/s5p-tv/Kconfig              |   86 +
 drivers/media/platform/s5p-tv/Makefile             |   19 +
 drivers/media/platform/s5p-tv/hdmi_drv.c           | 1007 +++
 drivers/media/platform/s5p-tv/hdmiphy_drv.c        |  329 +
 drivers/media/platform/s5p-tv/mixer.h              |  365 +
 drivers/media/platform/s5p-tv/mixer_drv.c          |  487 ++
 drivers/media/platform/s5p-tv/mixer_grp_layer.c    |  270 +
 drivers/media/platform/s5p-tv/mixer_reg.c          |  553 ++
 drivers/media/platform/s5p-tv/mixer_video.c        | 1125 +++
 drivers/media/platform/s5p-tv/mixer_vp_layer.c     |  241 +
 drivers/media/platform/s5p-tv/regs-hdmi.h          |  146 +
 drivers/media/platform/s5p-tv/regs-mixer.h         |  122 +
 drivers/media/platform/s5p-tv/regs-sdo.h           |   63 +
 drivers/media/platform/s5p-tv/regs-vp.h            |   88 +
 drivers/media/platform/s5p-tv/sdo_drv.c            |  452 ++
 drivers/media/platform/s5p-tv/sii9234_drv.c        |  422 +
 drivers/media/platform/sh_mobile_ceu_camera.c      | 2331 ++++++
 drivers/media/platform/sh_vou.c                    | 1510 ++++
 drivers/media/platform/soc_camera.c                | 1554 ++++
 drivers/media/platform/soc_camera_platform.c       |  197 +
 drivers/media/platform/soc_mediabus.c              |  487 ++
 drivers/media/platform/timblogiw.c                 |  880 +++
 drivers/media/platform/via-camera.c                | 1514 ++++
 drivers/media/platform/via-camera.h                |   93 +
 drivers/media/platform/vino.c                      | 4349 +++++++++++
 drivers/media/platform/vino.h                      |  138 +
 drivers/media/platform/vivi.c                      | 1409 ++++
 drivers/media/usb/Kconfig                          |   44 +-
 drivers/media/usb/Makefile                         |   16 +
 drivers/media/usb/au0828/Kconfig                   |   18 +
 drivers/media/usb/au0828/Makefile                  |    9 +
 drivers/media/usb/au0828/au0828-cards.c            |  339 +
 drivers/media/usb/au0828/au0828-cards.h            |   27 +
 drivers/media/usb/au0828/au0828-core.c             |  282 +
 drivers/media/usb/au0828/au0828-dvb.c              |  500 ++
 drivers/media/usb/au0828/au0828-i2c.c              |  401 +
 drivers/media/usb/au0828/au0828-reg.h              |   66 +
 drivers/media/usb/au0828/au0828-vbi.c              |  138 +
 drivers/media/usb/au0828/au0828-video.c            | 2034 +++++
 drivers/media/usb/au0828/au0828.h                  |  304 +
 drivers/media/usb/cpia2/Kconfig                    |    9 +
 drivers/media/usb/cpia2/Makefile                   |    3 +
 drivers/media/usb/cpia2/cpia2.h                    |  487 ++
 drivers/media/usb/cpia2/cpia2_core.c               | 2417 ++++++
 drivers/media/usb/cpia2/cpia2_registers.h          |  476 ++
 drivers/media/usb/cpia2/cpia2_usb.c                |  955 +++
 drivers/media/usb/cpia2/cpia2_v4l.c                | 1267 +++
 drivers/media/usb/cx231xx/Kconfig                  |   51 +
 drivers/media/usb/cx231xx/Makefile                 |   15 +
 drivers/media/usb/cx231xx/cx231xx-417.c            | 2197 ++++++
 drivers/media/usb/cx231xx/cx231xx-audio.c          |  780 ++
 drivers/media/usb/cx231xx/cx231xx-avcore.c         | 3087 ++++++++
 drivers/media/usb/cx231xx/cx231xx-cards.c          | 1370 ++++
 drivers/media/usb/cx231xx/cx231xx-conf-reg.h       |  495 ++
 drivers/media/usb/cx231xx/cx231xx-core.c           | 1736 +++++
 drivers/media/usb/cx231xx/cx231xx-dif.h            | 3178 ++++++++
 drivers/media/usb/cx231xx/cx231xx-dvb.c            |  796 ++
 drivers/media/usb/cx231xx/cx231xx-i2c.c            |  532 ++
 drivers/media/usb/cx231xx/cx231xx-input.c          |  119 +
 drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c        |  795 ++
 drivers/media/usb/cx231xx/cx231xx-pcb-cfg.h        |  231 +
 drivers/media/usb/cx231xx/cx231xx-reg.h            | 1564 ++++
 drivers/media/usb/cx231xx/cx231xx-vbi.c            |  710 ++
 drivers/media/usb/cx231xx/cx231xx-vbi.h            |   65 +
 drivers/media/usb/cx231xx/cx231xx-video.c          | 2670 +++++++
 drivers/media/usb/cx231xx/cx231xx.h                | 1012 +++
 drivers/media/usb/em28xx/Kconfig                   |   58 +
 drivers/media/usb/em28xx/Makefile                  |   15 +
 drivers/media/usb/em28xx/em28xx-audio.c            |  751 ++
 drivers/media/usb/em28xx/em28xx-cards.c            | 3417 +++++++++
 drivers/media/usb/em28xx/em28xx-core.c             | 1260 +++
 drivers/media/usb/em28xx/em28xx-dvb.c              | 1197 +++
 drivers/media/usb/em28xx/em28xx-i2c.c              |  568 ++
 drivers/media/usb/em28xx/em28xx-input.c            |  645 ++
 drivers/media/usb/em28xx/em28xx-reg.h              |  226 +
 drivers/media/usb/em28xx/em28xx-vbi.c              |  145 +
 drivers/media/usb/em28xx/em28xx-video.c            | 2624 +++++++
 drivers/media/usb/em28xx/em28xx.h                  |  809 ++
 drivers/media/usb/gspca/Kconfig                    |  425 ++
 drivers/media/usb/gspca/Makefile                   |   93 +
 drivers/media/usb/gspca/autogain_functions.c       |  178 +
 drivers/media/usb/gspca/autogain_functions.h       |  183 +
 drivers/media/usb/gspca/benq.c                     |  289 +
 drivers/media/usb/gspca/conex.c                    |  966 +++
 drivers/media/usb/gspca/cpia1.c                    | 1905 +++++
 drivers/media/usb/gspca/etoms.c                    |  799 ++
 drivers/media/usb/gspca/finepix.c                  |  306 +
 drivers/media/usb/gspca/gl860/Kconfig              |    8 +
 drivers/media/usb/gspca/gl860/Makefile             |   10 +
 drivers/media/usb/gspca/gl860/gl860-mi1320.c       |  536 ++
 drivers/media/usb/gspca/gl860/gl860-mi2020.c       |  733 ++
 drivers/media/usb/gspca/gl860/gl860-ov2640.c       |  489 ++
 drivers/media/usb/gspca/gl860/gl860-ov9655.c       |  336 +
 drivers/media/usb/gspca/gl860/gl860.c              |  725 ++
 drivers/media/usb/gspca/gl860/gl860.h              |  105 +
 drivers/media/usb/gspca/gspca.c                    | 2456 ++++++
 drivers/media/usb/gspca/gspca.h                    |  259 +
 drivers/media/usb/gspca/jeilinj.c                  |  548 ++
 drivers/media/usb/gspca/jl2005bcd.c                |  557 ++
 drivers/media/usb/gspca/jpeg.h                     |  168 +
 drivers/media/usb/gspca/kinect.c                   |  408 +
 drivers/media/usb/gspca/konica.c                   |  487 ++
 drivers/media/usb/gspca/m5602/Kconfig              |   11 +
 drivers/media/usb/gspca/m5602/Makefile             |   11 +
 drivers/media/usb/gspca/m5602/m5602_bridge.h       |  163 +
 drivers/media/usb/gspca/m5602/m5602_core.c         |  424 ++
 drivers/media/usb/gspca/m5602/m5602_mt9m111.c      |  647 ++
 drivers/media/usb/gspca/m5602/m5602_mt9m111.h      |  271 +
 drivers/media/usb/gspca/m5602/m5602_ov7660.c       |  488 ++
 drivers/media/usb/gspca/m5602/m5602_ov7660.h       |  260 +
 drivers/media/usb/gspca/m5602/m5602_ov9650.c       |  881 +++
 drivers/media/usb/gspca/m5602/m5602_ov9650.h       |  307 +
 drivers/media/usb/gspca/m5602/m5602_po1030.c       |  763 ++
 drivers/media/usb/gspca/m5602/m5602_po1030.h       |  272 +
 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c       |  726 ++
 drivers/media/usb/gspca/m5602/m5602_s5k4aa.h       |  283 +
 drivers/media/usb/gspca/m5602/m5602_s5k83a.c       |  605 ++
 drivers/media/usb/gspca/m5602/m5602_s5k83a.h       |  193 +
 drivers/media/usb/gspca/m5602/m5602_sensor.h       |   70 +
 drivers/media/usb/gspca/mars.c                     |  439 ++
 drivers/media/usb/gspca/mr97310a.c                 | 1091 +++
 drivers/media/usb/gspca/nw80x.c                    | 2110 +++++
 drivers/media/usb/gspca/ov519.c                    | 4991 ++++++++++++
 drivers/media/usb/gspca/ov534.c                    | 1544 ++++
 drivers/media/usb/gspca/ov534_9.c                  | 1500 ++++
 drivers/media/usb/gspca/pac207.c                   |  469 ++
 drivers/media/usb/gspca/pac7302.c                  |  932 +++
 drivers/media/usb/gspca/pac7311.c                  |  701 ++
 drivers/media/usb/gspca/pac_common.h               |  134 +
 drivers/media/usb/gspca/se401.c                    |  739 ++
 drivers/media/usb/gspca/se401.h                    |   90 +
 drivers/media/usb/gspca/sn9c2028.c                 |  735 ++
 drivers/media/usb/gspca/sn9c2028.h                 |   51 +
 drivers/media/usb/gspca/sn9c20x.c                  | 2428 ++++++
 drivers/media/usb/gspca/sonixb.c                   | 1493 ++++
 drivers/media/usb/gspca/sonixj.c                   | 3206 ++++++++
 drivers/media/usb/gspca/spca1528.c                 |  444 ++
 drivers/media/usb/gspca/spca500.c                  |  990 +++
 drivers/media/usb/gspca/spca501.c                  | 2054 +++++
 drivers/media/usb/gspca/spca505.c                  |  807 ++
 drivers/media/usb/gspca/spca506.c                  |  612 ++
 drivers/media/usb/gspca/spca508.c                  | 1540 ++++
 drivers/media/usb/gspca/spca561.c                  |  936 +++
 drivers/media/usb/gspca/sq905.c                    |  440 ++
 drivers/media/usb/gspca/sq905c.c                   |  344 +
 drivers/media/usb/gspca/sq930x.c                   | 1164 +++
 drivers/media/usb/gspca/stk014.c                   |  446 ++
 drivers/media/usb/gspca/stv0680.c                  |  353 +
 drivers/media/usb/gspca/stv06xx/Kconfig            |    9 +
 drivers/media/usb/gspca/stv06xx/Makefile           |   10 +
 drivers/media/usb/gspca/stv06xx/stv06xx.c          |  634 ++
 drivers/media/usb/gspca/stv06xx/stv06xx.h          |  116 +
 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c     |  540 ++
 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h     |  206 +
 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c   |  434 ++
 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h   |  144 +
 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h   |   87 +
 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c   |  285 +
 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h   |   52 +
 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c   |  272 +
 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h   |  255 +
 drivers/media/usb/gspca/sunplus.c                  | 1085 +++
 drivers/media/usb/gspca/t613.c                     | 1054 +++
 drivers/media/usb/gspca/topro.c                    | 4969 ++++++++++++
 drivers/media/usb/gspca/tv8532.c                   |  378 +
 drivers/media/usb/gspca/vc032x.c                   | 3850 ++++++++++
 drivers/media/usb/gspca/vicam.c                    |  365 +
 drivers/media/usb/gspca/w996Xcf.c                  |  567 ++
 drivers/media/usb/gspca/xirlink_cit.c              | 3145 ++++++++
 drivers/media/usb/gspca/zc3xx-reg.h                |  251 +
 drivers/media/usb/gspca/zc3xx.c                    | 7024 +++++++++++++++++
 drivers/media/usb/hdpvr/Kconfig                    |   10 +
 drivers/media/usb/hdpvr/Makefile                   |    7 +
 drivers/media/usb/hdpvr/hdpvr-control.c            |  200 +
 drivers/media/usb/hdpvr/hdpvr-core.c               |  472 ++
 drivers/media/usb/hdpvr/hdpvr-i2c.c                |  231 +
 drivers/media/usb/hdpvr/hdpvr-video.c              | 1289 ++++
 drivers/media/usb/hdpvr/hdpvr.h                    |  317 +
 drivers/media/usb/pvrusb2/Kconfig                  |   65 +
 drivers/media/usb/pvrusb2/Makefile                 |   22 +
 drivers/media/usb/pvrusb2/pvrusb2-audio.c          |   96 +
 drivers/media/usb/pvrusb2/pvrusb2-audio.h          |   37 +
 drivers/media/usb/pvrusb2/pvrusb2-context.c        |  431 ++
 drivers/media/usb/pvrusb2/pvrusb2-context.h        |   94 +
 drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c       |   95 +
 drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h       |   48 +
 drivers/media/usb/pvrusb2/pvrusb2-ctrl.c           |  609 ++
 drivers/media/usb/pvrusb2/pvrusb2-ctrl.h           |  122 +
 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c    |  166 +
 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h    |   52 +
 drivers/media/usb/pvrusb2/pvrusb2-debug.h          |   69 +
 drivers/media/usb/pvrusb2/pvrusb2-debugifc.c       |  335 +
 drivers/media/usb/pvrusb2/pvrusb2-debugifc.h       |   52 +
 drivers/media/usb/pvrusb2/pvrusb2-devattr.c        |  576 ++
 drivers/media/usb/pvrusb2/pvrusb2-devattr.h        |  199 +
 drivers/media/usb/pvrusb2/pvrusb2-dvb.c            |  435 ++
 drivers/media/usb/pvrusb2/pvrusb2-dvb.h            |   41 +
 drivers/media/usb/pvrusb2/pvrusb2-eeprom.c         |  164 +
 drivers/media/usb/pvrusb2/pvrusb2-eeprom.h         |   39 +
 drivers/media/usb/pvrusb2/pvrusb2-encoder.c        |  552 ++
 drivers/media/usb/pvrusb2/pvrusb2-encoder.h        |   42 +
 drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h        |   72 +
 drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h   |  406 +
 drivers/media/usb/pvrusb2/pvrusb2-hdw.c            | 5202 +++++++++++++
 drivers/media/usb/pvrusb2/pvrusb2-hdw.h            |  360 +
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c       |  698 ++
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h       |   40 +
 drivers/media/usb/pvrusb2/pvrusb2-io.c             |  695 ++
 drivers/media/usb/pvrusb2/pvrusb2-io.h             |  102 +
 drivers/media/usb/pvrusb2/pvrusb2-ioread.c         |  512 ++
 drivers/media/usb/pvrusb2/pvrusb2-ioread.h         |   48 +
 drivers/media/usb/pvrusb2/pvrusb2-main.c           |  182 +
 drivers/media/usb/pvrusb2/pvrusb2-std.c            |  411 +
 drivers/media/usb/pvrusb2/pvrusb2-std.h            |   59 +
 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c          |  861 +++
 drivers/media/usb/pvrusb2/pvrusb2-sysfs.h          |   46 +
 drivers/media/usb/pvrusb2/pvrusb2-util.h           |   62 +
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c           | 1413 ++++
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.h           |   39 +
 drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c      |  114 +
 drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h      |   48 +
 drivers/media/usb/pvrusb2/pvrusb2-wm8775.c         |   70 +
 drivers/media/usb/pvrusb2/pvrusb2-wm8775.h         |   52 +
 drivers/media/usb/pvrusb2/pvrusb2.h                |   42 +
 drivers/media/usb/pwc/Kconfig                      |   48 +
 drivers/media/usb/pwc/Makefile                     |    4 +
 drivers/media/usb/pwc/philips.txt                  |  236 +
 drivers/media/usb/pwc/pwc-ctrl.c                   |  553 ++
 drivers/media/usb/pwc/pwc-dec1.c                   |   32 +
 drivers/media/usb/pwc/pwc-dec1.h                   |   39 +
 drivers/media/usb/pwc/pwc-dec23.c                  |  691 ++
 drivers/media/usb/pwc/pwc-dec23.h                  |   61 +
 drivers/media/usb/pwc/pwc-if.c                     | 1165 +++
 drivers/media/usb/pwc/pwc-kiara.c                  |  892 +++
 drivers/media/usb/pwc/pwc-kiara.h                  |   48 +
 drivers/media/usb/pwc/pwc-misc.c                   |   93 +
 drivers/media/usb/pwc/pwc-nala.h                   |   66 +
 drivers/media/usb/pwc/pwc-timon.c                  | 1448 ++++
 drivers/media/usb/pwc/pwc-timon.h                  |   63 +
 drivers/media/usb/pwc/pwc-uncompress.c             |  107 +
 drivers/media/usb/pwc/pwc-v4l.c                    | 1053 +++
 drivers/media/usb/pwc/pwc.h                        |  393 +
 drivers/media/usb/s2255/Kconfig                    |    9 +
 drivers/media/usb/s2255/Makefile                   |    2 +
 drivers/media/usb/s2255/s2255drv.c                 | 2689 +++++++
 drivers/media/usb/sn9c102/Kconfig                  |   14 +
 drivers/media/usb/sn9c102/Makefile                 |   15 +
 drivers/media/usb/sn9c102/sn9c102.h                |  211 +
 drivers/media/usb/sn9c102/sn9c102_config.h         |   86 +
 drivers/media/usb/sn9c102/sn9c102_core.c           | 3421 +++++++++
 drivers/media/usb/sn9c102/sn9c102_devtable.h       |  147 +
 drivers/media/usb/sn9c102/sn9c102_hv7131d.c        |  264 +
 drivers/media/usb/sn9c102/sn9c102_hv7131r.c        |  363 +
 drivers/media/usb/sn9c102/sn9c102_mi0343.c         |  352 +
 drivers/media/usb/sn9c102/sn9c102_mi0360.c         |  453 ++
 drivers/media/usb/sn9c102/sn9c102_mt9v111.c        |  260 +
 drivers/media/usb/sn9c102/sn9c102_ov7630.c         |  626 ++
 drivers/media/usb/sn9c102/sn9c102_ov7660.c         |  538 ++
 drivers/media/usb/sn9c102/sn9c102_pas106b.c        |  302 +
 drivers/media/usb/sn9c102/sn9c102_pas202bcb.c      |  335 +
 drivers/media/usb/sn9c102/sn9c102_sensor.h         |  307 +
 drivers/media/usb/sn9c102/sn9c102_tas5110c1b.c     |  154 +
 drivers/media/usb/sn9c102/sn9c102_tas5110d.c       |  119 +
 drivers/media/usb/sn9c102/sn9c102_tas5130d1b.c     |  165 +
 drivers/media/usb/stk1160/Kconfig                  |   20 +
 drivers/media/usb/stk1160/Makefile                 |   11 +
 drivers/media/usb/stk1160/stk1160-ac97.c           |  153 +
 drivers/media/usb/stk1160/stk1160-core.c           |  432 ++
 drivers/media/usb/stk1160/stk1160-i2c.c            |  294 +
 drivers/media/usb/stk1160/stk1160-reg.h            |   93 +
 drivers/media/usb/stk1160/stk1160-v4l.c            |  738 ++
 drivers/media/usb/stk1160/stk1160-video.c          |  518 ++
 drivers/media/usb/stk1160/stk1160.h                |  208 +
 drivers/media/usb/stkwebcam/Kconfig                |   13 +
 drivers/media/usb/stkwebcam/Makefile               |    4 +
 drivers/media/usb/stkwebcam/stk-sensor.c           |  595 ++
 drivers/media/usb/stkwebcam/stk-webcam.c           | 1380 ++++
 drivers/media/usb/stkwebcam/stk-webcam.h           |  134 +
 drivers/media/usb/tlg2300/Kconfig                  |   16 +
 drivers/media/usb/tlg2300/Makefile                 |    9 +
 drivers/media/usb/tlg2300/pd-alsa.c                |  332 +
 drivers/media/usb/tlg2300/pd-common.h              |  281 +
 drivers/media/usb/tlg2300/pd-dvb.c                 |  596 ++
 drivers/media/usb/tlg2300/pd-main.c                |  536 ++
 drivers/media/usb/tlg2300/pd-radio.c               |  421 +
 drivers/media/usb/tlg2300/pd-video.c               | 1668 ++++
 drivers/media/usb/tlg2300/vendorcmds.h             |  243 +
 drivers/media/usb/tm6000/Kconfig                   |   33 +
 drivers/media/usb/tm6000/Makefile                  |   15 +
 drivers/media/usb/tm6000/tm6000-alsa.c             |  528 ++
 drivers/media/usb/tm6000/tm6000-cards.c            | 1413 ++++
 drivers/media/usb/tm6000/tm6000-core.c             |  935 +++
 drivers/media/usb/tm6000/tm6000-dvb.c              |  467 ++
 drivers/media/usb/tm6000/tm6000-i2c.c              |  334 +
 drivers/media/usb/tm6000/tm6000-input.c            |  498 ++
 drivers/media/usb/tm6000/tm6000-regs.h             |  600 ++
 drivers/media/usb/tm6000/tm6000-stds.c             |  638 ++
 drivers/media/usb/tm6000/tm6000-usb-isoc.h         |   50 +
 drivers/media/usb/tm6000/tm6000-video.c            | 1852 +++++
 drivers/media/usb/tm6000/tm6000.h                  |  399 +
 drivers/media/usb/usbvision/Kconfig                |   12 +
 drivers/media/usb/usbvision/Makefile               |    6 +
 drivers/media/usb/usbvision/usbvision-cards.c      | 1133 +++
 drivers/media/usb/usbvision/usbvision-cards.h      |   69 +
 drivers/media/usb/usbvision/usbvision-core.c       | 2518 ++++++
 drivers/media/usb/usbvision/usbvision-i2c.c        |  456 ++
 drivers/media/usb/usbvision/usbvision-video.c      | 1720 +++++
 drivers/media/usb/usbvision/usbvision.h            |  535 ++
 drivers/media/usb/uvc/Kconfig                      |   19 +
 drivers/media/usb/uvc/Makefile                     |    6 +
 drivers/media/usb/uvc/uvc_ctrl.c                   | 2165 ++++++
 drivers/media/usb/uvc/uvc_debugfs.c                |  136 +
 drivers/media/usb/uvc/uvc_driver.c                 | 2472 ++++++
 drivers/media/usb/uvc/uvc_entity.c                 |  126 +
 drivers/media/usb/uvc/uvc_isight.c                 |  137 +
 drivers/media/usb/uvc/uvc_queue.c                  |  359 +
 drivers/media/usb/uvc/uvc_status.c                 |  237 +
 drivers/media/usb/uvc/uvc_v4l2.c                   | 1317 ++++
 drivers/media/usb/uvc/uvc_video.c                  | 1879 +++++
 drivers/media/usb/uvc/uvcvideo.h                   |  718 ++
 drivers/media/usb/zr364xx/Kconfig                  |   14 +
 drivers/media/usb/zr364xx/Makefile                 |    2 +
 drivers/media/usb/zr364xx/zr364xx.c                | 1643 ++++
 drivers/media/v4l2-core/Kconfig                    |   32 +-
 drivers/media/video/Kconfig                        | 1226 ---
 drivers/media/video/Makefile                       |  195 -
 drivers/media/video/adp1653.c                      |  487 --
 drivers/media/video/adv7170.c                      |  410 -
 drivers/media/video/adv7175.c                      |  460 --
 drivers/media/video/adv7180.c                      |  667 --
 drivers/media/video/adv7183.c                      |  699 --
 drivers/media/video/adv7183_regs.h                 |  107 -
 drivers/media/video/adv7343.c                      |  476 --
 drivers/media/video/adv7343_regs.h                 |  181 -
 drivers/media/video/adv7393.c                      |  487 --
 drivers/media/video/adv7393_regs.h                 |  188 -
 drivers/media/video/ak881x.c                       |  359 -
 drivers/media/video/aptina-pll.c                   |  173 -
 drivers/media/video/aptina-pll.h                   |   56 -
 drivers/media/video/arv.c                          |  885 ---
 drivers/media/video/as3645a.c                      |  888 ---
 drivers/media/video/atmel-isi.c                    | 1099 ---
 drivers/media/video/au0828/Kconfig                 |   18 -
 drivers/media/video/au0828/Makefile                |    9 -
 drivers/media/video/au0828/au0828-cards.c          |  339 -
 drivers/media/video/au0828/au0828-cards.h          |   27 -
 drivers/media/video/au0828/au0828-core.c           |  282 -
 drivers/media/video/au0828/au0828-dvb.c            |  500 --
 drivers/media/video/au0828/au0828-i2c.c            |  401 -
 drivers/media/video/au0828/au0828-reg.h            |   66 -
 drivers/media/video/au0828/au0828-vbi.c            |  138 -
 drivers/media/video/au0828/au0828-video.c          | 2034 -----
 drivers/media/video/au0828/au0828.h                |  304 -
 drivers/media/video/blackfin/Kconfig               |   10 -
 drivers/media/video/blackfin/Makefile              |    2 -
 drivers/media/video/blackfin/bfin_capture.c        | 1068 ---
 drivers/media/video/blackfin/ppi.c                 |  271 -
 drivers/media/video/bt819.c                        |  517 --
 drivers/media/video/bt856.c                        |  273 -
 drivers/media/video/bt866.c                        |  243 -
 drivers/media/video/bt8xx/Kconfig                  |   27 -
 drivers/media/video/bt8xx/Makefile                 |   13 -
 drivers/media/video/bt8xx/bt848.h                  |  369 -
 drivers/media/video/bt8xx/bttv-audio-hook.c        |  382 -
 drivers/media/video/bt8xx/bttv-audio-hook.h        |   23 -
 drivers/media/video/bt8xx/bttv-cards.c             | 4895 ------------
 drivers/media/video/bt8xx/bttv-driver.c            | 4630 -----------
 drivers/media/video/bt8xx/bttv-gpio.c              |  189 -
 drivers/media/video/bt8xx/bttv-i2c.c               |  397 -
 drivers/media/video/bt8xx/bttv-if.c                |  121 -
 drivers/media/video/bt8xx/bttv-input.c             |  589 --
 drivers/media/video/bt8xx/bttv-risc.c              |  909 ---
 drivers/media/video/bt8xx/bttv-vbi.c               |  459 --
 drivers/media/video/bt8xx/bttv.h                   |  376 -
 drivers/media/video/bt8xx/bttvp.h                  |  535 --
 drivers/media/video/btcx-risc.c                    |  260 -
 drivers/media/video/btcx-risc.h                    |   34 -
 drivers/media/video/bw-qcam.c                      | 1113 ---
 drivers/media/video/c-qcam.c                       |  883 ---
 drivers/media/video/coda.c                         | 1849 -----
 drivers/media/video/coda.h                         |  216 -
 drivers/media/video/cpia2/Kconfig                  |    9 -
 drivers/media/video/cpia2/Makefile                 |    3 -
 drivers/media/video/cpia2/cpia2.h                  |  487 --
 drivers/media/video/cpia2/cpia2_core.c             | 2417 ------
 drivers/media/video/cpia2/cpia2_registers.h        |  476 --
 drivers/media/video/cpia2/cpia2_usb.c              |  955 ---
 drivers/media/video/cpia2/cpia2_v4l.c              | 1267 ---
 drivers/media/video/cs5345.c                       |  252 -
 drivers/media/video/cs53l32a.c                     |  251 -
 drivers/media/video/cx18/Kconfig                   |   35 -
 drivers/media/video/cx18/Makefile                  |   13 -
 drivers/media/video/cx18/cx18-alsa-main.c          |  295 -
 drivers/media/video/cx18/cx18-alsa-mixer.c         |  175 -
 drivers/media/video/cx18/cx18-alsa-mixer.h         |   23 -
 drivers/media/video/cx18/cx18-alsa-pcm.c           |  356 -
 drivers/media/video/cx18/cx18-alsa-pcm.h           |   27 -
 drivers/media/video/cx18/cx18-alsa.h               |   75 -
 drivers/media/video/cx18/cx18-audio.c              |   92 -
 drivers/media/video/cx18/cx18-audio.h              |   24 -
 drivers/media/video/cx18/cx18-av-audio.c           |  471 --
 drivers/media/video/cx18/cx18-av-core.c            | 1401 ----
 drivers/media/video/cx18/cx18-av-core.h            |  391 -
 drivers/media/video/cx18/cx18-av-firmware.c        |  225 -
 drivers/media/video/cx18/cx18-av-vbi.c             |  311 -
 drivers/media/video/cx18/cx18-cards.c              |  638 --
 drivers/media/video/cx18/cx18-cards.h              |  157 -
 drivers/media/video/cx18/cx18-controls.c           |  131 -
 drivers/media/video/cx18/cx18-controls.h           |   24 -
 drivers/media/video/cx18/cx18-driver.c             | 1360 ----
 drivers/media/video/cx18/cx18-driver.h             |  730 --
 drivers/media/video/cx18/cx18-dvb.c                |  609 --
 drivers/media/video/cx18/cx18-dvb.h                |   25 -
 drivers/media/video/cx18/cx18-fileops.c            |  881 ---
 drivers/media/video/cx18/cx18-fileops.h            |   41 -
 drivers/media/video/cx18/cx18-firmware.c           |  459 --
 drivers/media/video/cx18/cx18-firmware.h           |   25 -
 drivers/media/video/cx18/cx18-gpio.c               |  347 -
 drivers/media/video/cx18/cx18-gpio.h               |   34 -
 drivers/media/video/cx18/cx18-i2c.c                |  330 -
 drivers/media/video/cx18/cx18-i2c.h                |   29 -
 drivers/media/video/cx18/cx18-io.c                 |   97 -
 drivers/media/video/cx18/cx18-io.h                 |  191 -
 drivers/media/video/cx18/cx18-ioctl.c              | 1194 ---
 drivers/media/video/cx18/cx18-ioctl.h              |   31 -
 drivers/media/video/cx18/cx18-irq.c                |   81 -
 drivers/media/video/cx18/cx18-irq.h                |   35 -
 drivers/media/video/cx18/cx18-mailbox.c            |  870 ---
 drivers/media/video/cx18/cx18-mailbox.h            |   95 -
 drivers/media/video/cx18/cx18-queue.c              |  443 --
 drivers/media/video/cx18/cx18-queue.h              |   98 -
 drivers/media/video/cx18/cx18-scb.c                |  122 -
 drivers/media/video/cx18/cx18-scb.h                |  280 -
 drivers/media/video/cx18/cx18-streams.c            | 1060 ---
 drivers/media/video/cx18/cx18-streams.h            |   62 -
 drivers/media/video/cx18/cx18-vbi.c                |  277 -
 drivers/media/video/cx18/cx18-vbi.h                |   26 -
 drivers/media/video/cx18/cx18-version.h            |   28 -
 drivers/media/video/cx18/cx18-video.c              |   32 -
 drivers/media/video/cx18/cx18-video.h              |   22 -
 drivers/media/video/cx18/cx23418.h                 |  492 --
 drivers/media/video/cx231xx/Kconfig                |   51 -
 drivers/media/video/cx231xx/Makefile               |   15 -
 drivers/media/video/cx231xx/cx231xx-417.c          | 2197 ------
 drivers/media/video/cx231xx/cx231xx-audio.c        |  780 --
 drivers/media/video/cx231xx/cx231xx-avcore.c       | 3087 --------
 drivers/media/video/cx231xx/cx231xx-cards.c        | 1370 ----
 drivers/media/video/cx231xx/cx231xx-conf-reg.h     |  495 --
 drivers/media/video/cx231xx/cx231xx-core.c         | 1736 -----
 drivers/media/video/cx231xx/cx231xx-dif.h          | 3178 --------
 drivers/media/video/cx231xx/cx231xx-dvb.c          |  796 --
 drivers/media/video/cx231xx/cx231xx-i2c.c          |  532 --
 drivers/media/video/cx231xx/cx231xx-input.c        |  119 -
 drivers/media/video/cx231xx/cx231xx-pcb-cfg.c      |  795 --
 drivers/media/video/cx231xx/cx231xx-pcb-cfg.h      |  231 -
 drivers/media/video/cx231xx/cx231xx-reg.h          | 1564 ----
 drivers/media/video/cx231xx/cx231xx-vbi.c          |  710 --
 drivers/media/video/cx231xx/cx231xx-vbi.h          |   65 -
 drivers/media/video/cx231xx/cx231xx-video.c        | 2670 -------
 drivers/media/video/cx231xx/cx231xx.h              | 1012 ---
 drivers/media/video/cx2341x.c                      | 1726 -----
 drivers/media/video/cx23885/Kconfig                |   46 -
 drivers/media/video/cx23885/Makefile               |   15 -
 drivers/media/video/cx23885/altera-ci.c            |  837 --
 drivers/media/video/cx23885/altera-ci.h            |  100 -
 drivers/media/video/cx23885/cimax2.c               |  536 --
 drivers/media/video/cx23885/cimax2.h               |   47 -
 drivers/media/video/cx23885/cx23885-417.c          | 1790 -----
 drivers/media/video/cx23885/cx23885-alsa.c         |  535 --
 drivers/media/video/cx23885/cx23885-av.c           |   35 -
 drivers/media/video/cx23885/cx23885-av.h           |   27 -
 drivers/media/video/cx23885/cx23885-cards.c        | 1684 ----
 drivers/media/video/cx23885/cx23885-core.c         | 2234 ------
 drivers/media/video/cx23885/cx23885-dvb.c          | 1356 ----
 drivers/media/video/cx23885/cx23885-f300.c         |  177 -
 drivers/media/video/cx23885/cx23885-f300.h         |    2 -
 drivers/media/video/cx23885/cx23885-i2c.c          |  396 -
 drivers/media/video/cx23885/cx23885-input.c        |  365 -
 drivers/media/video/cx23885/cx23885-input.h        |   30 -
 drivers/media/video/cx23885/cx23885-ioctl.c        |  208 -
 drivers/media/video/cx23885/cx23885-ioctl.h        |   39 -
 drivers/media/video/cx23885/cx23885-ir.c           |  117 -
 drivers/media/video/cx23885/cx23885-ir.h           |   31 -
 drivers/media/video/cx23885/cx23885-reg.h          |  452 --
 drivers/media/video/cx23885/cx23885-vbi.c          |  295 -
 drivers/media/video/cx23885/cx23885-video.c        | 1926 -----
 drivers/media/video/cx23885/cx23885.h              |  653 --
 drivers/media/video/cx23885/cx23888-ir.c           | 1271 ----
 drivers/media/video/cx23885/cx23888-ir.h           |   28 -
 drivers/media/video/cx23885/netup-eeprom.c         |  107 -
 drivers/media/video/cx23885/netup-eeprom.h         |   42 -
 drivers/media/video/cx23885/netup-init.c           |  125 -
 drivers/media/video/cx23885/netup-init.h           |   25 -
 drivers/media/video/cx25821/Kconfig                |   34 -
 drivers/media/video/cx25821/Makefile               |   13 -
 drivers/media/video/cx25821/cx25821-alsa.c         |  784 --
 .../media/video/cx25821/cx25821-audio-upstream.c   |  778 --
 .../media/video/cx25821/cx25821-audio-upstream.h   |   62 -
 drivers/media/video/cx25821/cx25821-audio.h        |   62 -
 drivers/media/video/cx25821/cx25821-biffuncs.h     |   45 -
 drivers/media/video/cx25821/cx25821-cards.c        |   72 -
 drivers/media/video/cx25821/cx25821-core.c         | 1502 ----
 drivers/media/video/cx25821/cx25821-gpio.c         |   98 -
 drivers/media/video/cx25821/cx25821-i2c.c          |  416 -
 .../media/video/cx25821/cx25821-medusa-defines.h   |   42 -
 drivers/media/video/cx25821/cx25821-medusa-reg.h   |  455 --
 drivers/media/video/cx25821/cx25821-medusa-video.c |  787 --
 drivers/media/video/cx25821/cx25821-medusa-video.h |   49 -
 drivers/media/video/cx25821/cx25821-reg.h          | 1592 ----
 drivers/media/video/cx25821/cx25821-sram.h         |  261 -
 .../video/cx25821/cx25821-video-upstream-ch2.c     |  802 --
 .../video/cx25821/cx25821-video-upstream-ch2.h     |  138 -
 .../media/video/cx25821/cx25821-video-upstream.c   |  856 ---
 .../media/video/cx25821/cx25821-video-upstream.h   |  139 -
 drivers/media/video/cx25821/cx25821-video.c        | 1990 -----
 drivers/media/video/cx25821/cx25821-video.h        |  186 -
 drivers/media/video/cx25821/cx25821.h              |  615 --
 drivers/media/video/cx25840/Kconfig                |    8 -
 drivers/media/video/cx25840/Makefile               |    6 -
 drivers/media/video/cx25840/cx25840-audio.c        |  571 --
 drivers/media/video/cx25840/cx25840-core.c         | 5340 -------------
 drivers/media/video/cx25840/cx25840-core.h         |  137 -
 drivers/media/video/cx25840/cx25840-firmware.c     |  175 -
 drivers/media/video/cx25840/cx25840-ir.c           | 1281 ----
 drivers/media/video/cx25840/cx25840-vbi.c          |  256 -
 drivers/media/video/cx88/Kconfig                   |   86 -
 drivers/media/video/cx88/Makefile                  |   16 -
 drivers/media/video/cx88/cx88-alsa.c               |  975 ---
 drivers/media/video/cx88/cx88-blackbird.c          | 1299 ----
 drivers/media/video/cx88/cx88-cards.c              | 3811 ----------
 drivers/media/video/cx88/cx88-core.c               | 1131 ---
 drivers/media/video/cx88/cx88-dsp.c                |  322 -
 drivers/media/video/cx88/cx88-dvb.c                | 1778 -----
 drivers/media/video/cx88/cx88-i2c.c                |  184 -
 drivers/media/video/cx88/cx88-input.c              |  635 --
 drivers/media/video/cx88/cx88-mpeg.c               |  929 ---
 drivers/media/video/cx88/cx88-reg.h                |  836 --
 drivers/media/video/cx88/cx88-tvaudio.c            | 1059 ---
 drivers/media/video/cx88/cx88-vbi.c                |  245 -
 drivers/media/video/cx88/cx88-video.c              | 2075 -----
 drivers/media/video/cx88/cx88-vp3054-i2c.c         |  159 -
 drivers/media/video/cx88/cx88-vp3054-i2c.h         |   41 -
 drivers/media/video/cx88/cx88.h                    |  748 --
 drivers/media/video/davinci/Kconfig                |  121 -
 drivers/media/video/davinci/Makefile               |   20 -
 drivers/media/video/davinci/ccdc_hw_device.h       |  110 -
 drivers/media/video/davinci/dm355_ccdc.c           | 1072 ---
 drivers/media/video/davinci/dm355_ccdc_regs.h      |  310 -
 drivers/media/video/davinci/dm644x_ccdc.c          | 1081 ---
 drivers/media/video/davinci/dm644x_ccdc_regs.h     |  153 -
 drivers/media/video/davinci/isif.c                 | 1162 ---
 drivers/media/video/davinci/isif_regs.h            |  269 -
 drivers/media/video/davinci/vpbe.c                 |  886 ---
 drivers/media/video/davinci/vpbe_display.c         | 1838 -----
 drivers/media/video/davinci/vpbe_osd.c             | 1605 ----
 drivers/media/video/davinci/vpbe_osd_regs.h        |  364 -
 drivers/media/video/davinci/vpbe_venc.c            |  706 --
 drivers/media/video/davinci/vpbe_venc_regs.h       |  177 -
 drivers/media/video/davinci/vpfe_capture.c         | 2079 -----
 drivers/media/video/davinci/vpif.c                 |  514 --
 drivers/media/video/davinci/vpif.h                 |  688 --
 drivers/media/video/davinci/vpif_capture.c         | 2456 ------
 drivers/media/video/davinci/vpif_capture.h         |  170 -
 drivers/media/video/davinci/vpif_display.c         | 2010 -----
 drivers/media/video/davinci/vpif_display.h         |  181 -
 drivers/media/video/davinci/vpss.c                 |  482 --
 drivers/media/video/em28xx/Kconfig                 |   58 -
 drivers/media/video/em28xx/Makefile                |   15 -
 drivers/media/video/em28xx/em28xx-audio.c          |  751 --
 drivers/media/video/em28xx/em28xx-cards.c          | 3417 ---------
 drivers/media/video/em28xx/em28xx-core.c           | 1260 ---
 drivers/media/video/em28xx/em28xx-dvb.c            | 1197 ---
 drivers/media/video/em28xx/em28xx-i2c.c            |  568 --
 drivers/media/video/em28xx/em28xx-input.c          |  645 --
 drivers/media/video/em28xx/em28xx-reg.h            |  226 -
 drivers/media/video/em28xx/em28xx-vbi.c            |  145 -
 drivers/media/video/em28xx/em28xx-video.c          | 2624 -------
 drivers/media/video/em28xx/em28xx.h                |  809 --
 drivers/media/video/fsl-viu.c                      | 1690 -----
 drivers/media/video/gspca/Kconfig                  |  425 --
 drivers/media/video/gspca/Makefile                 |   93 -
 drivers/media/video/gspca/autogain_functions.c     |  178 -
 drivers/media/video/gspca/autogain_functions.h     |  183 -
 drivers/media/video/gspca/benq.c                   |  289 -
 drivers/media/video/gspca/conex.c                  |  966 ---
 drivers/media/video/gspca/cpia1.c                  | 1905 -----
 drivers/media/video/gspca/etoms.c                  |  799 --
 drivers/media/video/gspca/finepix.c                |  306 -
 drivers/media/video/gspca/gl860/Kconfig            |    8 -
 drivers/media/video/gspca/gl860/Makefile           |   10 -
 drivers/media/video/gspca/gl860/gl860-mi1320.c     |  536 --
 drivers/media/video/gspca/gl860/gl860-mi2020.c     |  733 --
 drivers/media/video/gspca/gl860/gl860-ov2640.c     |  489 --
 drivers/media/video/gspca/gl860/gl860-ov9655.c     |  336 -
 drivers/media/video/gspca/gl860/gl860.c            |  725 --
 drivers/media/video/gspca/gl860/gl860.h            |  105 -
 drivers/media/video/gspca/gspca.c                  | 2456 ------
 drivers/media/video/gspca/gspca.h                  |  259 -
 drivers/media/video/gspca/jeilinj.c                |  548 --
 drivers/media/video/gspca/jl2005bcd.c              |  557 --
 drivers/media/video/gspca/jpeg.h                   |  168 -
 drivers/media/video/gspca/kinect.c                 |  408 -
 drivers/media/video/gspca/konica.c                 |  487 --
 drivers/media/video/gspca/m5602/Kconfig            |   11 -
 drivers/media/video/gspca/m5602/Makefile           |   11 -
 drivers/media/video/gspca/m5602/m5602_bridge.h     |  163 -
 drivers/media/video/gspca/m5602/m5602_core.c       |  424 --
 drivers/media/video/gspca/m5602/m5602_mt9m111.c    |  647 --
 drivers/media/video/gspca/m5602/m5602_mt9m111.h    |  271 -
 drivers/media/video/gspca/m5602/m5602_ov7660.c     |  488 --
 drivers/media/video/gspca/m5602/m5602_ov7660.h     |  260 -
 drivers/media/video/gspca/m5602/m5602_ov9650.c     |  881 ---
 drivers/media/video/gspca/m5602/m5602_ov9650.h     |  307 -
 drivers/media/video/gspca/m5602/m5602_po1030.c     |  763 --
 drivers/media/video/gspca/m5602/m5602_po1030.h     |  272 -
 drivers/media/video/gspca/m5602/m5602_s5k4aa.c     |  726 --
 drivers/media/video/gspca/m5602/m5602_s5k4aa.h     |  283 -
 drivers/media/video/gspca/m5602/m5602_s5k83a.c     |  605 --
 drivers/media/video/gspca/m5602/m5602_s5k83a.h     |  193 -
 drivers/media/video/gspca/m5602/m5602_sensor.h     |   70 -
 drivers/media/video/gspca/mars.c                   |  439 --
 drivers/media/video/gspca/mr97310a.c               | 1091 ---
 drivers/media/video/gspca/nw80x.c                  | 2110 -----
 drivers/media/video/gspca/ov519.c                  | 4991 ------------
 drivers/media/video/gspca/ov534.c                  | 1544 ----
 drivers/media/video/gspca/ov534_9.c                | 1500 ----
 drivers/media/video/gspca/pac207.c                 |  469 --
 drivers/media/video/gspca/pac7302.c                |  932 ---
 drivers/media/video/gspca/pac7311.c                |  701 --
 drivers/media/video/gspca/pac_common.h             |  134 -
 drivers/media/video/gspca/se401.c                  |  739 --
 drivers/media/video/gspca/se401.h                  |   90 -
 drivers/media/video/gspca/sn9c2028.c               |  735 --
 drivers/media/video/gspca/sn9c2028.h               |   51 -
 drivers/media/video/gspca/sn9c20x.c                | 2428 ------
 drivers/media/video/gspca/sonixb.c                 | 1493 ----
 drivers/media/video/gspca/sonixj.c                 | 3206 --------
 drivers/media/video/gspca/spca1528.c               |  444 --
 drivers/media/video/gspca/spca500.c                |  990 ---
 drivers/media/video/gspca/spca501.c                | 2054 -----
 drivers/media/video/gspca/spca505.c                |  807 --
 drivers/media/video/gspca/spca506.c                |  612 --
 drivers/media/video/gspca/spca508.c                | 1540 ----
 drivers/media/video/gspca/spca561.c                |  936 ---
 drivers/media/video/gspca/sq905.c                  |  440 --
 drivers/media/video/gspca/sq905c.c                 |  344 -
 drivers/media/video/gspca/sq930x.c                 | 1164 ---
 drivers/media/video/gspca/stk014.c                 |  446 --
 drivers/media/video/gspca/stv0680.c                |  353 -
 drivers/media/video/gspca/stv06xx/Kconfig          |    9 -
 drivers/media/video/gspca/stv06xx/Makefile         |   10 -
 drivers/media/video/gspca/stv06xx/stv06xx.c        |  634 --
 drivers/media/video/gspca/stv06xx/stv06xx.h        |  116 -
 drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c   |  540 --
 drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h   |  206 -
 drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c |  434 --
 drivers/media/video/gspca/stv06xx/stv06xx_pb0100.h |  144 -
 drivers/media/video/gspca/stv06xx/stv06xx_sensor.h |   87 -
 drivers/media/video/gspca/stv06xx/stv06xx_st6422.c |  285 -
 drivers/media/video/gspca/stv06xx/stv06xx_st6422.h |   52 -
 drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c |  272 -
 drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h |  255 -
 drivers/media/video/gspca/sunplus.c                | 1085 ---
 drivers/media/video/gspca/t613.c                   | 1054 ---
 drivers/media/video/gspca/topro.c                  | 4969 ------------
 drivers/media/video/gspca/tv8532.c                 |  378 -
 drivers/media/video/gspca/vc032x.c                 | 3850 ----------
 drivers/media/video/gspca/vicam.c                  |  365 -
 drivers/media/video/gspca/w996Xcf.c                |  567 --
 drivers/media/video/gspca/xirlink_cit.c            | 3145 --------
 drivers/media/video/gspca/zc3xx-reg.h              |  251 -
 drivers/media/video/gspca/zc3xx.c                  | 7024 -----------------
 drivers/media/video/hdpvr/Kconfig                  |   10 -
 drivers/media/video/hdpvr/Makefile                 |    7 -
 drivers/media/video/hdpvr/hdpvr-control.c          |  200 -
 drivers/media/video/hdpvr/hdpvr-core.c             |  472 --
 drivers/media/video/hdpvr/hdpvr-i2c.c              |  231 -
 drivers/media/video/hdpvr/hdpvr-video.c            | 1289 ----
 drivers/media/video/hdpvr/hdpvr.h                  |  317 -
 drivers/media/video/hexium_gemini.c                |  430 --
 drivers/media/video/hexium_orion.c                 |  502 --
 drivers/media/video/imx074.c                       |  475 --
 drivers/media/video/indycam.c                      |  390 -
 drivers/media/video/indycam.h                      |   93 -
 drivers/media/video/ir-kbd-i2c.c                   |  489 --
 drivers/media/video/ivtv/Kconfig                   |   45 -
 drivers/media/video/ivtv/Makefile                  |   14 -
 drivers/media/video/ivtv/ivtv-cards.c              | 1370 ----
 drivers/media/video/ivtv/ivtv-cards.h              |  309 -
 drivers/media/video/ivtv/ivtv-controls.c           |  163 -
 drivers/media/video/ivtv/ivtv-controls.h           |   28 -
 drivers/media/video/ivtv/ivtv-driver.c             | 1498 ----
 drivers/media/video/ivtv/ivtv-driver.h             |  839 --
 drivers/media/video/ivtv/ivtv-fileops.c            | 1070 ---
 drivers/media/video/ivtv/ivtv-fileops.h            |   44 -
 drivers/media/video/ivtv/ivtv-firmware.c           |  402 -
 drivers/media/video/ivtv/ivtv-firmware.h           |   31 -
 drivers/media/video/ivtv/ivtv-gpio.c               |  374 -
 drivers/media/video/ivtv/ivtv-gpio.h               |   29 -
 drivers/media/video/ivtv/ivtv-i2c.c                |  760 --
 drivers/media/video/ivtv/ivtv-i2c.h                |   32 -
 drivers/media/video/ivtv/ivtv-ioctl.c              | 1899 -----
 drivers/media/video/ivtv/ivtv-ioctl.h              |   35 -
 drivers/media/video/ivtv/ivtv-irq.c                | 1038 ---
 drivers/media/video/ivtv/ivtv-irq.h                |   53 -
 drivers/media/video/ivtv/ivtv-mailbox.c            |  387 -
 drivers/media/video/ivtv/ivtv-mailbox.h            |   35 -
 drivers/media/video/ivtv/ivtv-queue.c              |  297 -
 drivers/media/video/ivtv/ivtv-queue.h              |   96 -
 drivers/media/video/ivtv/ivtv-routing.c            |  119 -
 drivers/media/video/ivtv/ivtv-routing.h            |   27 -
 drivers/media/video/ivtv/ivtv-streams.c            | 1014 ---
 drivers/media/video/ivtv/ivtv-streams.h            |   37 -
 drivers/media/video/ivtv/ivtv-udma.c               |  234 -
 drivers/media/video/ivtv/ivtv-udma.h               |   48 -
 drivers/media/video/ivtv/ivtv-vbi.c                |  549 --
 drivers/media/video/ivtv/ivtv-vbi.h                |   34 -
 drivers/media/video/ivtv/ivtv-version.h            |   26 -
 drivers/media/video/ivtv/ivtv-yuv.c                | 1296 ----
 drivers/media/video/ivtv/ivtv-yuv.h                |   44 -
 drivers/media/video/ivtv/ivtvfb.c                  | 1317 ----
 drivers/media/video/ks0127.c                       |  724 --
 drivers/media/video/ks0127.h                       |   51 -
 drivers/media/video/m2m-deinterlace.c              | 1120 ---
 drivers/media/video/m52790.c                       |  216 -
 drivers/media/video/m5mols/Kconfig                 |    6 -
 drivers/media/video/m5mols/Makefile                |    3 -
 drivers/media/video/m5mols/m5mols.h                |  334 -
 drivers/media/video/m5mols/m5mols_capture.c        |  155 -
 drivers/media/video/m5mols/m5mols_controls.c       |  628 --
 drivers/media/video/m5mols/m5mols_core.c           |  990 ---
 drivers/media/video/m5mols/m5mols_reg.h            |  362 -
 drivers/media/video/marvell-ccic/Kconfig           |   23 -
 drivers/media/video/marvell-ccic/Makefile          |    6 -
 drivers/media/video/marvell-ccic/cafe-driver.c     |  654 --
 drivers/media/video/marvell-ccic/mcam-core.c       | 1878 -----
 drivers/media/video/marvell-ccic/mcam-core.h       |  322 -
 drivers/media/video/marvell-ccic/mmp-driver.c      |  380 -
 drivers/media/video/mem2mem_testdev.c              | 1131 ---
 drivers/media/video/meye.c                         | 1964 -----
 drivers/media/video/meye.h                         |  324 -
 drivers/media/video/msp3400-driver.c               |  899 ---
 drivers/media/video/msp3400-driver.h               |  137 -
 drivers/media/video/msp3400-kthreads.c             | 1165 ---
 drivers/media/video/mt9m001.c                      |  737 --
 drivers/media/video/mt9m032.c                      |  878 ---
 drivers/media/video/mt9m111.c                      | 1014 ---
 drivers/media/video/mt9p031.c                      | 1071 ---
 drivers/media/video/mt9t001.c                      |  833 --
 drivers/media/video/mt9t031.c                      |  857 ---
 drivers/media/video/mt9t112.c                      | 1125 ---
 drivers/media/video/mt9v011.c                      |  712 --
 drivers/media/video/mt9v022.c                      |  879 ---
 drivers/media/video/mt9v032.c                      |  763 --
 drivers/media/video/mx1_camera.c                   |  889 ---
 drivers/media/video/mx2_camera.c                   | 1869 -----
 drivers/media/video/mx2_emmaprp.c                  | 1037 ---
 drivers/media/video/mx3_camera.c                   | 1300 ----
 drivers/media/video/mxb.c                          |  886 ---
 drivers/media/video/noon010pc30.c                  |  851 ---
 drivers/media/video/omap/Kconfig                   |   14 -
 drivers/media/video/omap/Makefile                  |    8 -
 drivers/media/video/omap/omap_vout.c               | 2289 ------
 drivers/media/video/omap/omap_vout_vrfb.c          |  390 -
 drivers/media/video/omap/omap_vout_vrfb.h          |   40 -
 drivers/media/video/omap/omap_voutdef.h            |  225 -
 drivers/media/video/omap/omap_voutlib.c            |  339 -
 drivers/media/video/omap/omap_voutlib.h            |   36 -
 drivers/media/video/omap1_camera.c                 | 1723 -----
 drivers/media/video/omap24xxcam-dma.c              |  601 --
 drivers/media/video/omap24xxcam.c                  | 1881 -----
 drivers/media/video/omap24xxcam.h                  |  593 --
 drivers/media/video/omap3isp/Makefile              |   11 -
 drivers/media/video/omap3isp/cfa_coef_table.h      |   61 -
 drivers/media/video/omap3isp/gamma_table.h         |   90 -
 drivers/media/video/omap3isp/isp.c                 | 2241 ------
 drivers/media/video/omap3isp/isp.h                 |  352 -
 drivers/media/video/omap3isp/ispccdc.c             | 2583 -------
 drivers/media/video/omap3isp/ispccdc.h             |  172 -
 drivers/media/video/omap3isp/ispccp2.c             | 1171 ---
 drivers/media/video/omap3isp/ispccp2.h             |   98 -
 drivers/media/video/omap3isp/ispcsi2.c             | 1328 ----
 drivers/media/video/omap3isp/ispcsi2.h             |  165 -
 drivers/media/video/omap3isp/ispcsiphy.c           |  249 -
 drivers/media/video/omap3isp/ispcsiphy.h           |   63 -
 drivers/media/video/omap3isp/isph3a.h              |  117 -
 drivers/media/video/omap3isp/isph3a_aewb.c         |  368 -
 drivers/media/video/omap3isp/isph3a_af.c           |  423 --
 drivers/media/video/omap3isp/isphist.c             |  518 --
 drivers/media/video/omap3isp/isphist.h             |   40 -
 drivers/media/video/omap3isp/isppreview.c          | 2348 ------
 drivers/media/video/omap3isp/isppreview.h          |  174 -
 drivers/media/video/omap3isp/ispqueue.c            | 1158 ---
 drivers/media/video/omap3isp/ispqueue.h            |  187 -
 drivers/media/video/omap3isp/ispreg.h              | 1586 ----
 drivers/media/video/omap3isp/ispresizer.c          | 1778 -----
 drivers/media/video/omap3isp/ispresizer.h          |  146 -
 drivers/media/video/omap3isp/ispstat.c             | 1102 ---
 drivers/media/video/omap3isp/ispstat.h             |  169 -
 drivers/media/video/omap3isp/ispvideo.c            | 1403 ----
 drivers/media/video/omap3isp/ispvideo.h            |  216 -
 drivers/media/video/omap3isp/luma_enhance_table.h  |   42 -
 drivers/media/video/omap3isp/noise_filter_table.h  |   30 -
 drivers/media/video/ov2640.c                       | 1108 ---
 drivers/media/video/ov5642.c                       | 1073 ---
 drivers/media/video/ov6650.c                       | 1053 ---
 drivers/media/video/ov7670.c                       | 1586 ----
 drivers/media/video/ov772x.c                       | 1126 ---
 drivers/media/video/ov9640.c                       |  746 --
 drivers/media/video/ov9640.h                       |  207 -
 drivers/media/video/ov9740.c                       | 1005 ---
 drivers/media/video/pms.c                          | 1152 ---
 drivers/media/video/pvrusb2/Kconfig                |   65 -
 drivers/media/video/pvrusb2/Makefile               |   22 -
 drivers/media/video/pvrusb2/pvrusb2-audio.c        |   96 -
 drivers/media/video/pvrusb2/pvrusb2-audio.h        |   37 -
 drivers/media/video/pvrusb2/pvrusb2-context.c      |  431 --
 drivers/media/video/pvrusb2/pvrusb2-context.h      |   94 -
 drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c     |   95 -
 drivers/media/video/pvrusb2/pvrusb2-cs53l32a.h     |   48 -
 drivers/media/video/pvrusb2/pvrusb2-ctrl.c         |  609 --
 drivers/media/video/pvrusb2/pvrusb2-ctrl.h         |  122 -
 drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c  |  166 -
 drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h  |   52 -
 drivers/media/video/pvrusb2/pvrusb2-debug.h        |   69 -
 drivers/media/video/pvrusb2/pvrusb2-debugifc.c     |  335 -
 drivers/media/video/pvrusb2/pvrusb2-debugifc.h     |   52 -
 drivers/media/video/pvrusb2/pvrusb2-devattr.c      |  576 --
 drivers/media/video/pvrusb2/pvrusb2-devattr.h      |  199 -
 drivers/media/video/pvrusb2/pvrusb2-dvb.c          |  435 --
 drivers/media/video/pvrusb2/pvrusb2-dvb.h          |   41 -
 drivers/media/video/pvrusb2/pvrusb2-eeprom.c       |  164 -
 drivers/media/video/pvrusb2/pvrusb2-eeprom.h       |   39 -
 drivers/media/video/pvrusb2/pvrusb2-encoder.c      |  552 --
 drivers/media/video/pvrusb2/pvrusb2-encoder.h      |   42 -
 drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h      |   72 -
 drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h |  406 -
 drivers/media/video/pvrusb2/pvrusb2-hdw.c          | 5202 -------------
 drivers/media/video/pvrusb2/pvrusb2-hdw.h          |  360 -
 drivers/media/video/pvrusb2/pvrusb2-i2c-core.c     |  698 --
 drivers/media/video/pvrusb2/pvrusb2-i2c-core.h     |   40 -
 drivers/media/video/pvrusb2/pvrusb2-io.c           |  695 --
 drivers/media/video/pvrusb2/pvrusb2-io.h           |  102 -
 drivers/media/video/pvrusb2/pvrusb2-ioread.c       |  512 --
 drivers/media/video/pvrusb2/pvrusb2-ioread.h       |   48 -
 drivers/media/video/pvrusb2/pvrusb2-main.c         |  182 -
 drivers/media/video/pvrusb2/pvrusb2-std.c          |  411 -
 drivers/media/video/pvrusb2/pvrusb2-std.h          |   59 -
 drivers/media/video/pvrusb2/pvrusb2-sysfs.c        |  861 ---
 drivers/media/video/pvrusb2/pvrusb2-sysfs.h        |   46 -
 drivers/media/video/pvrusb2/pvrusb2-util.h         |   62 -
 drivers/media/video/pvrusb2/pvrusb2-v4l2.c         | 1413 ----
 drivers/media/video/pvrusb2/pvrusb2-v4l2.h         |   39 -
 drivers/media/video/pvrusb2/pvrusb2-video-v4l.c    |  114 -
 drivers/media/video/pvrusb2/pvrusb2-video-v4l.h    |   48 -
 drivers/media/video/pvrusb2/pvrusb2-wm8775.c       |   70 -
 drivers/media/video/pvrusb2/pvrusb2-wm8775.h       |   52 -
 drivers/media/video/pvrusb2/pvrusb2.h              |   42 -
 drivers/media/video/pwc/Kconfig                    |   48 -
 drivers/media/video/pwc/Makefile                   |    4 -
 drivers/media/video/pwc/philips.txt                |  236 -
 drivers/media/video/pwc/pwc-ctrl.c                 |  553 --
 drivers/media/video/pwc/pwc-dec1.c                 |   32 -
 drivers/media/video/pwc/pwc-dec1.h                 |   39 -
 drivers/media/video/pwc/pwc-dec23.c                |  691 --
 drivers/media/video/pwc/pwc-dec23.h                |   61 -
 drivers/media/video/pwc/pwc-if.c                   | 1165 ---
 drivers/media/video/pwc/pwc-kiara.c                |  892 ---
 drivers/media/video/pwc/pwc-kiara.h                |   48 -
 drivers/media/video/pwc/pwc-misc.c                 |   93 -
 drivers/media/video/pwc/pwc-nala.h                 |   66 -
 drivers/media/video/pwc/pwc-timon.c                | 1448 ----
 drivers/media/video/pwc/pwc-timon.h                |   63 -
 drivers/media/video/pwc/pwc-uncompress.c           |  107 -
 drivers/media/video/pwc/pwc-v4l.c                  | 1053 ---
 drivers/media/video/pwc/pwc.h                      |  393 -
 drivers/media/video/pxa_camera.c                   | 1852 -----
 drivers/media/video/rj54n1cb0c.c                   | 1414 ----
 drivers/media/video/s2255drv.c                     | 2689 -------
 drivers/media/video/s5k6aa.c                       | 1667 ----
 drivers/media/video/s5p-fimc/Kconfig               |   48 -
 drivers/media/video/s5p-fimc/Makefile              |    7 -
 drivers/media/video/s5p-fimc/fimc-capture.c        | 1738 -----
 drivers/media/video/s5p-fimc/fimc-core.c           | 1239 ---
 drivers/media/video/s5p-fimc/fimc-core.h           |  713 --
 drivers/media/video/s5p-fimc/fimc-lite-reg.c       |  300 -
 drivers/media/video/s5p-fimc/fimc-lite-reg.h       |  150 -
 drivers/media/video/s5p-fimc/fimc-lite.c           | 1606 ----
 drivers/media/video/s5p-fimc/fimc-lite.h           |  213 -
 drivers/media/video/s5p-fimc/fimc-m2m.c            |  854 ---
 drivers/media/video/s5p-fimc/fimc-mdevice.c        | 1037 ---
 drivers/media/video/s5p-fimc/fimc-mdevice.h        |  120 -
 drivers/media/video/s5p-fimc/fimc-reg.c            |  775 --
 drivers/media/video/s5p-fimc/fimc-reg.h            |  326 -
 drivers/media/video/s5p-fimc/mipi-csis.c           |  722 --
 drivers/media/video/s5p-fimc/mipi-csis.h           |   25 -
 drivers/media/video/s5p-g2d/Makefile               |    3 -
 drivers/media/video/s5p-g2d/g2d-hw.c               |  109 -
 drivers/media/video/s5p-g2d/g2d-regs.h             |  115 -
 drivers/media/video/s5p-g2d/g2d.c                  |  847 ---
 drivers/media/video/s5p-g2d/g2d.h                  |   86 -
 drivers/media/video/s5p-jpeg/Makefile              |    2 -
 drivers/media/video/s5p-jpeg/jpeg-core.c           | 1529 ----
 drivers/media/video/s5p-jpeg/jpeg-core.h           |  150 -
 drivers/media/video/s5p-jpeg/jpeg-hw.h             |  357 -
 drivers/media/video/s5p-jpeg/jpeg-regs.h           |  170 -
 drivers/media/video/s5p-mfc/Makefile               |    5 -
 drivers/media/video/s5p-mfc/regs-mfc.h             |  418 -
 drivers/media/video/s5p-mfc/s5p_mfc.c              | 1230 ---
 drivers/media/video/s5p-mfc/s5p_mfc_cmd.c          |  120 -
 drivers/media/video/s5p-mfc/s5p_mfc_cmd.h          |   30 -
 drivers/media/video/s5p-mfc/s5p_mfc_common.h       |  570 --
 drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c         |  343 -
 drivers/media/video/s5p-mfc/s5p_mfc_ctrl.h         |   29 -
 drivers/media/video/s5p-mfc/s5p_mfc_debug.h        |   48 -
 drivers/media/video/s5p-mfc/s5p_mfc_dec.c          | 1044 ---
 drivers/media/video/s5p-mfc/s5p_mfc_dec.h          |   23 -
 drivers/media/video/s5p-mfc/s5p_mfc_enc.c          | 1834 -----
 drivers/media/video/s5p-mfc/s5p_mfc_enc.h          |   23 -
 drivers/media/video/s5p-mfc/s5p_mfc_intr.c         |   92 -
 drivers/media/video/s5p-mfc/s5p_mfc_intr.h         |   26 -
 drivers/media/video/s5p-mfc/s5p_mfc_opr.c          | 1397 ----
 drivers/media/video/s5p-mfc/s5p_mfc_opr.h          |   93 -
 drivers/media/video/s5p-mfc/s5p_mfc_pm.c           |  137 -
 drivers/media/video/s5p-mfc/s5p_mfc_pm.h           |   24 -
 drivers/media/video/s5p-mfc/s5p_mfc_shm.c          |   47 -
 drivers/media/video/s5p-mfc/s5p_mfc_shm.h          |   90 -
 drivers/media/video/s5p-tv/Kconfig                 |   86 -
 drivers/media/video/s5p-tv/Makefile                |   19 -
 drivers/media/video/s5p-tv/hdmi_drv.c              | 1007 ---
 drivers/media/video/s5p-tv/hdmiphy_drv.c           |  329 -
 drivers/media/video/s5p-tv/mixer.h                 |  365 -
 drivers/media/video/s5p-tv/mixer_drv.c             |  487 --
 drivers/media/video/s5p-tv/mixer_grp_layer.c       |  270 -
 drivers/media/video/s5p-tv/mixer_reg.c             |  553 --
 drivers/media/video/s5p-tv/mixer_video.c           | 1125 ---
 drivers/media/video/s5p-tv/mixer_vp_layer.c        |  241 -
 drivers/media/video/s5p-tv/regs-hdmi.h             |  146 -
 drivers/media/video/s5p-tv/regs-mixer.h            |  122 -
 drivers/media/video/s5p-tv/regs-sdo.h              |   63 -
 drivers/media/video/s5p-tv/regs-vp.h               |   88 -
 drivers/media/video/s5p-tv/sdo_drv.c               |  452 --
 drivers/media/video/s5p-tv/sii9234_drv.c           |  422 -
 drivers/media/video/saa6588.c                      |  542 --
 drivers/media/video/saa7110.c                      |  494 --
 drivers/media/video/saa7115.c                      | 1727 -----
 drivers/media/video/saa711x_regs.h                 |  549 --
 drivers/media/video/saa7127.c                      |  852 ---
 drivers/media/video/saa7134/Kconfig                |   64 -
 drivers/media/video/saa7134/Makefile               |   16 -
 drivers/media/video/saa7134/saa6752hs.c            | 1012 ---
 drivers/media/video/saa7134/saa7134-alsa.c         | 1209 ---
 drivers/media/video/saa7134/saa7134-cards.c        | 8026 --------------------
 drivers/media/video/saa7134/saa7134-core.c         | 1368 ----
 drivers/media/video/saa7134/saa7134-dvb.c          | 1936 -----
 drivers/media/video/saa7134/saa7134-empress.c      |  590 --
 drivers/media/video/saa7134/saa7134-i2c.c          |  435 --
 drivers/media/video/saa7134/saa7134-input.c        | 1041 ---
 drivers/media/video/saa7134/saa7134-reg.h          |  378 -
 drivers/media/video/saa7134/saa7134-ts.c           |  327 -
 drivers/media/video/saa7134/saa7134-tvaudio.c      | 1087 ---
 drivers/media/video/saa7134/saa7134-vbi.c          |  255 -
 drivers/media/video/saa7134/saa7134-video.c        | 2661 -------
 drivers/media/video/saa7134/saa7134.h              |  855 ---
 drivers/media/video/saa7164/Kconfig                |   18 -
 drivers/media/video/saa7164/Makefile               |   12 -
 drivers/media/video/saa7164/saa7164-api.c          | 1524 ----
 drivers/media/video/saa7164/saa7164-buffer.c       |  322 -
 drivers/media/video/saa7164/saa7164-bus.c          |  475 --
 drivers/media/video/saa7164/saa7164-cards.c        |  773 --
 drivers/media/video/saa7164/saa7164-cmd.c          |  589 --
 drivers/media/video/saa7164/saa7164-core.c         | 1488 ----
 drivers/media/video/saa7164/saa7164-dvb.c          |  556 --
 drivers/media/video/saa7164/saa7164-encoder.c      | 1500 ----
 drivers/media/video/saa7164/saa7164-fw.c           |  613 --
 drivers/media/video/saa7164/saa7164-i2c.c          |  125 -
 drivers/media/video/saa7164/saa7164-reg.h          |  219 -
 drivers/media/video/saa7164/saa7164-types.h        |  442 --
 drivers/media/video/saa7164/saa7164-vbi.c          | 1374 ----
 drivers/media/video/saa7164/saa7164.h              |  616 --
 drivers/media/video/saa717x.c                      | 1378 ----
 drivers/media/video/saa7185.c                      |  377 -
 drivers/media/video/saa7191.c                      |  659 --
 drivers/media/video/saa7191.h                      |  245 -
 drivers/media/video/sh_mobile_ceu_camera.c         | 2331 ------
 drivers/media/video/sh_mobile_csi2.c               |  398 -
 drivers/media/video/sh_vou.c                       | 1510 ----
 drivers/media/video/smiapp-pll.c                   |  418 -
 drivers/media/video/smiapp-pll.h                   |  103 -
 drivers/media/video/smiapp/Kconfig                 |    7 -
 drivers/media/video/smiapp/Makefile                |    5 -
 drivers/media/video/smiapp/smiapp-core.c           | 2895 -------
 drivers/media/video/smiapp/smiapp-limits.c         |  132 -
 drivers/media/video/smiapp/smiapp-limits.h         |  128 -
 drivers/media/video/smiapp/smiapp-quirk.c          |  306 -
 drivers/media/video/smiapp/smiapp-quirk.h          |   83 -
 drivers/media/video/smiapp/smiapp-reg-defs.h       |  503 --
 drivers/media/video/smiapp/smiapp-reg.h            |  122 -
 drivers/media/video/smiapp/smiapp-regs.c           |  273 -
 drivers/media/video/smiapp/smiapp-regs.h           |   49 -
 drivers/media/video/smiapp/smiapp.h                |  252 -
 drivers/media/video/sn9c102/Kconfig                |   14 -
 drivers/media/video/sn9c102/Makefile               |   15 -
 drivers/media/video/sn9c102/sn9c102.h              |  211 -
 drivers/media/video/sn9c102/sn9c102_config.h       |   86 -
 drivers/media/video/sn9c102/sn9c102_core.c         | 3421 ---------
 drivers/media/video/sn9c102/sn9c102_devtable.h     |  147 -
 drivers/media/video/sn9c102/sn9c102_hv7131d.c      |  264 -
 drivers/media/video/sn9c102/sn9c102_hv7131r.c      |  363 -
 drivers/media/video/sn9c102/sn9c102_mi0343.c       |  352 -
 drivers/media/video/sn9c102/sn9c102_mi0360.c       |  453 --
 drivers/media/video/sn9c102/sn9c102_mt9v111.c      |  260 -
 drivers/media/video/sn9c102/sn9c102_ov7630.c       |  626 --
 drivers/media/video/sn9c102/sn9c102_ov7660.c       |  538 --
 drivers/media/video/sn9c102/sn9c102_pas106b.c      |  302 -
 drivers/media/video/sn9c102/sn9c102_pas202bcb.c    |  335 -
 drivers/media/video/sn9c102/sn9c102_sensor.h       |  307 -
 drivers/media/video/sn9c102/sn9c102_tas5110c1b.c   |  154 -
 drivers/media/video/sn9c102/sn9c102_tas5110d.c     |  119 -
 drivers/media/video/sn9c102/sn9c102_tas5130d1b.c   |  165 -
 drivers/media/video/soc_camera.c                   | 1554 ----
 drivers/media/video/soc_camera_platform.c          |  197 -
 drivers/media/video/soc_mediabus.c                 |  487 --
 drivers/media/video/sr030pc30.c                    |  871 ---
 drivers/media/video/sta2x11_vip.c                  | 1550 ----
 drivers/media/video/sta2x11_vip.h                  |   40 -
 drivers/media/video/stk-sensor.c                   |  595 --
 drivers/media/video/stk-webcam.c                   | 1380 ----
 drivers/media/video/stk-webcam.h                   |  134 -
 drivers/media/video/stk1160/Kconfig                |   20 -
 drivers/media/video/stk1160/Makefile               |   11 -
 drivers/media/video/stk1160/stk1160-ac97.c         |  153 -
 drivers/media/video/stk1160/stk1160-core.c         |  432 --
 drivers/media/video/stk1160/stk1160-i2c.c          |  294 -
 drivers/media/video/stk1160/stk1160-reg.h          |   93 -
 drivers/media/video/stk1160/stk1160-v4l.c          |  738 --
 drivers/media/video/stk1160/stk1160-video.c        |  518 --
 drivers/media/video/stk1160/stk1160.h              |  208 -
 drivers/media/video/tcm825x.c                      |  937 ---
 drivers/media/video/tcm825x.h                      |  200 -
 drivers/media/video/tda7432.c                      |  485 --
 drivers/media/video/tda9840.c                      |  224 -
 drivers/media/video/tea6415c.c                     |  187 -
 drivers/media/video/tea6415c.h                     |   27 -
 drivers/media/video/tea6420.c                      |  169 -
 drivers/media/video/tea6420.h                      |   24 -
 drivers/media/video/ths7303.c                      |  140 -
 drivers/media/video/timblogiw.c                    |  880 ---
 drivers/media/video/tlg2300/Kconfig                |   16 -
 drivers/media/video/tlg2300/Makefile               |    9 -
 drivers/media/video/tlg2300/pd-alsa.c              |  332 -
 drivers/media/video/tlg2300/pd-common.h            |  281 -
 drivers/media/video/tlg2300/pd-dvb.c               |  596 --
 drivers/media/video/tlg2300/pd-main.c              |  536 --
 drivers/media/video/tlg2300/pd-radio.c             |  421 -
 drivers/media/video/tlg2300/pd-video.c             | 1668 ----
 drivers/media/video/tlg2300/vendorcmds.h           |  243 -
 drivers/media/video/tlv320aic23b.c                 |  230 -
 drivers/media/video/tm6000/Kconfig                 |   33 -
 drivers/media/video/tm6000/Makefile                |   15 -
 drivers/media/video/tm6000/tm6000-alsa.c           |  528 --
 drivers/media/video/tm6000/tm6000-cards.c          | 1413 ----
 drivers/media/video/tm6000/tm6000-core.c           |  935 ---
 drivers/media/video/tm6000/tm6000-dvb.c            |  467 --
 drivers/media/video/tm6000/tm6000-i2c.c            |  334 -
 drivers/media/video/tm6000/tm6000-input.c          |  498 --
 drivers/media/video/tm6000/tm6000-regs.h           |  600 --
 drivers/media/video/tm6000/tm6000-stds.c           |  638 --
 drivers/media/video/tm6000/tm6000-usb-isoc.h       |   50 -
 drivers/media/video/tm6000/tm6000-video.c          | 1852 -----
 drivers/media/video/tm6000/tm6000.h                |  399 -
 drivers/media/video/tvaudio.c                      | 2118 ------
 drivers/media/video/tveeprom.c                     |  792 --
 drivers/media/video/tvp514x.c                      | 1166 ---
 drivers/media/video/tvp514x_regs.h                 |  287 -
 drivers/media/video/tvp5150.c                      | 1274 ----
 drivers/media/video/tvp5150_reg.h                  |  139 -
 drivers/media/video/tvp7002.c                      | 1145 ---
 drivers/media/video/tvp7002_reg.h                  |  150 -
 drivers/media/video/tw9910.c                       |  956 ---
 drivers/media/video/upd64031a.c                    |  274 -
 drivers/media/video/upd64083.c                     |  246 -
 drivers/media/video/usbvision/Kconfig              |   12 -
 drivers/media/video/usbvision/Makefile             |    6 -
 drivers/media/video/usbvision/usbvision-cards.c    | 1133 ---
 drivers/media/video/usbvision/usbvision-cards.h    |   69 -
 drivers/media/video/usbvision/usbvision-core.c     | 2518 ------
 drivers/media/video/usbvision/usbvision-i2c.c      |  456 --
 drivers/media/video/usbvision/usbvision-video.c    | 1720 -----
 drivers/media/video/usbvision/usbvision.h          |  535 --
 drivers/media/video/uvc/Kconfig                    |   19 -
 drivers/media/video/uvc/Makefile                   |    6 -
 drivers/media/video/uvc/uvc_ctrl.c                 | 2165 ------
 drivers/media/video/uvc/uvc_debugfs.c              |  136 -
 drivers/media/video/uvc/uvc_driver.c               | 2472 ------
 drivers/media/video/uvc/uvc_entity.c               |  126 -
 drivers/media/video/uvc/uvc_isight.c               |  137 -
 drivers/media/video/uvc/uvc_queue.c                |  359 -
 drivers/media/video/uvc/uvc_status.c               |  237 -
 drivers/media/video/uvc/uvc_v4l2.c                 | 1317 ----
 drivers/media/video/uvc/uvc_video.c                | 1879 -----
 drivers/media/video/uvc/uvcvideo.h                 |  718 --
 drivers/media/video/via-camera.c                   | 1514 ----
 drivers/media/video/via-camera.h                   |   93 -
 drivers/media/video/vino.c                         | 4349 -----------
 drivers/media/video/vino.h                         |  138 -
 drivers/media/video/vivi.c                         | 1409 ----
 drivers/media/video/vp27smpx.c                     |  211 -
 drivers/media/video/vpx3220.c                      |  591 --
 drivers/media/video/vs6624.c                       |  928 ---
 drivers/media/video/vs6624_regs.h                  |  337 -
 drivers/media/video/w9966.c                        |  981 ---
 drivers/media/video/wm8739.c                       |  294 -
 drivers/media/video/wm8775.c                       |  342 -
 drivers/media/video/zoran/Kconfig                  |   74 -
 drivers/media/video/zoran/Makefile                 |    6 -
 drivers/media/video/zoran/videocodec.c             |  407 -
 drivers/media/video/zoran/videocodec.h             |  353 -
 drivers/media/video/zoran/zoran.h                  |  403 -
 drivers/media/video/zoran/zoran_card.c             | 1524 ----
 drivers/media/video/zoran/zoran_card.h             |   54 -
 drivers/media/video/zoran/zoran_device.c           | 1640 ----
 drivers/media/video/zoran/zoran_device.h           |   95 -
 drivers/media/video/zoran/zoran_driver.c           | 3090 --------
 drivers/media/video/zoran/zoran_procfs.c           |  225 -
 drivers/media/video/zoran/zoran_procfs.h           |   36 -
 drivers/media/video/zoran/zr36016.c                |  524 --
 drivers/media/video/zoran/zr36016.h                |  111 -
 drivers/media/video/zoran/zr36050.c                |  900 ---
 drivers/media/video/zoran/zr36050.h                |  184 -
 drivers/media/video/zoran/zr36057.h                |  168 -
 drivers/media/video/zoran/zr36060.c                | 1010 ---
 drivers/media/video/zoran/zr36060.h                |  220 -
 drivers/media/video/zr364xx.c                      | 1643 ----
 1647 files changed, 513263 insertions(+), 513350 deletions(-)
 create mode 100644 drivers/media/i2c/Kconfig
 create mode 100644 drivers/media/i2c/Makefile
 create mode 100644 drivers/media/i2c/adp1653.c
 create mode 100644 drivers/media/i2c/adv7170.c
 create mode 100644 drivers/media/i2c/adv7175.c
 create mode 100644 drivers/media/i2c/adv7180.c
 create mode 100644 drivers/media/i2c/adv7183.c
 create mode 100644 drivers/media/i2c/adv7183_regs.h
 create mode 100644 drivers/media/i2c/adv7343.c
 create mode 100644 drivers/media/i2c/adv7343_regs.h
 create mode 100644 drivers/media/i2c/adv7393.c
 create mode 100644 drivers/media/i2c/adv7393_regs.h
 create mode 100644 drivers/media/i2c/ak881x.c
 create mode 100644 drivers/media/i2c/aptina-pll.c
 create mode 100644 drivers/media/i2c/aptina-pll.h
 create mode 100644 drivers/media/i2c/as3645a.c
 create mode 100644 drivers/media/i2c/bt819.c
 create mode 100644 drivers/media/i2c/bt856.c
 create mode 100644 drivers/media/i2c/bt866.c
 create mode 100644 drivers/media/i2c/btcx-risc.c
 create mode 100644 drivers/media/i2c/btcx-risc.h
 create mode 100644 drivers/media/i2c/cs5345.c
 create mode 100644 drivers/media/i2c/cs53l32a.c
 create mode 100644 drivers/media/i2c/cx2341x.c
 create mode 100644 drivers/media/i2c/cx25840/Kconfig
 create mode 100644 drivers/media/i2c/cx25840/Makefile
 create mode 100644 drivers/media/i2c/cx25840/cx25840-audio.c
 create mode 100644 drivers/media/i2c/cx25840/cx25840-core.c
 create mode 100644 drivers/media/i2c/cx25840/cx25840-core.h
 create mode 100644 drivers/media/i2c/cx25840/cx25840-firmware.c
 create mode 100644 drivers/media/i2c/cx25840/cx25840-ir.c
 create mode 100644 drivers/media/i2c/cx25840/cx25840-vbi.c
 create mode 100644 drivers/media/i2c/ir-kbd-i2c.c
 create mode 100644 drivers/media/i2c/ks0127.c
 create mode 100644 drivers/media/i2c/ks0127.h
 create mode 100644 drivers/media/i2c/m52790.c
 create mode 100644 drivers/media/i2c/m5mols/Kconfig
 create mode 100644 drivers/media/i2c/m5mols/Makefile
 create mode 100644 drivers/media/i2c/m5mols/m5mols.h
 create mode 100644 drivers/media/i2c/m5mols/m5mols_capture.c
 create mode 100644 drivers/media/i2c/m5mols/m5mols_controls.c
 create mode 100644 drivers/media/i2c/m5mols/m5mols_core.c
 create mode 100644 drivers/media/i2c/m5mols/m5mols_reg.h
 create mode 100644 drivers/media/i2c/msp3400-driver.c
 create mode 100644 drivers/media/i2c/msp3400-driver.h
 create mode 100644 drivers/media/i2c/msp3400-kthreads.c
 create mode 100644 drivers/media/i2c/mt9m032.c
 create mode 100644 drivers/media/i2c/mt9p031.c
 create mode 100644 drivers/media/i2c/mt9t001.c
 create mode 100644 drivers/media/i2c/mt9v011.c
 create mode 100644 drivers/media/i2c/mt9v032.c
 create mode 100644 drivers/media/i2c/noon010pc30.c
 create mode 100644 drivers/media/i2c/ov7670.c
 create mode 100644 drivers/media/i2c/s5k6aa.c
 create mode 100644 drivers/media/i2c/saa6588.c
 create mode 100644 drivers/media/i2c/saa7110.c
 create mode 100644 drivers/media/i2c/saa7115.c
 create mode 100644 drivers/media/i2c/saa711x_regs.h
 create mode 100644 drivers/media/i2c/saa7127.c
 create mode 100644 drivers/media/i2c/saa717x.c
 create mode 100644 drivers/media/i2c/saa7185.c
 create mode 100644 drivers/media/i2c/saa7191.c
 create mode 100644 drivers/media/i2c/saa7191.h
 create mode 100644 drivers/media/i2c/smiapp-pll.c
 create mode 100644 drivers/media/i2c/smiapp-pll.h
 create mode 100644 drivers/media/i2c/smiapp/Kconfig
 create mode 100644 drivers/media/i2c/smiapp/Makefile
 create mode 100644 drivers/media/i2c/smiapp/smiapp-core.c
 create mode 100644 drivers/media/i2c/smiapp/smiapp-limits.c
 create mode 100644 drivers/media/i2c/smiapp/smiapp-limits.h
 create mode 100644 drivers/media/i2c/smiapp/smiapp-quirk.c
 create mode 100644 drivers/media/i2c/smiapp/smiapp-quirk.h
 create mode 100644 drivers/media/i2c/smiapp/smiapp-reg-defs.h
 create mode 100644 drivers/media/i2c/smiapp/smiapp-reg.h
 create mode 100644 drivers/media/i2c/smiapp/smiapp-regs.c
 create mode 100644 drivers/media/i2c/smiapp/smiapp-regs.h
 create mode 100644 drivers/media/i2c/smiapp/smiapp.h
 create mode 100644 drivers/media/i2c/soc_camera/Kconfig
 create mode 100644 drivers/media/i2c/soc_camera/Makefile
 create mode 100644 drivers/media/i2c/soc_camera/imx074.c
 create mode 100644 drivers/media/i2c/soc_camera/mt9m001.c
 create mode 100644 drivers/media/i2c/soc_camera/mt9m111.c
 create mode 100644 drivers/media/i2c/soc_camera/mt9t031.c
 create mode 100644 drivers/media/i2c/soc_camera/mt9t112.c
 create mode 100644 drivers/media/i2c/soc_camera/mt9v022.c
 create mode 100644 drivers/media/i2c/soc_camera/ov2640.c
 create mode 100644 drivers/media/i2c/soc_camera/ov5642.c
 create mode 100644 drivers/media/i2c/soc_camera/ov6650.c
 create mode 100644 drivers/media/i2c/soc_camera/ov772x.c
 create mode 100644 drivers/media/i2c/soc_camera/ov9640.c
 create mode 100644 drivers/media/i2c/soc_camera/ov9640.h
 create mode 100644 drivers/media/i2c/soc_camera/ov9740.c
 create mode 100644 drivers/media/i2c/soc_camera/rj54n1cb0c.c
 create mode 100644 drivers/media/i2c/soc_camera/sh_mobile_csi2.c
 create mode 100644 drivers/media/i2c/soc_camera/tw9910.c
 create mode 100644 drivers/media/i2c/sr030pc30.c
 create mode 100644 drivers/media/i2c/tcm825x.c
 create mode 100644 drivers/media/i2c/tcm825x.h
 create mode 100644 drivers/media/i2c/tda7432.c
 create mode 100644 drivers/media/i2c/tda9840.c
 create mode 100644 drivers/media/i2c/tea6415c.c
 create mode 100644 drivers/media/i2c/tea6415c.h
 create mode 100644 drivers/media/i2c/tea6420.c
 create mode 100644 drivers/media/i2c/tea6420.h
 create mode 100644 drivers/media/i2c/ths7303.c
 create mode 100644 drivers/media/i2c/tlv320aic23b.c
 create mode 100644 drivers/media/i2c/tvaudio.c
 create mode 100644 drivers/media/i2c/tveeprom.c
 create mode 100644 drivers/media/i2c/tvp514x.c
 create mode 100644 drivers/media/i2c/tvp514x_regs.h
 create mode 100644 drivers/media/i2c/tvp5150.c
 create mode 100644 drivers/media/i2c/tvp5150_reg.h
 create mode 100644 drivers/media/i2c/tvp7002.c
 create mode 100644 drivers/media/i2c/tvp7002_reg.h
 create mode 100644 drivers/media/i2c/upd64031a.c
 create mode 100644 drivers/media/i2c/upd64083.c
 create mode 100644 drivers/media/i2c/vp27smpx.c
 create mode 100644 drivers/media/i2c/vpx3220.c
 create mode 100644 drivers/media/i2c/vs6624.c
 create mode 100644 drivers/media/i2c/vs6624_regs.h
 create mode 100644 drivers/media/i2c/wm8739.c
 create mode 100644 drivers/media/i2c/wm8775.c
 create mode 100644 drivers/media/parport/Kconfig
 create mode 100644 drivers/media/parport/Makefile
 create mode 100644 drivers/media/parport/bw-qcam.c
 create mode 100644 drivers/media/parport/c-qcam.c
 create mode 100644 drivers/media/parport/pms.c
 create mode 100644 drivers/media/parport/w9966.c
 create mode 100644 drivers/media/pci/bt8xx/bt848.h
 create mode 100644 drivers/media/pci/bt8xx/bttv-audio-hook.c
 create mode 100644 drivers/media/pci/bt8xx/bttv-audio-hook.h
 create mode 100644 drivers/media/pci/bt8xx/bttv-cards.c
 create mode 100644 drivers/media/pci/bt8xx/bttv-driver.c
 create mode 100644 drivers/media/pci/bt8xx/bttv-gpio.c
 create mode 100644 drivers/media/pci/bt8xx/bttv-i2c.c
 create mode 100644 drivers/media/pci/bt8xx/bttv-if.c
 create mode 100644 drivers/media/pci/bt8xx/bttv-input.c
 create mode 100644 drivers/media/pci/bt8xx/bttv-risc.c
 create mode 100644 drivers/media/pci/bt8xx/bttv-vbi.c
 create mode 100644 drivers/media/pci/bt8xx/bttv.h
 create mode 100644 drivers/media/pci/bt8xx/bttvp.h
 create mode 100644 drivers/media/pci/cx18/Kconfig
 create mode 100644 drivers/media/pci/cx18/Makefile
 create mode 100644 drivers/media/pci/cx18/cx18-alsa-main.c
 create mode 100644 drivers/media/pci/cx18/cx18-alsa-mixer.c
 create mode 100644 drivers/media/pci/cx18/cx18-alsa-mixer.h
 create mode 100644 drivers/media/pci/cx18/cx18-alsa-pcm.c
 create mode 100644 drivers/media/pci/cx18/cx18-alsa-pcm.h
 create mode 100644 drivers/media/pci/cx18/cx18-alsa.h
 create mode 100644 drivers/media/pci/cx18/cx18-audio.c
 create mode 100644 drivers/media/pci/cx18/cx18-audio.h
 create mode 100644 drivers/media/pci/cx18/cx18-av-audio.c
 create mode 100644 drivers/media/pci/cx18/cx18-av-core.c
 create mode 100644 drivers/media/pci/cx18/cx18-av-core.h
 create mode 100644 drivers/media/pci/cx18/cx18-av-firmware.c
 create mode 100644 drivers/media/pci/cx18/cx18-av-vbi.c
 create mode 100644 drivers/media/pci/cx18/cx18-cards.c
 create mode 100644 drivers/media/pci/cx18/cx18-cards.h
 create mode 100644 drivers/media/pci/cx18/cx18-controls.c
 create mode 100644 drivers/media/pci/cx18/cx18-controls.h
 create mode 100644 drivers/media/pci/cx18/cx18-driver.c
 create mode 100644 drivers/media/pci/cx18/cx18-driver.h
 create mode 100644 drivers/media/pci/cx18/cx18-dvb.c
 create mode 100644 drivers/media/pci/cx18/cx18-dvb.h
 create mode 100644 drivers/media/pci/cx18/cx18-fileops.c
 create mode 100644 drivers/media/pci/cx18/cx18-fileops.h
 create mode 100644 drivers/media/pci/cx18/cx18-firmware.c
 create mode 100644 drivers/media/pci/cx18/cx18-firmware.h
 create mode 100644 drivers/media/pci/cx18/cx18-gpio.c
 create mode 100644 drivers/media/pci/cx18/cx18-gpio.h
 create mode 100644 drivers/media/pci/cx18/cx18-i2c.c
 create mode 100644 drivers/media/pci/cx18/cx18-i2c.h
 create mode 100644 drivers/media/pci/cx18/cx18-io.c
 create mode 100644 drivers/media/pci/cx18/cx18-io.h
 create mode 100644 drivers/media/pci/cx18/cx18-ioctl.c
 create mode 100644 drivers/media/pci/cx18/cx18-ioctl.h
 create mode 100644 drivers/media/pci/cx18/cx18-irq.c
 create mode 100644 drivers/media/pci/cx18/cx18-irq.h
 create mode 100644 drivers/media/pci/cx18/cx18-mailbox.c
 create mode 100644 drivers/media/pci/cx18/cx18-mailbox.h
 create mode 100644 drivers/media/pci/cx18/cx18-queue.c
 create mode 100644 drivers/media/pci/cx18/cx18-queue.h
 create mode 100644 drivers/media/pci/cx18/cx18-scb.c
 create mode 100644 drivers/media/pci/cx18/cx18-scb.h
 create mode 100644 drivers/media/pci/cx18/cx18-streams.c
 create mode 100644 drivers/media/pci/cx18/cx18-streams.h
 create mode 100644 drivers/media/pci/cx18/cx18-vbi.c
 create mode 100644 drivers/media/pci/cx18/cx18-vbi.h
 create mode 100644 drivers/media/pci/cx18/cx18-version.h
 create mode 100644 drivers/media/pci/cx18/cx18-video.c
 create mode 100644 drivers/media/pci/cx18/cx18-video.h
 create mode 100644 drivers/media/pci/cx18/cx23418.h
 create mode 100644 drivers/media/pci/cx23885/Kconfig
 create mode 100644 drivers/media/pci/cx23885/Makefile
 create mode 100644 drivers/media/pci/cx23885/altera-ci.c
 create mode 100644 drivers/media/pci/cx23885/altera-ci.h
 create mode 100644 drivers/media/pci/cx23885/cimax2.c
 create mode 100644 drivers/media/pci/cx23885/cimax2.h
 create mode 100644 drivers/media/pci/cx23885/cx23885-417.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-alsa.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-av.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-av.h
 create mode 100644 drivers/media/pci/cx23885/cx23885-cards.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-core.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-dvb.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-f300.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-f300.h
 create mode 100644 drivers/media/pci/cx23885/cx23885-i2c.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-input.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-input.h
 create mode 100644 drivers/media/pci/cx23885/cx23885-ioctl.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-ioctl.h
 create mode 100644 drivers/media/pci/cx23885/cx23885-ir.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-ir.h
 create mode 100644 drivers/media/pci/cx23885/cx23885-reg.h
 create mode 100644 drivers/media/pci/cx23885/cx23885-vbi.c
 create mode 100644 drivers/media/pci/cx23885/cx23885-video.c
 create mode 100644 drivers/media/pci/cx23885/cx23885.h
 create mode 100644 drivers/media/pci/cx23885/cx23888-ir.c
 create mode 100644 drivers/media/pci/cx23885/cx23888-ir.h
 create mode 100644 drivers/media/pci/cx23885/netup-eeprom.c
 create mode 100644 drivers/media/pci/cx23885/netup-eeprom.h
 create mode 100644 drivers/media/pci/cx23885/netup-init.c
 create mode 100644 drivers/media/pci/cx23885/netup-init.h
 create mode 100644 drivers/media/pci/cx25821/Kconfig
 create mode 100644 drivers/media/pci/cx25821/Makefile
 create mode 100644 drivers/media/pci/cx25821/cx25821-alsa.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-audio-upstream.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-audio-upstream.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-audio.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-biffuncs.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-cards.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-core.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-gpio.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-i2c.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-medusa-defines.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-medusa-reg.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-medusa-video.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-medusa-video.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-reg.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-sram.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-video-upstream-ch2.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-video-upstream.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-video-upstream.h
 create mode 100644 drivers/media/pci/cx25821/cx25821-video.c
 create mode 100644 drivers/media/pci/cx25821/cx25821-video.h
 create mode 100644 drivers/media/pci/cx25821/cx25821.h
 create mode 100644 drivers/media/pci/cx88/Kconfig
 create mode 100644 drivers/media/pci/cx88/Makefile
 create mode 100644 drivers/media/pci/cx88/cx88-alsa.c
 create mode 100644 drivers/media/pci/cx88/cx88-blackbird.c
 create mode 100644 drivers/media/pci/cx88/cx88-cards.c
 create mode 100644 drivers/media/pci/cx88/cx88-core.c
 create mode 100644 drivers/media/pci/cx88/cx88-dsp.c
 create mode 100644 drivers/media/pci/cx88/cx88-dvb.c
 create mode 100644 drivers/media/pci/cx88/cx88-i2c.c
 create mode 100644 drivers/media/pci/cx88/cx88-input.c
 create mode 100644 drivers/media/pci/cx88/cx88-mpeg.c
 create mode 100644 drivers/media/pci/cx88/cx88-reg.h
 create mode 100644 drivers/media/pci/cx88/cx88-tvaudio.c
 create mode 100644 drivers/media/pci/cx88/cx88-vbi.c
 create mode 100644 drivers/media/pci/cx88/cx88-video.c
 create mode 100644 drivers/media/pci/cx88/cx88-vp3054-i2c.c
 create mode 100644 drivers/media/pci/cx88/cx88-vp3054-i2c.h
 create mode 100644 drivers/media/pci/cx88/cx88.h
 create mode 100644 drivers/media/pci/ivtv/Kconfig
 create mode 100644 drivers/media/pci/ivtv/Makefile
 create mode 100644 drivers/media/pci/ivtv/ivtv-cards.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-cards.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-controls.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-controls.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-driver.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-driver.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-fileops.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-fileops.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-firmware.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-firmware.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-gpio.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-gpio.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-i2c.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-i2c.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-ioctl.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-ioctl.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-irq.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-irq.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-mailbox.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-mailbox.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-queue.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-queue.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-routing.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-routing.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-streams.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-streams.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-udma.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-udma.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-vbi.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-vbi.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-version.h
 create mode 100644 drivers/media/pci/ivtv/ivtv-yuv.c
 create mode 100644 drivers/media/pci/ivtv/ivtv-yuv.h
 create mode 100644 drivers/media/pci/ivtv/ivtvfb.c
 create mode 100644 drivers/media/pci/meye/Kconfig
 create mode 100644 drivers/media/pci/meye/Makefile
 create mode 100644 drivers/media/pci/meye/meye.c
 create mode 100644 drivers/media/pci/meye/meye.h
 create mode 100644 drivers/media/pci/saa7134/Kconfig
 create mode 100644 drivers/media/pci/saa7134/Makefile
 create mode 100644 drivers/media/pci/saa7134/saa6752hs.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-alsa.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-cards.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-core.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-dvb.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-empress.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-i2c.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-input.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-reg.h
 create mode 100644 drivers/media/pci/saa7134/saa7134-ts.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-tvaudio.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-vbi.c
 create mode 100644 drivers/media/pci/saa7134/saa7134-video.c
 create mode 100644 drivers/media/pci/saa7134/saa7134.h
 create mode 100644 drivers/media/pci/saa7146/Kconfig
 create mode 100644 drivers/media/pci/saa7146/Makefile
 create mode 100644 drivers/media/pci/saa7146/hexium_gemini.c
 create mode 100644 drivers/media/pci/saa7146/hexium_orion.c
 create mode 100644 drivers/media/pci/saa7146/mxb.c
 create mode 100644 drivers/media/pci/saa7164/Kconfig
 create mode 100644 drivers/media/pci/saa7164/Makefile
 create mode 100644 drivers/media/pci/saa7164/saa7164-api.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-buffer.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-bus.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-cards.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-cmd.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-core.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-dvb.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-encoder.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-fw.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-i2c.c
 create mode 100644 drivers/media/pci/saa7164/saa7164-reg.h
 create mode 100644 drivers/media/pci/saa7164/saa7164-types.h
 create mode 100644 drivers/media/pci/saa7164/saa7164-vbi.c
 create mode 100644 drivers/media/pci/saa7164/saa7164.h
 create mode 100644 drivers/media/pci/sta2x11/Kconfig
 create mode 100644 drivers/media/pci/sta2x11/Makefile
 create mode 100644 drivers/media/pci/sta2x11/sta2x11_vip.c
 create mode 100644 drivers/media/pci/sta2x11/sta2x11_vip.h
 create mode 100644 drivers/media/pci/zoran/Kconfig
 create mode 100644 drivers/media/pci/zoran/Makefile
 create mode 100644 drivers/media/pci/zoran/videocodec.c
 create mode 100644 drivers/media/pci/zoran/videocodec.h
 create mode 100644 drivers/media/pci/zoran/zoran.h
 create mode 100644 drivers/media/pci/zoran/zoran_card.c
 create mode 100644 drivers/media/pci/zoran/zoran_card.h
 create mode 100644 drivers/media/pci/zoran/zoran_device.c
 create mode 100644 drivers/media/pci/zoran/zoran_device.h
 create mode 100644 drivers/media/pci/zoran/zoran_driver.c
 create mode 100644 drivers/media/pci/zoran/zoran_procfs.c
 create mode 100644 drivers/media/pci/zoran/zoran_procfs.h
 create mode 100644 drivers/media/pci/zoran/zr36016.c
 create mode 100644 drivers/media/pci/zoran/zr36016.h
 create mode 100644 drivers/media/pci/zoran/zr36050.c
 create mode 100644 drivers/media/pci/zoran/zr36050.h
 create mode 100644 drivers/media/pci/zoran/zr36057.h
 create mode 100644 drivers/media/pci/zoran/zr36060.c
 create mode 100644 drivers/media/pci/zoran/zr36060.h
 create mode 100644 drivers/media/platform/Kconfig
 create mode 100644 drivers/media/platform/Makefile
 create mode 100644 drivers/media/platform/arv.c
 create mode 100644 drivers/media/platform/atmel-isi.c
 create mode 100644 drivers/media/platform/blackfin/Kconfig
 create mode 100644 drivers/media/platform/blackfin/Makefile
 create mode 100644 drivers/media/platform/blackfin/bfin_capture.c
 create mode 100644 drivers/media/platform/blackfin/ppi.c
 create mode 100644 drivers/media/platform/coda.c
 create mode 100644 drivers/media/platform/coda.h
 create mode 100644 drivers/media/platform/davinci/Kconfig
 create mode 100644 drivers/media/platform/davinci/Makefile
 create mode 100644 drivers/media/platform/davinci/ccdc_hw_device.h
 create mode 100644 drivers/media/platform/davinci/dm355_ccdc.c
 create mode 100644 drivers/media/platform/davinci/dm355_ccdc_regs.h
 create mode 100644 drivers/media/platform/davinci/dm644x_ccdc.c
 create mode 100644 drivers/media/platform/davinci/dm644x_ccdc_regs.h
 create mode 100644 drivers/media/platform/davinci/isif.c
 create mode 100644 drivers/media/platform/davinci/isif_regs.h
 create mode 100644 drivers/media/platform/davinci/vpbe.c
 create mode 100644 drivers/media/platform/davinci/vpbe_display.c
 create mode 100644 drivers/media/platform/davinci/vpbe_osd.c
 create mode 100644 drivers/media/platform/davinci/vpbe_osd_regs.h
 create mode 100644 drivers/media/platform/davinci/vpbe_venc.c
 create mode 100644 drivers/media/platform/davinci/vpbe_venc_regs.h
 create mode 100644 drivers/media/platform/davinci/vpfe_capture.c
 create mode 100644 drivers/media/platform/davinci/vpif.c
 create mode 100644 drivers/media/platform/davinci/vpif.h
 create mode 100644 drivers/media/platform/davinci/vpif_capture.c
 create mode 100644 drivers/media/platform/davinci/vpif_capture.h
 create mode 100644 drivers/media/platform/davinci/vpif_display.c
 create mode 100644 drivers/media/platform/davinci/vpif_display.h
 create mode 100644 drivers/media/platform/davinci/vpss.c
 create mode 100644 drivers/media/platform/fsl-viu.c
 create mode 100644 drivers/media/platform/indycam.c
 create mode 100644 drivers/media/platform/indycam.h
 create mode 100644 drivers/media/platform/m2m-deinterlace.c
 create mode 100644 drivers/media/platform/marvell-ccic/Kconfig
 create mode 100644 drivers/media/platform/marvell-ccic/Makefile
 create mode 100644 drivers/media/platform/marvell-ccic/cafe-driver.c
 create mode 100644 drivers/media/platform/marvell-ccic/mcam-core.c
 create mode 100644 drivers/media/platform/marvell-ccic/mcam-core.h
 create mode 100644 drivers/media/platform/marvell-ccic/mmp-driver.c
 create mode 100644 drivers/media/platform/mem2mem_testdev.c
 create mode 100644 drivers/media/platform/mx1_camera.c
 create mode 100644 drivers/media/platform/mx2_camera.c
 create mode 100644 drivers/media/platform/mx2_emmaprp.c
 create mode 100644 drivers/media/platform/mx3_camera.c
 create mode 100644 drivers/media/platform/omap/Kconfig
 create mode 100644 drivers/media/platform/omap/Makefile
 create mode 100644 drivers/media/platform/omap/omap_vout.c
 create mode 100644 drivers/media/platform/omap/omap_vout_vrfb.c
 create mode 100644 drivers/media/platform/omap/omap_vout_vrfb.h
 create mode 100644 drivers/media/platform/omap/omap_voutdef.h
 create mode 100644 drivers/media/platform/omap/omap_voutlib.c
 create mode 100644 drivers/media/platform/omap/omap_voutlib.h
 create mode 100644 drivers/media/platform/omap1_camera.c
 create mode 100644 drivers/media/platform/omap24xxcam-dma.c
 create mode 100644 drivers/media/platform/omap24xxcam.c
 create mode 100644 drivers/media/platform/omap24xxcam.h
 create mode 100644 drivers/media/platform/omap3isp/Makefile
 create mode 100644 drivers/media/platform/omap3isp/cfa_coef_table.h
 create mode 100644 drivers/media/platform/omap3isp/gamma_table.h
 create mode 100644 drivers/media/platform/omap3isp/isp.c
 create mode 100644 drivers/media/platform/omap3isp/isp.h
 create mode 100644 drivers/media/platform/omap3isp/ispccdc.c
 create mode 100644 drivers/media/platform/omap3isp/ispccdc.h
 create mode 100644 drivers/media/platform/omap3isp/ispccp2.c
 create mode 100644 drivers/media/platform/omap3isp/ispccp2.h
 create mode 100644 drivers/media/platform/omap3isp/ispcsi2.c
 create mode 100644 drivers/media/platform/omap3isp/ispcsi2.h
 create mode 100644 drivers/media/platform/omap3isp/ispcsiphy.c
 create mode 100644 drivers/media/platform/omap3isp/ispcsiphy.h
 create mode 100644 drivers/media/platform/omap3isp/isph3a.h
 create mode 100644 drivers/media/platform/omap3isp/isph3a_aewb.c
 create mode 100644 drivers/media/platform/omap3isp/isph3a_af.c
 create mode 100644 drivers/media/platform/omap3isp/isphist.c
 create mode 100644 drivers/media/platform/omap3isp/isphist.h
 create mode 100644 drivers/media/platform/omap3isp/isppreview.c
 create mode 100644 drivers/media/platform/omap3isp/isppreview.h
 create mode 100644 drivers/media/platform/omap3isp/ispqueue.c
 create mode 100644 drivers/media/platform/omap3isp/ispqueue.h
 create mode 100644 drivers/media/platform/omap3isp/ispreg.h
 create mode 100644 drivers/media/platform/omap3isp/ispresizer.c
 create mode 100644 drivers/media/platform/omap3isp/ispresizer.h
 create mode 100644 drivers/media/platform/omap3isp/ispstat.c
 create mode 100644 drivers/media/platform/omap3isp/ispstat.h
 create mode 100644 drivers/media/platform/omap3isp/ispvideo.c
 create mode 100644 drivers/media/platform/omap3isp/ispvideo.h
 create mode 100644 drivers/media/platform/omap3isp/luma_enhance_table.h
 create mode 100644 drivers/media/platform/omap3isp/noise_filter_table.h
 create mode 100644 drivers/media/platform/pxa_camera.c
 create mode 100644 drivers/media/platform/s5p-fimc/Kconfig
 create mode 100644 drivers/media/platform/s5p-fimc/Makefile
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-capture.c
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-core.c
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-core.h
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-lite-reg.c
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-lite-reg.h
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-lite.c
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-lite.h
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-m2m.c
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-mdevice.c
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-mdevice.h
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-reg.c
 create mode 100644 drivers/media/platform/s5p-fimc/fimc-reg.h
 create mode 100644 drivers/media/platform/s5p-fimc/mipi-csis.c
 create mode 100644 drivers/media/platform/s5p-fimc/mipi-csis.h
 create mode 100644 drivers/media/platform/s5p-g2d/Makefile
 create mode 100644 drivers/media/platform/s5p-g2d/g2d-hw.c
 create mode 100644 drivers/media/platform/s5p-g2d/g2d-regs.h
 create mode 100644 drivers/media/platform/s5p-g2d/g2d.c
 create mode 100644 drivers/media/platform/s5p-g2d/g2d.h
 create mode 100644 drivers/media/platform/s5p-jpeg/Makefile
 create mode 100644 drivers/media/platform/s5p-jpeg/jpeg-core.c
 create mode 100644 drivers/media/platform/s5p-jpeg/jpeg-core.h
 create mode 100644 drivers/media/platform/s5p-jpeg/jpeg-hw.h
 create mode 100644 drivers/media/platform/s5p-jpeg/jpeg-regs.h
 create mode 100644 drivers/media/platform/s5p-mfc/Makefile
 create mode 100644 drivers/media/platform/s5p-mfc/regs-mfc.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc.c
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_cmd.c
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_cmd.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_common.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_debug.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_dec.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_enc.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_intr.c
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_intr.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_opr.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_pm.h
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_shm.c
 create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_shm.h
 create mode 100644 drivers/media/platform/s5p-tv/Kconfig
 create mode 100644 drivers/media/platform/s5p-tv/Makefile
 create mode 100644 drivers/media/platform/s5p-tv/hdmi_drv.c
 create mode 100644 drivers/media/platform/s5p-tv/hdmiphy_drv.c
 create mode 100644 drivers/media/platform/s5p-tv/mixer.h
 create mode 100644 drivers/media/platform/s5p-tv/mixer_drv.c
 create mode 100644 drivers/media/platform/s5p-tv/mixer_grp_layer.c
 create mode 100644 drivers/media/platform/s5p-tv/mixer_reg.c
 create mode 100644 drivers/media/platform/s5p-tv/mixer_video.c
 create mode 100644 drivers/media/platform/s5p-tv/mixer_vp_layer.c
 create mode 100644 drivers/media/platform/s5p-tv/regs-hdmi.h
 create mode 100644 drivers/media/platform/s5p-tv/regs-mixer.h
 create mode 100644 drivers/media/platform/s5p-tv/regs-sdo.h
 create mode 100644 drivers/media/platform/s5p-tv/regs-vp.h
 create mode 100644 drivers/media/platform/s5p-tv/sdo_drv.c
 create mode 100644 drivers/media/platform/s5p-tv/sii9234_drv.c
 create mode 100644 drivers/media/platform/sh_mobile_ceu_camera.c
 create mode 100644 drivers/media/platform/sh_vou.c
 create mode 100644 drivers/media/platform/soc_camera.c
 create mode 100644 drivers/media/platform/soc_camera_platform.c
 create mode 100644 drivers/media/platform/soc_mediabus.c
 create mode 100644 drivers/media/platform/timblogiw.c
 create mode 100644 drivers/media/platform/via-camera.c
 create mode 100644 drivers/media/platform/via-camera.h
 create mode 100644 drivers/media/platform/vino.c
 create mode 100644 drivers/media/platform/vino.h
 create mode 100644 drivers/media/platform/vivi.c
 create mode 100644 drivers/media/usb/au0828/Kconfig
 create mode 100644 drivers/media/usb/au0828/Makefile
 create mode 100644 drivers/media/usb/au0828/au0828-cards.c
 create mode 100644 drivers/media/usb/au0828/au0828-cards.h
 create mode 100644 drivers/media/usb/au0828/au0828-core.c
 create mode 100644 drivers/media/usb/au0828/au0828-dvb.c
 create mode 100644 drivers/media/usb/au0828/au0828-i2c.c
 create mode 100644 drivers/media/usb/au0828/au0828-reg.h
 create mode 100644 drivers/media/usb/au0828/au0828-vbi.c
 create mode 100644 drivers/media/usb/au0828/au0828-video.c
 create mode 100644 drivers/media/usb/au0828/au0828.h
 create mode 100644 drivers/media/usb/cpia2/Kconfig
 create mode 100644 drivers/media/usb/cpia2/Makefile
 create mode 100644 drivers/media/usb/cpia2/cpia2.h
 create mode 100644 drivers/media/usb/cpia2/cpia2_core.c
 create mode 100644 drivers/media/usb/cpia2/cpia2_registers.h
 create mode 100644 drivers/media/usb/cpia2/cpia2_usb.c
 create mode 100644 drivers/media/usb/cpia2/cpia2_v4l.c
 create mode 100644 drivers/media/usb/cx231xx/Kconfig
 create mode 100644 drivers/media/usb/cx231xx/Makefile
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-417.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-audio.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-avcore.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-cards.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-conf-reg.h
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-core.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-dif.h
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-dvb.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-i2c.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-input.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-pcb-cfg.h
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-reg.h
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-vbi.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-vbi.h
 create mode 100644 drivers/media/usb/cx231xx/cx231xx-video.c
 create mode 100644 drivers/media/usb/cx231xx/cx231xx.h
 create mode 100644 drivers/media/usb/em28xx/Kconfig
 create mode 100644 drivers/media/usb/em28xx/Makefile
 create mode 100644 drivers/media/usb/em28xx/em28xx-audio.c
 create mode 100644 drivers/media/usb/em28xx/em28xx-cards.c
 create mode 100644 drivers/media/usb/em28xx/em28xx-core.c
 create mode 100644 drivers/media/usb/em28xx/em28xx-dvb.c
 create mode 100644 drivers/media/usb/em28xx/em28xx-i2c.c
 create mode 100644 drivers/media/usb/em28xx/em28xx-input.c
 create mode 100644 drivers/media/usb/em28xx/em28xx-reg.h
 create mode 100644 drivers/media/usb/em28xx/em28xx-vbi.c
 create mode 100644 drivers/media/usb/em28xx/em28xx-video.c
 create mode 100644 drivers/media/usb/em28xx/em28xx.h
 create mode 100644 drivers/media/usb/gspca/Kconfig
 create mode 100644 drivers/media/usb/gspca/Makefile
 create mode 100644 drivers/media/usb/gspca/autogain_functions.c
 create mode 100644 drivers/media/usb/gspca/autogain_functions.h
 create mode 100644 drivers/media/usb/gspca/benq.c
 create mode 100644 drivers/media/usb/gspca/conex.c
 create mode 100644 drivers/media/usb/gspca/cpia1.c
 create mode 100644 drivers/media/usb/gspca/etoms.c
 create mode 100644 drivers/media/usb/gspca/finepix.c
 create mode 100644 drivers/media/usb/gspca/gl860/Kconfig
 create mode 100644 drivers/media/usb/gspca/gl860/Makefile
 create mode 100644 drivers/media/usb/gspca/gl860/gl860-mi1320.c
 create mode 100644 drivers/media/usb/gspca/gl860/gl860-mi2020.c
 create mode 100644 drivers/media/usb/gspca/gl860/gl860-ov2640.c
 create mode 100644 drivers/media/usb/gspca/gl860/gl860-ov9655.c
 create mode 100644 drivers/media/usb/gspca/gl860/gl860.c
 create mode 100644 drivers/media/usb/gspca/gl860/gl860.h
 create mode 100644 drivers/media/usb/gspca/gspca.c
 create mode 100644 drivers/media/usb/gspca/gspca.h
 create mode 100644 drivers/media/usb/gspca/jeilinj.c
 create mode 100644 drivers/media/usb/gspca/jl2005bcd.c
 create mode 100644 drivers/media/usb/gspca/jpeg.h
 create mode 100644 drivers/media/usb/gspca/kinect.c
 create mode 100644 drivers/media/usb/gspca/konica.c
 create mode 100644 drivers/media/usb/gspca/m5602/Kconfig
 create mode 100644 drivers/media/usb/gspca/m5602/Makefile
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_bridge.h
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_core.c
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_mt9m111.c
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_mt9m111.h
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_ov7660.c
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_ov7660.h
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_ov9650.c
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_ov9650.h
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_po1030.c
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_po1030.h
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_s5k83a.c
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_s5k83a.h
 create mode 100644 drivers/media/usb/gspca/m5602/m5602_sensor.h
 create mode 100644 drivers/media/usb/gspca/mars.c
 create mode 100644 drivers/media/usb/gspca/mr97310a.c
 create mode 100644 drivers/media/usb/gspca/nw80x.c
 create mode 100644 drivers/media/usb/gspca/ov519.c
 create mode 100644 drivers/media/usb/gspca/ov534.c
 create mode 100644 drivers/media/usb/gspca/ov534_9.c
 create mode 100644 drivers/media/usb/gspca/pac207.c
 create mode 100644 drivers/media/usb/gspca/pac7302.c
 create mode 100644 drivers/media/usb/gspca/pac7311.c
 create mode 100644 drivers/media/usb/gspca/pac_common.h
 create mode 100644 drivers/media/usb/gspca/se401.c
 create mode 100644 drivers/media/usb/gspca/se401.h
 create mode 100644 drivers/media/usb/gspca/sn9c2028.c
 create mode 100644 drivers/media/usb/gspca/sn9c2028.h
 create mode 100644 drivers/media/usb/gspca/sn9c20x.c
 create mode 100644 drivers/media/usb/gspca/sonixb.c
 create mode 100644 drivers/media/usb/gspca/sonixj.c
 create mode 100644 drivers/media/usb/gspca/spca1528.c
 create mode 100644 drivers/media/usb/gspca/spca500.c
 create mode 100644 drivers/media/usb/gspca/spca501.c
 create mode 100644 drivers/media/usb/gspca/spca505.c
 create mode 100644 drivers/media/usb/gspca/spca506.c
 create mode 100644 drivers/media/usb/gspca/spca508.c
 create mode 100644 drivers/media/usb/gspca/spca561.c
 create mode 100644 drivers/media/usb/gspca/sq905.c
 create mode 100644 drivers/media/usb/gspca/sq905c.c
 create mode 100644 drivers/media/usb/gspca/sq930x.c
 create mode 100644 drivers/media/usb/gspca/stk014.c
 create mode 100644 drivers/media/usb/gspca/stv0680.c
 create mode 100644 drivers/media/usb/gspca/stv06xx/Kconfig
 create mode 100644 drivers/media/usb/gspca/stv06xx/Makefile
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx.c
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx.h
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
 create mode 100644 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h
 create mode 100644 drivers/media/usb/gspca/sunplus.c
 create mode 100644 drivers/media/usb/gspca/t613.c
 create mode 100644 drivers/media/usb/gspca/topro.c
 create mode 100644 drivers/media/usb/gspca/tv8532.c
 create mode 100644 drivers/media/usb/gspca/vc032x.c
 create mode 100644 drivers/media/usb/gspca/vicam.c
 create mode 100644 drivers/media/usb/gspca/w996Xcf.c
 create mode 100644 drivers/media/usb/gspca/xirlink_cit.c
 create mode 100644 drivers/media/usb/gspca/zc3xx-reg.h
 create mode 100644 drivers/media/usb/gspca/zc3xx.c
 create mode 100644 drivers/media/usb/hdpvr/Kconfig
 create mode 100644 drivers/media/usb/hdpvr/Makefile
 create mode 100644 drivers/media/usb/hdpvr/hdpvr-control.c
 create mode 100644 drivers/media/usb/hdpvr/hdpvr-core.c
 create mode 100644 drivers/media/usb/hdpvr/hdpvr-i2c.c
 create mode 100644 drivers/media/usb/hdpvr/hdpvr-video.c
 create mode 100644 drivers/media/usb/hdpvr/hdpvr.h
 create mode 100644 drivers/media/usb/pvrusb2/Kconfig
 create mode 100644 drivers/media/usb/pvrusb2/Makefile
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-audio.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-audio.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-context.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-context.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-ctrl.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-ctrl.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-debug.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-debugifc.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-debugifc.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-devattr.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-devattr.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-dvb.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-dvb.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-eeprom.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-eeprom.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-encoder.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-encoder.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-hdw.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-hdw.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-io.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-io.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-ioread.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-ioread.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-main.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-std.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-std.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-sysfs.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-util.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-v4l2.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-wm8775.c
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2-wm8775.h
 create mode 100644 drivers/media/usb/pvrusb2/pvrusb2.h
 create mode 100644 drivers/media/usb/pwc/Kconfig
 create mode 100644 drivers/media/usb/pwc/Makefile
 create mode 100644 drivers/media/usb/pwc/philips.txt
 create mode 100644 drivers/media/usb/pwc/pwc-ctrl.c
 create mode 100644 drivers/media/usb/pwc/pwc-dec1.c
 create mode 100644 drivers/media/usb/pwc/pwc-dec1.h
 create mode 100644 drivers/media/usb/pwc/pwc-dec23.c
 create mode 100644 drivers/media/usb/pwc/pwc-dec23.h
 create mode 100644 drivers/media/usb/pwc/pwc-if.c
 create mode 100644 drivers/media/usb/pwc/pwc-kiara.c
 create mode 100644 drivers/media/usb/pwc/pwc-kiara.h
 create mode 100644 drivers/media/usb/pwc/pwc-misc.c
 create mode 100644 drivers/media/usb/pwc/pwc-nala.h
 create mode 100644 drivers/media/usb/pwc/pwc-timon.c
 create mode 100644 drivers/media/usb/pwc/pwc-timon.h
 create mode 100644 drivers/media/usb/pwc/pwc-uncompress.c
 create mode 100644 drivers/media/usb/pwc/pwc-v4l.c
 create mode 100644 drivers/media/usb/pwc/pwc.h
 create mode 100644 drivers/media/usb/s2255/Kconfig
 create mode 100644 drivers/media/usb/s2255/Makefile
 create mode 100644 drivers/media/usb/s2255/s2255drv.c
 create mode 100644 drivers/media/usb/sn9c102/Kconfig
 create mode 100644 drivers/media/usb/sn9c102/Makefile
 create mode 100644 drivers/media/usb/sn9c102/sn9c102.h
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_config.h
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_core.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_devtable.h
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_hv7131d.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_hv7131r.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_mi0343.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_mi0360.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_mt9v111.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_ov7630.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_ov7660.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_pas106b.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_pas202bcb.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_sensor.h
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_tas5110c1b.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_tas5110d.c
 create mode 100644 drivers/media/usb/sn9c102/sn9c102_tas5130d1b.c
 create mode 100644 drivers/media/usb/stk1160/Kconfig
 create mode 100644 drivers/media/usb/stk1160/Makefile
 create mode 100644 drivers/media/usb/stk1160/stk1160-ac97.c
 create mode 100644 drivers/media/usb/stk1160/stk1160-core.c
 create mode 100644 drivers/media/usb/stk1160/stk1160-i2c.c
 create mode 100644 drivers/media/usb/stk1160/stk1160-reg.h
 create mode 100644 drivers/media/usb/stk1160/stk1160-v4l.c
 create mode 100644 drivers/media/usb/stk1160/stk1160-video.c
 create mode 100644 drivers/media/usb/stk1160/stk1160.h
 create mode 100644 drivers/media/usb/stkwebcam/Kconfig
 create mode 100644 drivers/media/usb/stkwebcam/Makefile
 create mode 100644 drivers/media/usb/stkwebcam/stk-sensor.c
 create mode 100644 drivers/media/usb/stkwebcam/stk-webcam.c
 create mode 100644 drivers/media/usb/stkwebcam/stk-webcam.h
 create mode 100644 drivers/media/usb/tlg2300/Kconfig
 create mode 100644 drivers/media/usb/tlg2300/Makefile
 create mode 100644 drivers/media/usb/tlg2300/pd-alsa.c
 create mode 100644 drivers/media/usb/tlg2300/pd-common.h
 create mode 100644 drivers/media/usb/tlg2300/pd-dvb.c
 create mode 100644 drivers/media/usb/tlg2300/pd-main.c
 create mode 100644 drivers/media/usb/tlg2300/pd-radio.c
 create mode 100644 drivers/media/usb/tlg2300/pd-video.c
 create mode 100644 drivers/media/usb/tlg2300/vendorcmds.h
 create mode 100644 drivers/media/usb/tm6000/Kconfig
 create mode 100644 drivers/media/usb/tm6000/Makefile
 create mode 100644 drivers/media/usb/tm6000/tm6000-alsa.c
 create mode 100644 drivers/media/usb/tm6000/tm6000-cards.c
 create mode 100644 drivers/media/usb/tm6000/tm6000-core.c
 create mode 100644 drivers/media/usb/tm6000/tm6000-dvb.c
 create mode 100644 drivers/media/usb/tm6000/tm6000-i2c.c
 create mode 100644 drivers/media/usb/tm6000/tm6000-input.c
 create mode 100644 drivers/media/usb/tm6000/tm6000-regs.h
 create mode 100644 drivers/media/usb/tm6000/tm6000-stds.c
 create mode 100644 drivers/media/usb/tm6000/tm6000-usb-isoc.h
 create mode 100644 drivers/media/usb/tm6000/tm6000-video.c
 create mode 100644 drivers/media/usb/tm6000/tm6000.h
 create mode 100644 drivers/media/usb/usbvision/Kconfig
 create mode 100644 drivers/media/usb/usbvision/Makefile
 create mode 100644 drivers/media/usb/usbvision/usbvision-cards.c
 create mode 100644 drivers/media/usb/usbvision/usbvision-cards.h
 create mode 100644 drivers/media/usb/usbvision/usbvision-core.c
 create mode 100644 drivers/media/usb/usbvision/usbvision-i2c.c
 create mode 100644 drivers/media/usb/usbvision/usbvision-video.c
 create mode 100644 drivers/media/usb/usbvision/usbvision.h
 create mode 100644 drivers/media/usb/uvc/Kconfig
 create mode 100644 drivers/media/usb/uvc/Makefile
 create mode 100644 drivers/media/usb/uvc/uvc_ctrl.c
 create mode 100644 drivers/media/usb/uvc/uvc_debugfs.c
 create mode 100644 drivers/media/usb/uvc/uvc_driver.c
 create mode 100644 drivers/media/usb/uvc/uvc_entity.c
 create mode 100644 drivers/media/usb/uvc/uvc_isight.c
 create mode 100644 drivers/media/usb/uvc/uvc_queue.c
 create mode 100644 drivers/media/usb/uvc/uvc_status.c
 create mode 100644 drivers/media/usb/uvc/uvc_v4l2.c
 create mode 100644 drivers/media/usb/uvc/uvc_video.c
 create mode 100644 drivers/media/usb/uvc/uvcvideo.h
 create mode 100644 drivers/media/usb/zr364xx/Kconfig
 create mode 100644 drivers/media/usb/zr364xx/Makefile
 create mode 100644 drivers/media/usb/zr364xx/zr364xx.c
 delete mode 100644 drivers/media/video/Kconfig
 delete mode 100644 drivers/media/video/Makefile
 delete mode 100644 drivers/media/video/adp1653.c
 delete mode 100644 drivers/media/video/adv7170.c
 delete mode 100644 drivers/media/video/adv7175.c
 delete mode 100644 drivers/media/video/adv7180.c
 delete mode 100644 drivers/media/video/adv7183.c
 delete mode 100644 drivers/media/video/adv7183_regs.h
 delete mode 100644 drivers/media/video/adv7343.c
 delete mode 100644 drivers/media/video/adv7343_regs.h
 delete mode 100644 drivers/media/video/adv7393.c
 delete mode 100644 drivers/media/video/adv7393_regs.h
 delete mode 100644 drivers/media/video/ak881x.c
 delete mode 100644 drivers/media/video/aptina-pll.c
 delete mode 100644 drivers/media/video/aptina-pll.h
 delete mode 100644 drivers/media/video/arv.c
 delete mode 100644 drivers/media/video/as3645a.c
 delete mode 100644 drivers/media/video/atmel-isi.c
 delete mode 100644 drivers/media/video/au0828/Kconfig
 delete mode 100644 drivers/media/video/au0828/Makefile
 delete mode 100644 drivers/media/video/au0828/au0828-cards.c
 delete mode 100644 drivers/media/video/au0828/au0828-cards.h
 delete mode 100644 drivers/media/video/au0828/au0828-core.c
 delete mode 100644 drivers/media/video/au0828/au0828-dvb.c
 delete mode 100644 drivers/media/video/au0828/au0828-i2c.c
 delete mode 100644 drivers/media/video/au0828/au0828-reg.h
 delete mode 100644 drivers/media/video/au0828/au0828-vbi.c
 delete mode 100644 drivers/media/video/au0828/au0828-video.c
 delete mode 100644 drivers/media/video/au0828/au0828.h
 delete mode 100644 drivers/media/video/blackfin/Kconfig
 delete mode 100644 drivers/media/video/blackfin/Makefile
 delete mode 100644 drivers/media/video/blackfin/bfin_capture.c
 delete mode 100644 drivers/media/video/blackfin/ppi.c
 delete mode 100644 drivers/media/video/bt819.c
 delete mode 100644 drivers/media/video/bt856.c
 delete mode 100644 drivers/media/video/bt866.c
 delete mode 100644 drivers/media/video/bt8xx/Kconfig
 delete mode 100644 drivers/media/video/bt8xx/Makefile
 delete mode 100644 drivers/media/video/bt8xx/bt848.h
 delete mode 100644 drivers/media/video/bt8xx/bttv-audio-hook.c
 delete mode 100644 drivers/media/video/bt8xx/bttv-audio-hook.h
 delete mode 100644 drivers/media/video/bt8xx/bttv-cards.c
 delete mode 100644 drivers/media/video/bt8xx/bttv-driver.c
 delete mode 100644 drivers/media/video/bt8xx/bttv-gpio.c
 delete mode 100644 drivers/media/video/bt8xx/bttv-i2c.c
 delete mode 100644 drivers/media/video/bt8xx/bttv-if.c
 delete mode 100644 drivers/media/video/bt8xx/bttv-input.c
 delete mode 100644 drivers/media/video/bt8xx/bttv-risc.c
 delete mode 100644 drivers/media/video/bt8xx/bttv-vbi.c
 delete mode 100644 drivers/media/video/bt8xx/bttv.h
 delete mode 100644 drivers/media/video/bt8xx/bttvp.h
 delete mode 100644 drivers/media/video/btcx-risc.c
 delete mode 100644 drivers/media/video/btcx-risc.h
 delete mode 100644 drivers/media/video/bw-qcam.c
 delete mode 100644 drivers/media/video/c-qcam.c
 delete mode 100644 drivers/media/video/coda.c
 delete mode 100644 drivers/media/video/coda.h
 delete mode 100644 drivers/media/video/cpia2/Kconfig
 delete mode 100644 drivers/media/video/cpia2/Makefile
 delete mode 100644 drivers/media/video/cpia2/cpia2.h
 delete mode 100644 drivers/media/video/cpia2/cpia2_core.c
 delete mode 100644 drivers/media/video/cpia2/cpia2_registers.h
 delete mode 100644 drivers/media/video/cpia2/cpia2_usb.c
 delete mode 100644 drivers/media/video/cpia2/cpia2_v4l.c
 delete mode 100644 drivers/media/video/cs5345.c
 delete mode 100644 drivers/media/video/cs53l32a.c
 delete mode 100644 drivers/media/video/cx18/Kconfig
 delete mode 100644 drivers/media/video/cx18/Makefile
 delete mode 100644 drivers/media/video/cx18/cx18-alsa-main.c
 delete mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.c
 delete mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.h
 delete mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.c
 delete mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.h
 delete mode 100644 drivers/media/video/cx18/cx18-alsa.h
 delete mode 100644 drivers/media/video/cx18/cx18-audio.c
 delete mode 100644 drivers/media/video/cx18/cx18-audio.h
 delete mode 100644 drivers/media/video/cx18/cx18-av-audio.c
 delete mode 100644 drivers/media/video/cx18/cx18-av-core.c
 delete mode 100644 drivers/media/video/cx18/cx18-av-core.h
 delete mode 100644 drivers/media/video/cx18/cx18-av-firmware.c
 delete mode 100644 drivers/media/video/cx18/cx18-av-vbi.c
 delete mode 100644 drivers/media/video/cx18/cx18-cards.c
 delete mode 100644 drivers/media/video/cx18/cx18-cards.h
 delete mode 100644 drivers/media/video/cx18/cx18-controls.c
 delete mode 100644 drivers/media/video/cx18/cx18-controls.h
 delete mode 100644 drivers/media/video/cx18/cx18-driver.c
 delete mode 100644 drivers/media/video/cx18/cx18-driver.h
 delete mode 100644 drivers/media/video/cx18/cx18-dvb.c
 delete mode 100644 drivers/media/video/cx18/cx18-dvb.h
 delete mode 100644 drivers/media/video/cx18/cx18-fileops.c
 delete mode 100644 drivers/media/video/cx18/cx18-fileops.h
 delete mode 100644 drivers/media/video/cx18/cx18-firmware.c
 delete mode 100644 drivers/media/video/cx18/cx18-firmware.h
 delete mode 100644 drivers/media/video/cx18/cx18-gpio.c
 delete mode 100644 drivers/media/video/cx18/cx18-gpio.h
 delete mode 100644 drivers/media/video/cx18/cx18-i2c.c
 delete mode 100644 drivers/media/video/cx18/cx18-i2c.h
 delete mode 100644 drivers/media/video/cx18/cx18-io.c
 delete mode 100644 drivers/media/video/cx18/cx18-io.h
 delete mode 100644 drivers/media/video/cx18/cx18-ioctl.c
 delete mode 100644 drivers/media/video/cx18/cx18-ioctl.h
 delete mode 100644 drivers/media/video/cx18/cx18-irq.c
 delete mode 100644 drivers/media/video/cx18/cx18-irq.h
 delete mode 100644 drivers/media/video/cx18/cx18-mailbox.c
 delete mode 100644 drivers/media/video/cx18/cx18-mailbox.h
 delete mode 100644 drivers/media/video/cx18/cx18-queue.c
 delete mode 100644 drivers/media/video/cx18/cx18-queue.h
 delete mode 100644 drivers/media/video/cx18/cx18-scb.c
 delete mode 100644 drivers/media/video/cx18/cx18-scb.h
 delete mode 100644 drivers/media/video/cx18/cx18-streams.c
 delete mode 100644 drivers/media/video/cx18/cx18-streams.h
 delete mode 100644 drivers/media/video/cx18/cx18-vbi.c
 delete mode 100644 drivers/media/video/cx18/cx18-vbi.h
 delete mode 100644 drivers/media/video/cx18/cx18-version.h
 delete mode 100644 drivers/media/video/cx18/cx18-video.c
 delete mode 100644 drivers/media/video/cx18/cx18-video.h
 delete mode 100644 drivers/media/video/cx18/cx23418.h
 delete mode 100644 drivers/media/video/cx231xx/Kconfig
 delete mode 100644 drivers/media/video/cx231xx/Makefile
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-417.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-audio.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-avcore.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-cards.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-conf-reg.h
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-core.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-dif.h
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-dvb.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-i2c.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-input.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-pcb-cfg.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-pcb-cfg.h
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-reg.h
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-vbi.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-vbi.h
 delete mode 100644 drivers/media/video/cx231xx/cx231xx-video.c
 delete mode 100644 drivers/media/video/cx231xx/cx231xx.h
 delete mode 100644 drivers/media/video/cx2341x.c
 delete mode 100644 drivers/media/video/cx23885/Kconfig
 delete mode 100644 drivers/media/video/cx23885/Makefile
 delete mode 100644 drivers/media/video/cx23885/altera-ci.c
 delete mode 100644 drivers/media/video/cx23885/altera-ci.h
 delete mode 100644 drivers/media/video/cx23885/cimax2.c
 delete mode 100644 drivers/media/video/cx23885/cimax2.h
 delete mode 100644 drivers/media/video/cx23885/cx23885-417.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-alsa.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-av.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-av.h
 delete mode 100644 drivers/media/video/cx23885/cx23885-cards.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-core.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-dvb.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-f300.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-f300.h
 delete mode 100644 drivers/media/video/cx23885/cx23885-i2c.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-input.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-input.h
 delete mode 100644 drivers/media/video/cx23885/cx23885-ioctl.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-ioctl.h
 delete mode 100644 drivers/media/video/cx23885/cx23885-ir.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-ir.h
 delete mode 100644 drivers/media/video/cx23885/cx23885-reg.h
 delete mode 100644 drivers/media/video/cx23885/cx23885-vbi.c
 delete mode 100644 drivers/media/video/cx23885/cx23885-video.c
 delete mode 100644 drivers/media/video/cx23885/cx23885.h
 delete mode 100644 drivers/media/video/cx23885/cx23888-ir.c
 delete mode 100644 drivers/media/video/cx23885/cx23888-ir.h
 delete mode 100644 drivers/media/video/cx23885/netup-eeprom.c
 delete mode 100644 drivers/media/video/cx23885/netup-eeprom.h
 delete mode 100644 drivers/media/video/cx23885/netup-init.c
 delete mode 100644 drivers/media/video/cx23885/netup-init.h
 delete mode 100644 drivers/media/video/cx25821/Kconfig
 delete mode 100644 drivers/media/video/cx25821/Makefile
 delete mode 100644 drivers/media/video/cx25821/cx25821-alsa.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-audio-upstream.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-audio-upstream.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-audio.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-biffuncs.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-cards.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-core.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-gpio.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-i2c.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-medusa-defines.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-medusa-reg.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-medusa-video.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-medusa-video.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-reg.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-sram.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-video-upstream-ch2.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-video-upstream-ch2.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-video-upstream.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-video-upstream.h
 delete mode 100644 drivers/media/video/cx25821/cx25821-video.c
 delete mode 100644 drivers/media/video/cx25821/cx25821-video.h
 delete mode 100644 drivers/media/video/cx25821/cx25821.h
 delete mode 100644 drivers/media/video/cx25840/Kconfig
 delete mode 100644 drivers/media/video/cx25840/Makefile
 delete mode 100644 drivers/media/video/cx25840/cx25840-audio.c
 delete mode 100644 drivers/media/video/cx25840/cx25840-core.c
 delete mode 100644 drivers/media/video/cx25840/cx25840-core.h
 delete mode 100644 drivers/media/video/cx25840/cx25840-firmware.c
 delete mode 100644 drivers/media/video/cx25840/cx25840-ir.c
 delete mode 100644 drivers/media/video/cx25840/cx25840-vbi.c
 delete mode 100644 drivers/media/video/cx88/Kconfig
 delete mode 100644 drivers/media/video/cx88/Makefile
 delete mode 100644 drivers/media/video/cx88/cx88-alsa.c
 delete mode 100644 drivers/media/video/cx88/cx88-blackbird.c
 delete mode 100644 drivers/media/video/cx88/cx88-cards.c
 delete mode 100644 drivers/media/video/cx88/cx88-core.c
 delete mode 100644 drivers/media/video/cx88/cx88-dsp.c
 delete mode 100644 drivers/media/video/cx88/cx88-dvb.c
 delete mode 100644 drivers/media/video/cx88/cx88-i2c.c
 delete mode 100644 drivers/media/video/cx88/cx88-input.c
 delete mode 100644 drivers/media/video/cx88/cx88-mpeg.c
 delete mode 100644 drivers/media/video/cx88/cx88-reg.h
 delete mode 100644 drivers/media/video/cx88/cx88-tvaudio.c
 delete mode 100644 drivers/media/video/cx88/cx88-vbi.c
 delete mode 100644 drivers/media/video/cx88/cx88-video.c
 delete mode 100644 drivers/media/video/cx88/cx88-vp3054-i2c.c
 delete mode 100644 drivers/media/video/cx88/cx88-vp3054-i2c.h
 delete mode 100644 drivers/media/video/cx88/cx88.h
 delete mode 100644 drivers/media/video/davinci/Kconfig
 delete mode 100644 drivers/media/video/davinci/Makefile
 delete mode 100644 drivers/media/video/davinci/ccdc_hw_device.h
 delete mode 100644 drivers/media/video/davinci/dm355_ccdc.c
 delete mode 100644 drivers/media/video/davinci/dm355_ccdc_regs.h
 delete mode 100644 drivers/media/video/davinci/dm644x_ccdc.c
 delete mode 100644 drivers/media/video/davinci/dm644x_ccdc_regs.h
 delete mode 100644 drivers/media/video/davinci/isif.c
 delete mode 100644 drivers/media/video/davinci/isif_regs.h
 delete mode 100644 drivers/media/video/davinci/vpbe.c
 delete mode 100644 drivers/media/video/davinci/vpbe_display.c
 delete mode 100644 drivers/media/video/davinci/vpbe_osd.c
 delete mode 100644 drivers/media/video/davinci/vpbe_osd_regs.h
 delete mode 100644 drivers/media/video/davinci/vpbe_venc.c
 delete mode 100644 drivers/media/video/davinci/vpbe_venc_regs.h
 delete mode 100644 drivers/media/video/davinci/vpfe_capture.c
 delete mode 100644 drivers/media/video/davinci/vpif.c
 delete mode 100644 drivers/media/video/davinci/vpif.h
 delete mode 100644 drivers/media/video/davinci/vpif_capture.c
 delete mode 100644 drivers/media/video/davinci/vpif_capture.h
 delete mode 100644 drivers/media/video/davinci/vpif_display.c
 delete mode 100644 drivers/media/video/davinci/vpif_display.h
 delete mode 100644 drivers/media/video/davinci/vpss.c
 delete mode 100644 drivers/media/video/em28xx/Kconfig
 delete mode 100644 drivers/media/video/em28xx/Makefile
 delete mode 100644 drivers/media/video/em28xx/em28xx-audio.c
 delete mode 100644 drivers/media/video/em28xx/em28xx-cards.c
 delete mode 100644 drivers/media/video/em28xx/em28xx-core.c
 delete mode 100644 drivers/media/video/em28xx/em28xx-dvb.c
 delete mode 100644 drivers/media/video/em28xx/em28xx-i2c.c
 delete mode 100644 drivers/media/video/em28xx/em28xx-input.c
 delete mode 100644 drivers/media/video/em28xx/em28xx-reg.h
 delete mode 100644 drivers/media/video/em28xx/em28xx-vbi.c
 delete mode 100644 drivers/media/video/em28xx/em28xx-video.c
 delete mode 100644 drivers/media/video/em28xx/em28xx.h
 delete mode 100644 drivers/media/video/fsl-viu.c
 delete mode 100644 drivers/media/video/gspca/Kconfig
 delete mode 100644 drivers/media/video/gspca/Makefile
 delete mode 100644 drivers/media/video/gspca/autogain_functions.c
 delete mode 100644 drivers/media/video/gspca/autogain_functions.h
 delete mode 100644 drivers/media/video/gspca/benq.c
 delete mode 100644 drivers/media/video/gspca/conex.c
 delete mode 100644 drivers/media/video/gspca/cpia1.c
 delete mode 100644 drivers/media/video/gspca/etoms.c
 delete mode 100644 drivers/media/video/gspca/finepix.c
 delete mode 100644 drivers/media/video/gspca/gl860/Kconfig
 delete mode 100644 drivers/media/video/gspca/gl860/Makefile
 delete mode 100644 drivers/media/video/gspca/gl860/gl860-mi1320.c
 delete mode 100644 drivers/media/video/gspca/gl860/gl860-mi2020.c
 delete mode 100644 drivers/media/video/gspca/gl860/gl860-ov2640.c
 delete mode 100644 drivers/media/video/gspca/gl860/gl860-ov9655.c
 delete mode 100644 drivers/media/video/gspca/gl860/gl860.c
 delete mode 100644 drivers/media/video/gspca/gl860/gl860.h
 delete mode 100644 drivers/media/video/gspca/gspca.c
 delete mode 100644 drivers/media/video/gspca/gspca.h
 delete mode 100644 drivers/media/video/gspca/jeilinj.c
 delete mode 100644 drivers/media/video/gspca/jl2005bcd.c
 delete mode 100644 drivers/media/video/gspca/jpeg.h
 delete mode 100644 drivers/media/video/gspca/kinect.c
 delete mode 100644 drivers/media/video/gspca/konica.c
 delete mode 100644 drivers/media/video/gspca/m5602/Kconfig
 delete mode 100644 drivers/media/video/gspca/m5602/Makefile
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_bridge.h
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_core.c
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_mt9m111.c
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_mt9m111.h
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_ov7660.c
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_ov7660.h
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_ov9650.c
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_ov9650.h
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_po1030.c
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_po1030.h
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_s5k4aa.c
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_s5k4aa.h
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_s5k83a.c
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_s5k83a.h
 delete mode 100644 drivers/media/video/gspca/m5602/m5602_sensor.h
 delete mode 100644 drivers/media/video/gspca/mars.c
 delete mode 100644 drivers/media/video/gspca/mr97310a.c
 delete mode 100644 drivers/media/video/gspca/nw80x.c
 delete mode 100644 drivers/media/video/gspca/ov519.c
 delete mode 100644 drivers/media/video/gspca/ov534.c
 delete mode 100644 drivers/media/video/gspca/ov534_9.c
 delete mode 100644 drivers/media/video/gspca/pac207.c
 delete mode 100644 drivers/media/video/gspca/pac7302.c
 delete mode 100644 drivers/media/video/gspca/pac7311.c
 delete mode 100644 drivers/media/video/gspca/pac_common.h
 delete mode 100644 drivers/media/video/gspca/se401.c
 delete mode 100644 drivers/media/video/gspca/se401.h
 delete mode 100644 drivers/media/video/gspca/sn9c2028.c
 delete mode 100644 drivers/media/video/gspca/sn9c2028.h
 delete mode 100644 drivers/media/video/gspca/sn9c20x.c
 delete mode 100644 drivers/media/video/gspca/sonixb.c
 delete mode 100644 drivers/media/video/gspca/sonixj.c
 delete mode 100644 drivers/media/video/gspca/spca1528.c
 delete mode 100644 drivers/media/video/gspca/spca500.c
 delete mode 100644 drivers/media/video/gspca/spca501.c
 delete mode 100644 drivers/media/video/gspca/spca505.c
 delete mode 100644 drivers/media/video/gspca/spca506.c
 delete mode 100644 drivers/media/video/gspca/spca508.c
 delete mode 100644 drivers/media/video/gspca/spca561.c
 delete mode 100644 drivers/media/video/gspca/sq905.c
 delete mode 100644 drivers/media/video/gspca/sq905c.c
 delete mode 100644 drivers/media/video/gspca/sq930x.c
 delete mode 100644 drivers/media/video/gspca/stk014.c
 delete mode 100644 drivers/media/video/gspca/stv0680.c
 delete mode 100644 drivers/media/video/gspca/stv06xx/Kconfig
 delete mode 100644 drivers/media/video/gspca/stv06xx/Makefile
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx.c
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx.h
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx_pb0100.h
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx_sensor.h
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx_st6422.c
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx_st6422.h
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c
 delete mode 100644 drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h
 delete mode 100644 drivers/media/video/gspca/sunplus.c
 delete mode 100644 drivers/media/video/gspca/t613.c
 delete mode 100644 drivers/media/video/gspca/topro.c
 delete mode 100644 drivers/media/video/gspca/tv8532.c
 delete mode 100644 drivers/media/video/gspca/vc032x.c
 delete mode 100644 drivers/media/video/gspca/vicam.c
 delete mode 100644 drivers/media/video/gspca/w996Xcf.c
 delete mode 100644 drivers/media/video/gspca/xirlink_cit.c
 delete mode 100644 drivers/media/video/gspca/zc3xx-reg.h
 delete mode 100644 drivers/media/video/gspca/zc3xx.c
 delete mode 100644 drivers/media/video/hdpvr/Kconfig
 delete mode 100644 drivers/media/video/hdpvr/Makefile
 delete mode 100644 drivers/media/video/hdpvr/hdpvr-control.c
 delete mode 100644 drivers/media/video/hdpvr/hdpvr-core.c
 delete mode 100644 drivers/media/video/hdpvr/hdpvr-i2c.c
 delete mode 100644 drivers/media/video/hdpvr/hdpvr-video.c
 delete mode 100644 drivers/media/video/hdpvr/hdpvr.h
 delete mode 100644 drivers/media/video/hexium_gemini.c
 delete mode 100644 drivers/media/video/hexium_orion.c
 delete mode 100644 drivers/media/video/imx074.c
 delete mode 100644 drivers/media/video/indycam.c
 delete mode 100644 drivers/media/video/indycam.h
 delete mode 100644 drivers/media/video/ir-kbd-i2c.c
 delete mode 100644 drivers/media/video/ivtv/Kconfig
 delete mode 100644 drivers/media/video/ivtv/Makefile
 delete mode 100644 drivers/media/video/ivtv/ivtv-cards.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-cards.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-controls.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-controls.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-driver.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-driver.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-fileops.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-fileops.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-firmware.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-firmware.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-gpio.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-gpio.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-i2c.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-i2c.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-ioctl.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-ioctl.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-irq.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-irq.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-mailbox.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-mailbox.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-queue.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-queue.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-routing.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-routing.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-streams.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-streams.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-udma.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-udma.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-vbi.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-vbi.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-version.h
 delete mode 100644 drivers/media/video/ivtv/ivtv-yuv.c
 delete mode 100644 drivers/media/video/ivtv/ivtv-yuv.h
 delete mode 100644 drivers/media/video/ivtv/ivtvfb.c
 delete mode 100644 drivers/media/video/ks0127.c
 delete mode 100644 drivers/media/video/ks0127.h
 delete mode 100644 drivers/media/video/m2m-deinterlace.c
 delete mode 100644 drivers/media/video/m52790.c
 delete mode 100644 drivers/media/video/m5mols/Kconfig
 delete mode 100644 drivers/media/video/m5mols/Makefile
 delete mode 100644 drivers/media/video/m5mols/m5mols.h
 delete mode 100644 drivers/media/video/m5mols/m5mols_capture.c
 delete mode 100644 drivers/media/video/m5mols/m5mols_controls.c
 delete mode 100644 drivers/media/video/m5mols/m5mols_core.c
 delete mode 100644 drivers/media/video/m5mols/m5mols_reg.h
 delete mode 100644 drivers/media/video/marvell-ccic/Kconfig
 delete mode 100644 drivers/media/video/marvell-ccic/Makefile
 delete mode 100644 drivers/media/video/marvell-ccic/cafe-driver.c
 delete mode 100644 drivers/media/video/marvell-ccic/mcam-core.c
 delete mode 100644 drivers/media/video/marvell-ccic/mcam-core.h
 delete mode 100644 drivers/media/video/marvell-ccic/mmp-driver.c
 delete mode 100644 drivers/media/video/mem2mem_testdev.c
 delete mode 100644 drivers/media/video/meye.c
 delete mode 100644 drivers/media/video/meye.h
 delete mode 100644 drivers/media/video/msp3400-driver.c
 delete mode 100644 drivers/media/video/msp3400-driver.h
 delete mode 100644 drivers/media/video/msp3400-kthreads.c
 delete mode 100644 drivers/media/video/mt9m001.c
 delete mode 100644 drivers/media/video/mt9m032.c
 delete mode 100644 drivers/media/video/mt9m111.c
 delete mode 100644 drivers/media/video/mt9p031.c
 delete mode 100644 drivers/media/video/mt9t001.c
 delete mode 100644 drivers/media/video/mt9t031.c
 delete mode 100644 drivers/media/video/mt9t112.c
 delete mode 100644 drivers/media/video/mt9v011.c
 delete mode 100644 drivers/media/video/mt9v022.c
 delete mode 100644 drivers/media/video/mt9v032.c
 delete mode 100644 drivers/media/video/mx1_camera.c
 delete mode 100644 drivers/media/video/mx2_camera.c
 delete mode 100644 drivers/media/video/mx2_emmaprp.c
 delete mode 100644 drivers/media/video/mx3_camera.c
 delete mode 100644 drivers/media/video/mxb.c
 delete mode 100644 drivers/media/video/noon010pc30.c
 delete mode 100644 drivers/media/video/omap/Kconfig
 delete mode 100644 drivers/media/video/omap/Makefile
 delete mode 100644 drivers/media/video/omap/omap_vout.c
 delete mode 100644 drivers/media/video/omap/omap_vout_vrfb.c
 delete mode 100644 drivers/media/video/omap/omap_vout_vrfb.h
 delete mode 100644 drivers/media/video/omap/omap_voutdef.h
 delete mode 100644 drivers/media/video/omap/omap_voutlib.c
 delete mode 100644 drivers/media/video/omap/omap_voutlib.h
 delete mode 100644 drivers/media/video/omap1_camera.c
 delete mode 100644 drivers/media/video/omap24xxcam-dma.c
 delete mode 100644 drivers/media/video/omap24xxcam.c
 delete mode 100644 drivers/media/video/omap24xxcam.h
 delete mode 100644 drivers/media/video/omap3isp/Makefile
 delete mode 100644 drivers/media/video/omap3isp/cfa_coef_table.h
 delete mode 100644 drivers/media/video/omap3isp/gamma_table.h
 delete mode 100644 drivers/media/video/omap3isp/isp.c
 delete mode 100644 drivers/media/video/omap3isp/isp.h
 delete mode 100644 drivers/media/video/omap3isp/ispccdc.c
 delete mode 100644 drivers/media/video/omap3isp/ispccdc.h
 delete mode 100644 drivers/media/video/omap3isp/ispccp2.c
 delete mode 100644 drivers/media/video/omap3isp/ispccp2.h
 delete mode 100644 drivers/media/video/omap3isp/ispcsi2.c
 delete mode 100644 drivers/media/video/omap3isp/ispcsi2.h
 delete mode 100644 drivers/media/video/omap3isp/ispcsiphy.c
 delete mode 100644 drivers/media/video/omap3isp/ispcsiphy.h
 delete mode 100644 drivers/media/video/omap3isp/isph3a.h
 delete mode 100644 drivers/media/video/omap3isp/isph3a_aewb.c
 delete mode 100644 drivers/media/video/omap3isp/isph3a_af.c
 delete mode 100644 drivers/media/video/omap3isp/isphist.c
 delete mode 100644 drivers/media/video/omap3isp/isphist.h
 delete mode 100644 drivers/media/video/omap3isp/isppreview.c
 delete mode 100644 drivers/media/video/omap3isp/isppreview.h
 delete mode 100644 drivers/media/video/omap3isp/ispqueue.c
 delete mode 100644 drivers/media/video/omap3isp/ispqueue.h
 delete mode 100644 drivers/media/video/omap3isp/ispreg.h
 delete mode 100644 drivers/media/video/omap3isp/ispresizer.c
 delete mode 100644 drivers/media/video/omap3isp/ispresizer.h
 delete mode 100644 drivers/media/video/omap3isp/ispstat.c
 delete mode 100644 drivers/media/video/omap3isp/ispstat.h
 delete mode 100644 drivers/media/video/omap3isp/ispvideo.c
 delete mode 100644 drivers/media/video/omap3isp/ispvideo.h
 delete mode 100644 drivers/media/video/omap3isp/luma_enhance_table.h
 delete mode 100644 drivers/media/video/omap3isp/noise_filter_table.h
 delete mode 100644 drivers/media/video/ov2640.c
 delete mode 100644 drivers/media/video/ov5642.c
 delete mode 100644 drivers/media/video/ov6650.c
 delete mode 100644 drivers/media/video/ov7670.c
 delete mode 100644 drivers/media/video/ov772x.c
 delete mode 100644 drivers/media/video/ov9640.c
 delete mode 100644 drivers/media/video/ov9640.h
 delete mode 100644 drivers/media/video/ov9740.c
 delete mode 100644 drivers/media/video/pms.c
 delete mode 100644 drivers/media/video/pvrusb2/Kconfig
 delete mode 100644 drivers/media/video/pvrusb2/Makefile
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-audio.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-audio.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-context.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-context.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-cs53l32a.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-ctrl.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-ctrl.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-debug.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-debugifc.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-debugifc.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-devattr.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-devattr.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-dvb.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-dvb.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-eeprom.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-eeprom.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-encoder.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-encoder.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-hdw.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-hdw.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-i2c-core.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-io.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-io.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-ioread.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-ioread.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-main.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-std.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-std.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-sysfs.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-sysfs.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-util.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-v4l2.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-v4l2.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-video-v4l.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-wm8775.c
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-wm8775.h
 delete mode 100644 drivers/media/video/pvrusb2/pvrusb2.h
 delete mode 100644 drivers/media/video/pwc/Kconfig
 delete mode 100644 drivers/media/video/pwc/Makefile
 delete mode 100644 drivers/media/video/pwc/philips.txt
 delete mode 100644 drivers/media/video/pwc/pwc-ctrl.c
 delete mode 100644 drivers/media/video/pwc/pwc-dec1.c
 delete mode 100644 drivers/media/video/pwc/pwc-dec1.h
 delete mode 100644 drivers/media/video/pwc/pwc-dec23.c
 delete mode 100644 drivers/media/video/pwc/pwc-dec23.h
 delete mode 100644 drivers/media/video/pwc/pwc-if.c
 delete mode 100644 drivers/media/video/pwc/pwc-kiara.c
 delete mode 100644 drivers/media/video/pwc/pwc-kiara.h
 delete mode 100644 drivers/media/video/pwc/pwc-misc.c
 delete mode 100644 drivers/media/video/pwc/pwc-nala.h
 delete mode 100644 drivers/media/video/pwc/pwc-timon.c
 delete mode 100644 drivers/media/video/pwc/pwc-timon.h
 delete mode 100644 drivers/media/video/pwc/pwc-uncompress.c
 delete mode 100644 drivers/media/video/pwc/pwc-v4l.c
 delete mode 100644 drivers/media/video/pwc/pwc.h
 delete mode 100644 drivers/media/video/pxa_camera.c
 delete mode 100644 drivers/media/video/rj54n1cb0c.c
 delete mode 100644 drivers/media/video/s2255drv.c
 delete mode 100644 drivers/media/video/s5k6aa.c
 delete mode 100644 drivers/media/video/s5p-fimc/Kconfig
 delete mode 100644 drivers/media/video/s5p-fimc/Makefile
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-capture.c
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-core.c
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-core.h
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-lite-reg.c
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-lite-reg.h
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-lite.c
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-lite.h
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-m2m.c
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-mdevice.c
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-mdevice.h
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-reg.c
 delete mode 100644 drivers/media/video/s5p-fimc/fimc-reg.h
 delete mode 100644 drivers/media/video/s5p-fimc/mipi-csis.c
 delete mode 100644 drivers/media/video/s5p-fimc/mipi-csis.h
 delete mode 100644 drivers/media/video/s5p-g2d/Makefile
 delete mode 100644 drivers/media/video/s5p-g2d/g2d-hw.c
 delete mode 100644 drivers/media/video/s5p-g2d/g2d-regs.h
 delete mode 100644 drivers/media/video/s5p-g2d/g2d.c
 delete mode 100644 drivers/media/video/s5p-g2d/g2d.h
 delete mode 100644 drivers/media/video/s5p-jpeg/Makefile
 delete mode 100644 drivers/media/video/s5p-jpeg/jpeg-core.c
 delete mode 100644 drivers/media/video/s5p-jpeg/jpeg-core.h
 delete mode 100644 drivers/media/video/s5p-jpeg/jpeg-hw.h
 delete mode 100644 drivers/media/video/s5p-jpeg/jpeg-regs.h
 delete mode 100644 drivers/media/video/s5p-mfc/Makefile
 delete mode 100644 drivers/media/video/s5p-mfc/regs-mfc.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc.c
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_cmd.c
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_cmd.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_common.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_ctrl.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_debug.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_dec.c
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_dec.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_enc.c
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_enc.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_intr.c
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_intr.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_opr.c
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_opr.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_pm.c
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_pm.h
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_shm.c
 delete mode 100644 drivers/media/video/s5p-mfc/s5p_mfc_shm.h
 delete mode 100644 drivers/media/video/s5p-tv/Kconfig
 delete mode 100644 drivers/media/video/s5p-tv/Makefile
 delete mode 100644 drivers/media/video/s5p-tv/hdmi_drv.c
 delete mode 100644 drivers/media/video/s5p-tv/hdmiphy_drv.c
 delete mode 100644 drivers/media/video/s5p-tv/mixer.h
 delete mode 100644 drivers/media/video/s5p-tv/mixer_drv.c
 delete mode 100644 drivers/media/video/s5p-tv/mixer_grp_layer.c
 delete mode 100644 drivers/media/video/s5p-tv/mixer_reg.c
 delete mode 100644 drivers/media/video/s5p-tv/mixer_video.c
 delete mode 100644 drivers/media/video/s5p-tv/mixer_vp_layer.c
 delete mode 100644 drivers/media/video/s5p-tv/regs-hdmi.h
 delete mode 100644 drivers/media/video/s5p-tv/regs-mixer.h
 delete mode 100644 drivers/media/video/s5p-tv/regs-sdo.h
 delete mode 100644 drivers/media/video/s5p-tv/regs-vp.h
 delete mode 100644 drivers/media/video/s5p-tv/sdo_drv.c
 delete mode 100644 drivers/media/video/s5p-tv/sii9234_drv.c
 delete mode 100644 drivers/media/video/saa6588.c
 delete mode 100644 drivers/media/video/saa7110.c
 delete mode 100644 drivers/media/video/saa7115.c
 delete mode 100644 drivers/media/video/saa711x_regs.h
 delete mode 100644 drivers/media/video/saa7127.c
 delete mode 100644 drivers/media/video/saa7134/Kconfig
 delete mode 100644 drivers/media/video/saa7134/Makefile
 delete mode 100644 drivers/media/video/saa7134/saa6752hs.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-alsa.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-cards.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-core.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-dvb.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-empress.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-i2c.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-input.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-reg.h
 delete mode 100644 drivers/media/video/saa7134/saa7134-ts.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-tvaudio.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-vbi.c
 delete mode 100644 drivers/media/video/saa7134/saa7134-video.c
 delete mode 100644 drivers/media/video/saa7134/saa7134.h
 delete mode 100644 drivers/media/video/saa7164/Kconfig
 delete mode 100644 drivers/media/video/saa7164/Makefile
 delete mode 100644 drivers/media/video/saa7164/saa7164-api.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-buffer.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-bus.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-cards.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-cmd.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-core.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-dvb.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-encoder.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-fw.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-i2c.c
 delete mode 100644 drivers/media/video/saa7164/saa7164-reg.h
 delete mode 100644 drivers/media/video/saa7164/saa7164-types.h
 delete mode 100644 drivers/media/video/saa7164/saa7164-vbi.c
 delete mode 100644 drivers/media/video/saa7164/saa7164.h
 delete mode 100644 drivers/media/video/saa717x.c
 delete mode 100644 drivers/media/video/saa7185.c
 delete mode 100644 drivers/media/video/saa7191.c
 delete mode 100644 drivers/media/video/saa7191.h
 delete mode 100644 drivers/media/video/sh_mobile_ceu_camera.c
 delete mode 100644 drivers/media/video/sh_mobile_csi2.c
 delete mode 100644 drivers/media/video/sh_vou.c
 delete mode 100644 drivers/media/video/smiapp-pll.c
 delete mode 100644 drivers/media/video/smiapp-pll.h
 delete mode 100644 drivers/media/video/smiapp/Kconfig
 delete mode 100644 drivers/media/video/smiapp/Makefile
 delete mode 100644 drivers/media/video/smiapp/smiapp-core.c
 delete mode 100644 drivers/media/video/smiapp/smiapp-limits.c
 delete mode 100644 drivers/media/video/smiapp/smiapp-limits.h
 delete mode 100644 drivers/media/video/smiapp/smiapp-quirk.c
 delete mode 100644 drivers/media/video/smiapp/smiapp-quirk.h
 delete mode 100644 drivers/media/video/smiapp/smiapp-reg-defs.h
 delete mode 100644 drivers/media/video/smiapp/smiapp-reg.h
 delete mode 100644 drivers/media/video/smiapp/smiapp-regs.c
 delete mode 100644 drivers/media/video/smiapp/smiapp-regs.h
 delete mode 100644 drivers/media/video/smiapp/smiapp.h
 delete mode 100644 drivers/media/video/sn9c102/Kconfig
 delete mode 100644 drivers/media/video/sn9c102/Makefile
 delete mode 100644 drivers/media/video/sn9c102/sn9c102.h
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_config.h
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_core.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_devtable.h
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_hv7131d.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_hv7131r.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_mi0343.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_mi0360.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_mt9v111.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_ov7630.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_ov7660.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_pas106b.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_pas202bcb.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_sensor.h
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_tas5110c1b.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_tas5110d.c
 delete mode 100644 drivers/media/video/sn9c102/sn9c102_tas5130d1b.c
 delete mode 100644 drivers/media/video/soc_camera.c
 delete mode 100644 drivers/media/video/soc_camera_platform.c
 delete mode 100644 drivers/media/video/soc_mediabus.c
 delete mode 100644 drivers/media/video/sr030pc30.c
 delete mode 100644 drivers/media/video/sta2x11_vip.c
 delete mode 100644 drivers/media/video/sta2x11_vip.h
 delete mode 100644 drivers/media/video/stk-sensor.c
 delete mode 100644 drivers/media/video/stk-webcam.c
 delete mode 100644 drivers/media/video/stk-webcam.h
 delete mode 100644 drivers/media/video/stk1160/Kconfig
 delete mode 100644 drivers/media/video/stk1160/Makefile
 delete mode 100644 drivers/media/video/stk1160/stk1160-ac97.c
 delete mode 100644 drivers/media/video/stk1160/stk1160-core.c
 delete mode 100644 drivers/media/video/stk1160/stk1160-i2c.c
 delete mode 100644 drivers/media/video/stk1160/stk1160-reg.h
 delete mode 100644 drivers/media/video/stk1160/stk1160-v4l.c
 delete mode 100644 drivers/media/video/stk1160/stk1160-video.c
 delete mode 100644 drivers/media/video/stk1160/stk1160.h
 delete mode 100644 drivers/media/video/tcm825x.c
 delete mode 100644 drivers/media/video/tcm825x.h
 delete mode 100644 drivers/media/video/tda7432.c
 delete mode 100644 drivers/media/video/tda9840.c
 delete mode 100644 drivers/media/video/tea6415c.c
 delete mode 100644 drivers/media/video/tea6415c.h
 delete mode 100644 drivers/media/video/tea6420.c
 delete mode 100644 drivers/media/video/tea6420.h
 delete mode 100644 drivers/media/video/ths7303.c
 delete mode 100644 drivers/media/video/timblogiw.c
 delete mode 100644 drivers/media/video/tlg2300/Kconfig
 delete mode 100644 drivers/media/video/tlg2300/Makefile
 delete mode 100644 drivers/media/video/tlg2300/pd-alsa.c
 delete mode 100644 drivers/media/video/tlg2300/pd-common.h
 delete mode 100644 drivers/media/video/tlg2300/pd-dvb.c
 delete mode 100644 drivers/media/video/tlg2300/pd-main.c
 delete mode 100644 drivers/media/video/tlg2300/pd-radio.c
 delete mode 100644 drivers/media/video/tlg2300/pd-video.c
 delete mode 100644 drivers/media/video/tlg2300/vendorcmds.h
 delete mode 100644 drivers/media/video/tlv320aic23b.c
 delete mode 100644 drivers/media/video/tm6000/Kconfig
 delete mode 100644 drivers/media/video/tm6000/Makefile
 delete mode 100644 drivers/media/video/tm6000/tm6000-alsa.c
 delete mode 100644 drivers/media/video/tm6000/tm6000-cards.c
 delete mode 100644 drivers/media/video/tm6000/tm6000-core.c
 delete mode 100644 drivers/media/video/tm6000/tm6000-dvb.c
 delete mode 100644 drivers/media/video/tm6000/tm6000-i2c.c
 delete mode 100644 drivers/media/video/tm6000/tm6000-input.c
 delete mode 100644 drivers/media/video/tm6000/tm6000-regs.h
 delete mode 100644 drivers/media/video/tm6000/tm6000-stds.c
 delete mode 100644 drivers/media/video/tm6000/tm6000-usb-isoc.h
 delete mode 100644 drivers/media/video/tm6000/tm6000-video.c
 delete mode 100644 drivers/media/video/tm6000/tm6000.h
 delete mode 100644 drivers/media/video/tvaudio.c
 delete mode 100644 drivers/media/video/tveeprom.c
 delete mode 100644 drivers/media/video/tvp514x.c
 delete mode 100644 drivers/media/video/tvp514x_regs.h
 delete mode 100644 drivers/media/video/tvp5150.c
 delete mode 100644 drivers/media/video/tvp5150_reg.h
 delete mode 100644 drivers/media/video/tvp7002.c
 delete mode 100644 drivers/media/video/tvp7002_reg.h
 delete mode 100644 drivers/media/video/tw9910.c
 delete mode 100644 drivers/media/video/upd64031a.c
 delete mode 100644 drivers/media/video/upd64083.c
 delete mode 100644 drivers/media/video/usbvision/Kconfig
 delete mode 100644 drivers/media/video/usbvision/Makefile
 delete mode 100644 drivers/media/video/usbvision/usbvision-cards.c
 delete mode 100644 drivers/media/video/usbvision/usbvision-cards.h
 delete mode 100644 drivers/media/video/usbvision/usbvision-core.c
 delete mode 100644 drivers/media/video/usbvision/usbvision-i2c.c
 delete mode 100644 drivers/media/video/usbvision/usbvision-video.c
 delete mode 100644 drivers/media/video/usbvision/usbvision.h
 delete mode 100644 drivers/media/video/uvc/Kconfig
 delete mode 100644 drivers/media/video/uvc/Makefile
 delete mode 100644 drivers/media/video/uvc/uvc_ctrl.c
 delete mode 100644 drivers/media/video/uvc/uvc_debugfs.c
 delete mode 100644 drivers/media/video/uvc/uvc_driver.c
 delete mode 100644 drivers/media/video/uvc/uvc_entity.c
 delete mode 100644 drivers/media/video/uvc/uvc_isight.c
 delete mode 100644 drivers/media/video/uvc/uvc_queue.c
 delete mode 100644 drivers/media/video/uvc/uvc_status.c
 delete mode 100644 drivers/media/video/uvc/uvc_v4l2.c
 delete mode 100644 drivers/media/video/uvc/uvc_video.c
 delete mode 100644 drivers/media/video/uvc/uvcvideo.h
 delete mode 100644 drivers/media/video/via-camera.c
 delete mode 100644 drivers/media/video/via-camera.h
 delete mode 100644 drivers/media/video/vino.c
 delete mode 100644 drivers/media/video/vino.h
 delete mode 100644 drivers/media/video/vivi.c
 delete mode 100644 drivers/media/video/vp27smpx.c
 delete mode 100644 drivers/media/video/vpx3220.c
 delete mode 100644 drivers/media/video/vs6624.c
 delete mode 100644 drivers/media/video/vs6624_regs.h
 delete mode 100644 drivers/media/video/w9966.c
 delete mode 100644 drivers/media/video/wm8739.c
 delete mode 100644 drivers/media/video/wm8775.c
 delete mode 100644 drivers/media/video/zoran/Kconfig
 delete mode 100644 drivers/media/video/zoran/Makefile
 delete mode 100644 drivers/media/video/zoran/videocodec.c
 delete mode 100644 drivers/media/video/zoran/videocodec.h
 delete mode 100644 drivers/media/video/zoran/zoran.h
 delete mode 100644 drivers/media/video/zoran/zoran_card.c
 delete mode 100644 drivers/media/video/zoran/zoran_card.h
 delete mode 100644 drivers/media/video/zoran/zoran_device.c
 delete mode 100644 drivers/media/video/zoran/zoran_device.h
 delete mode 100644 drivers/media/video/zoran/zoran_driver.c
 delete mode 100644 drivers/media/video/zoran/zoran_procfs.c
 delete mode 100644 drivers/media/video/zoran/zoran_procfs.h
 delete mode 100644 drivers/media/video/zoran/zr36016.c
 delete mode 100644 drivers/media/video/zoran/zr36016.h
 delete mode 100644 drivers/media/video/zoran/zr36050.c
 delete mode 100644 drivers/media/video/zoran/zr36050.h
 delete mode 100644 drivers/media/video/zoran/zr36057.h
 delete mode 100644 drivers/media/video/zoran/zr36060.c
 delete mode 100644 drivers/media/video/zoran/zr36060.h
 delete mode 100644 drivers/media/video/zr364xx.c

-- 
1.7.11.2


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir
  2012-08-14 20:55 [PATCH 00/12] media tree reorganization part 2 (second version) Mauro Carvalho Chehab
@ 2012-08-14 20:55 ` Mauro Carvalho Chehab
  2012-08-14 20:55 ` =?true?q?=5BPATCH=2006/12=5D=20=5Bmedia=5D=20move=20the=20remaining=20PCI=20devices=20to=20drivers/media/pci?= Mauro Carvalho Chehab
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-14 20:55 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Instead of having them under drivers/media/video, move them
to their own directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/Kconfig                 |   2 +
 drivers/media/pci/Makefile                |   3 +-
 drivers/media/pci/saa7146/Kconfig         |  38 ++
 drivers/media/pci/saa7146/Makefile        |   5 +
 drivers/media/pci/saa7146/hexium_gemini.c | 430 +++++++++++++++
 drivers/media/pci/saa7146/hexium_orion.c  | 502 +++++++++++++++++
 drivers/media/pci/saa7146/mxb.c           | 886 ++++++++++++++++++++++++++++++
 drivers/media/video/Kconfig               |  38 --
 drivers/media/video/Makefile              |   3 -
 drivers/media/video/hexium_gemini.c       | 430 ---------------
 drivers/media/video/hexium_orion.c        | 502 -----------------
 drivers/media/video/mxb.c                 | 886 ------------------------------
 12 files changed, 1865 insertions(+), 1860 deletions(-)
 create mode 100644 drivers/media/pci/saa7146/Kconfig
 create mode 100644 drivers/media/pci/saa7146/Makefile
 create mode 100644 drivers/media/pci/saa7146/hexium_gemini.c
 create mode 100644 drivers/media/pci/saa7146/hexium_orion.c
 create mode 100644 drivers/media/pci/saa7146/mxb.c
 delete mode 100644 drivers/media/video/hexium_gemini.c
 delete mode 100644 drivers/media/video/hexium_orion.c
 delete mode 100644 drivers/media/video/mxb.c

diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index b69cb12..e1a9e1a 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -9,6 +9,7 @@ if MEDIA_ANALOG_TV_SUPPORT
 	comment "Media capture/analog TV support"
 source "drivers/media/pci/ivtv/Kconfig"
 source "drivers/media/pci/zoran/Kconfig"
+source "drivers/media/pci/saa7146/Kconfig"
 endif
 
 if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
@@ -20,6 +21,7 @@ source "drivers/media/pci/cx88/Kconfig"
 source "drivers/media/pci/bt8xx/Kconfig"
 source "drivers/media/pci/saa7134/Kconfig"
 source "drivers/media/pci/saa7164/Kconfig"
+
 endif
 
 if MEDIA_DIGITAL_TV_SUPPORT
diff --git a/drivers/media/pci/Makefile b/drivers/media/pci/Makefile
index d47c222..bb71e30 100644
--- a/drivers/media/pci/Makefile
+++ b/drivers/media/pci/Makefile
@@ -10,7 +10,8 @@ obj-y        :=	ttpci/		\
 		mantis/		\
 		ngene/		\
 		ddbridge/	\
-		b2c2/
+		b2c2/		\
+		saa7146/
 
 obj-$(CONFIG_VIDEO_IVTV) += ivtv/
 obj-$(CONFIG_VIDEO_ZORAN) += zoran/
diff --git a/drivers/media/pci/saa7146/Kconfig b/drivers/media/pci/saa7146/Kconfig
new file mode 100644
index 0000000..8923b76
--- /dev/null
+++ b/drivers/media/pci/saa7146/Kconfig
@@ -0,0 +1,38 @@
+config VIDEO_HEXIUM_GEMINI
+	tristate "Hexium Gemini frame grabber"
+	depends on PCI && VIDEO_V4L2 && I2C
+	select VIDEO_SAA7146_VV
+	---help---
+	  This is a video4linux driver for the Hexium Gemini frame
+	  grabber card by Hexium. Please note that the Gemini Dual
+	  card is *not* fully supported.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called hexium_gemini.
+
+config VIDEO_HEXIUM_ORION
+	tristate "Hexium HV-PCI6 and Orion frame grabber"
+	depends on PCI && VIDEO_V4L2 && I2C
+	select VIDEO_SAA7146_VV
+	---help---
+	  This is a video4linux driver for the Hexium HV-PCI6 and
+	  Orion frame grabber cards by Hexium.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called hexium_orion.
+
+config VIDEO_MXB
+	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
+	depends on PCI && VIDEO_V4L2 && I2C
+	select VIDEO_SAA7146_VV
+	select VIDEO_TUNER
+	select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TDA9840 if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TEA6415C if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TEA6420 if VIDEO_HELPER_CHIPS_AUTO
+	---help---
+	  This is a video4linux driver for the 'Multimedia eXtension Board'
+	  TV card by Siemens-Nixdorf.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called mxb.
diff --git a/drivers/media/pci/saa7146/Makefile b/drivers/media/pci/saa7146/Makefile
new file mode 100644
index 0000000..362a38b
--- /dev/null
+++ b/drivers/media/pci/saa7146/Makefile
@@ -0,0 +1,5 @@
+obj-$(CONFIG_VIDEO_MXB) += mxb.o
+obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
+obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
+
+ccflags-y += -I$(srctree)/drivers/media/video
diff --git a/drivers/media/pci/saa7146/hexium_gemini.c b/drivers/media/pci/saa7146/hexium_gemini.c
new file mode 100644
index 0000000..366434f
--- /dev/null
+++ b/drivers/media/pci/saa7146/hexium_gemini.c
@@ -0,0 +1,430 @@
+/*
+    hexium_gemini.c - v4l2 driver for Hexium Gemini frame grabber cards
+
+    Visit http://www.mihu.de/linux/saa7146/ and follow the link
+    to "hexium" for further details about this card.
+
+    Copyright (C) 2003 Michael Hunold <michael@mihu.de>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#define DEBUG_VARIABLE debug
+
+#include <media/saa7146_vv.h>
+#include <linux/module.h>
+
+static int debug;
+module_param(debug, int, 0);
+MODULE_PARM_DESC(debug, "debug verbosity");
+
+/* global variables */
+static int hexium_num;
+
+#define HEXIUM_GEMINI			4
+#define HEXIUM_GEMINI_DUAL		5
+
+#define HEXIUM_INPUTS	9
+static struct v4l2_input hexium_inputs[HEXIUM_INPUTS] = {
+	{ 0, "CVBS 1",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 1, "CVBS 2",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 2, "CVBS 3",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 3, "CVBS 4",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 4, "CVBS 5",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 5, "CVBS 6",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 6, "Y/C 1",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 7, "Y/C 2",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 8, "Y/C 3",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+};
+
+#define HEXIUM_AUDIOS	0
+
+struct hexium_data
+{
+	s8 adr;
+	u8 byte;
+};
+
+#define HEXIUM_GEMINI_V_1_0		1
+#define HEXIUM_GEMINI_DUAL_V_1_0	2
+
+struct hexium
+{
+	int type;
+
+	struct video_device	*video_dev;
+	struct i2c_adapter	i2c_adapter;
+
+	int 		cur_input;	/* current input */
+	v4l2_std_id 	cur_std;	/* current standard */
+};
+
+/* Samsung KS0127B decoder default registers */
+static u8 hexium_ks0127b[0x100]={
+/*00*/ 0x00,0x52,0x30,0x40,0x01,0x0C,0x2A,0x10,
+/*08*/ 0x00,0x00,0x00,0x60,0x00,0x00,0x0F,0x06,
+/*10*/ 0x00,0x00,0xE4,0xC0,0x00,0x00,0x00,0x00,
+/*18*/ 0x14,0x9B,0xFE,0xFF,0xFC,0xFF,0x03,0x22,
+/*20*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*28*/ 0x00,0x00,0x00,0x00,0x00,0x2C,0x9B,0x00,
+/*30*/ 0x00,0x00,0x10,0x80,0x80,0x10,0x80,0x80,
+/*38*/ 0x01,0x04,0x00,0x00,0x00,0x29,0xC0,0x00,
+/*40*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*48*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*50*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*58*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*60*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*68*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*70*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*78*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*80*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*88*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*90*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*98*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*A0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*A8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*B0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*B8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*C0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*C8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*D0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*D8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*E0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*E8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*F0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/*F8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+};
+
+static struct hexium_data hexium_pal[] = {
+	{ 0x01, 0x52 }, { 0x12, 0x64 }, { 0x2D, 0x2C }, { 0x2E, 0x9B }, { -1 , 0xFF }
+};
+
+static struct hexium_data hexium_ntsc[] = {
+	{ 0x01, 0x53 }, { 0x12, 0x04 }, { 0x2D, 0x23 }, { 0x2E, 0x81 }, { -1 , 0xFF }
+};
+
+static struct hexium_data hexium_secam[] = {
+	{ 0x01, 0x52 }, { 0x12, 0x64 }, { 0x2D, 0x2C }, { 0x2E, 0x9B }, { -1 , 0xFF }
+};
+
+static struct hexium_data hexium_input_select[] = {
+	{ 0x02, 0x60 },
+	{ 0x02, 0x64 },
+	{ 0x02, 0x61 },
+	{ 0x02, 0x65 },
+	{ 0x02, 0x62 },
+	{ 0x02, 0x66 },
+	{ 0x02, 0x68 },
+	{ 0x02, 0x69 },
+	{ 0x02, 0x6A },
+};
+
+/* fixme: h_offset = 0 for Hexium Gemini *Dual*, which
+   are currently *not* supported*/
+static struct saa7146_standard hexium_standards[] = {
+	{
+		.name	= "PAL", 	.id	= V4L2_STD_PAL,
+		.v_offset	= 28,	.v_field 	= 288,
+		.h_offset	= 1,	.h_pixels 	= 680,
+		.v_max_out	= 576,	.h_max_out	= 768,
+	}, {
+		.name	= "NTSC", 	.id	= V4L2_STD_NTSC,
+		.v_offset	= 28,	.v_field 	= 240,
+		.h_offset	= 1,	.h_pixels 	= 640,
+		.v_max_out	= 480,	.h_max_out	= 640,
+	}, {
+		.name	= "SECAM", 	.id	= V4L2_STD_SECAM,
+		.v_offset	= 28,	.v_field 	= 288,
+		.h_offset	= 1,	.h_pixels 	= 720,
+		.v_max_out	= 576,	.h_max_out	= 768,
+	}
+};
+
+/* bring hardware to a sane state. this has to be done, just in case someone
+   wants to capture from this device before it has been properly initialized.
+   the capture engine would badly fail, because no valid signal arrives on the
+   saa7146, thus leading to timeouts and stuff. */
+static int hexium_init_done(struct saa7146_dev *dev)
+{
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+	union i2c_smbus_data data;
+	int i = 0;
+
+	DEB_D("hexium_init_done called\n");
+
+	/* initialize the helper ics to useful values */
+	for (i = 0; i < sizeof(hexium_ks0127b); i++) {
+		data.byte = hexium_ks0127b[i];
+		if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x6c, 0, I2C_SMBUS_WRITE, i, I2C_SMBUS_BYTE_DATA, &data)) {
+			pr_err("hexium_init_done() failed for address 0x%02x\n",
+			       i);
+		}
+	}
+
+	return 0;
+}
+
+static int hexium_set_input(struct hexium *hexium, int input)
+{
+	union i2c_smbus_data data;
+
+	DEB_D("\n");
+
+	data.byte = hexium_input_select[input].byte;
+	if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x6c, 0, I2C_SMBUS_WRITE, hexium_input_select[input].adr, I2C_SMBUS_BYTE_DATA, &data)) {
+		return -1;
+	}
+
+	return 0;
+}
+
+static int hexium_set_standard(struct hexium *hexium, struct hexium_data *vdec)
+{
+	union i2c_smbus_data data;
+	int i = 0;
+
+	DEB_D("\n");
+
+	while (vdec[i].adr != -1) {
+		data.byte = vdec[i].byte;
+		if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x6c, 0, I2C_SMBUS_WRITE, vdec[i].adr, I2C_SMBUS_BYTE_DATA, &data)) {
+			pr_err("hexium_init_done: hexium_set_standard() failed for address 0x%02x\n",
+			       i);
+			return -1;
+		}
+		i++;
+	}
+	return 0;
+}
+
+static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
+{
+	DEB_EE("VIDIOC_ENUMINPUT %d\n", i->index);
+
+	if (i->index >= HEXIUM_INPUTS)
+		return -EINVAL;
+
+	memcpy(i, &hexium_inputs[i->index], sizeof(struct v4l2_input));
+
+	DEB_D("v4l2_ioctl: VIDIOC_ENUMINPUT %d\n", i->index);
+	return 0;
+}
+
+static int vidioc_g_input(struct file *file, void *fh, unsigned int *input)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+
+	*input = hexium->cur_input;
+
+	DEB_D("VIDIOC_G_INPUT: %d\n", *input);
+	return 0;
+}
+
+static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+
+	DEB_EE("VIDIOC_S_INPUT %d\n", input);
+
+	if (input >= HEXIUM_INPUTS)
+		return -EINVAL;
+
+	hexium->cur_input = input;
+	hexium_set_input(hexium, input);
+	return 0;
+}
+
+static struct saa7146_ext_vv vv_data;
+
+/* this function only gets called when the probing was successful */
+static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
+{
+	struct hexium *hexium;
+	int ret;
+
+	DEB_EE("\n");
+
+	hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL);
+	if (NULL == hexium) {
+		pr_err("not enough kernel memory in hexium_attach()\n");
+		return -ENOMEM;
+	}
+	dev->ext_priv = hexium;
+
+	/* enable i2c-port pins */
+	saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26));
+
+	hexium->i2c_adapter = (struct i2c_adapter) {
+		.name = "hexium gemini",
+	};
+	saa7146_i2c_adapter_prepare(dev, &hexium->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480);
+	if (i2c_add_adapter(&hexium->i2c_adapter) < 0) {
+		DEB_S("cannot register i2c-device. skipping.\n");
+		kfree(hexium);
+		return -EFAULT;
+	}
+
+	/*  set HWControl GPIO number 2 */
+	saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI);
+
+	saa7146_write(dev, DD1_INIT, 0x07000700);
+	saa7146_write(dev, DD1_STREAM_B, 0x00000000);
+	saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
+
+	/* the rest */
+	hexium->cur_input = 0;
+	hexium_init_done(dev);
+
+	hexium_set_standard(hexium, hexium_pal);
+	hexium->cur_std = V4L2_STD_PAL;
+
+	hexium_set_input(hexium, 0);
+	hexium->cur_input = 0;
+
+	saa7146_vv_init(dev, &vv_data);
+
+	vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input;
+	vv_data.vid_ops.vidioc_g_input = vidioc_g_input;
+	vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
+	ret = saa7146_register_device(&hexium->video_dev, dev, "hexium gemini", VFL_TYPE_GRABBER);
+	if (ret < 0) {
+		pr_err("cannot register capture v4l2 device. skipping.\n");
+		return ret;
+	}
+
+	pr_info("found 'hexium gemini' frame grabber-%d\n", hexium_num);
+	hexium_num++;
+
+	return 0;
+}
+
+static int hexium_detach(struct saa7146_dev *dev)
+{
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+
+	DEB_EE("dev:%p\n", dev);
+
+	saa7146_unregister_device(&hexium->video_dev, dev);
+	saa7146_vv_release(dev);
+
+	hexium_num--;
+
+	i2c_del_adapter(&hexium->i2c_adapter);
+	kfree(hexium);
+	return 0;
+}
+
+static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *std)
+{
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+
+	if (V4L2_STD_PAL == std->id) {
+		hexium_set_standard(hexium, hexium_pal);
+		hexium->cur_std = V4L2_STD_PAL;
+		return 0;
+	} else if (V4L2_STD_NTSC == std->id) {
+		hexium_set_standard(hexium, hexium_ntsc);
+		hexium->cur_std = V4L2_STD_NTSC;
+		return 0;
+	} else if (V4L2_STD_SECAM == std->id) {
+		hexium_set_standard(hexium, hexium_secam);
+		hexium->cur_std = V4L2_STD_SECAM;
+		return 0;
+	}
+
+	return -1;
+}
+
+static struct saa7146_extension hexium_extension;
+
+static struct saa7146_pci_extension_data hexium_gemini_4bnc = {
+	.ext_priv = "Hexium Gemini (4 BNC)",
+	.ext = &hexium_extension,
+};
+
+static struct saa7146_pci_extension_data hexium_gemini_dual_4bnc = {
+	.ext_priv = "Hexium Gemini Dual (4 BNC)",
+	.ext = &hexium_extension,
+};
+
+static struct pci_device_id pci_tbl[] = {
+	{
+	 .vendor = PCI_VENDOR_ID_PHILIPS,
+	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
+	 .subvendor = 0x17c8,
+	 .subdevice = 0x2401,
+	 .driver_data = (unsigned long) &hexium_gemini_4bnc,
+	 },
+	{
+	 .vendor = PCI_VENDOR_ID_PHILIPS,
+	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
+	 .subvendor = 0x17c8,
+	 .subdevice = 0x2402,
+	 .driver_data = (unsigned long) &hexium_gemini_dual_4bnc,
+	 },
+	{
+	 .vendor = 0,
+	 }
+};
+
+MODULE_DEVICE_TABLE(pci, pci_tbl);
+
+static struct saa7146_ext_vv vv_data = {
+	.inputs = HEXIUM_INPUTS,
+	.capabilities = 0,
+	.stds = &hexium_standards[0],
+	.num_stds = sizeof(hexium_standards) / sizeof(struct saa7146_standard),
+	.std_callback = &std_callback,
+};
+
+static struct saa7146_extension hexium_extension = {
+	.name = "hexium gemini",
+	.flags = SAA7146_USE_I2C_IRQ,
+
+	.pci_tbl = &pci_tbl[0],
+	.module = THIS_MODULE,
+
+	.attach = hexium_attach,
+	.detach = hexium_detach,
+
+	.irq_mask = 0,
+	.irq_func = NULL,
+};
+
+static int __init hexium_init_module(void)
+{
+	if (0 != saa7146_register_extension(&hexium_extension)) {
+		DEB_S("failed to register extension\n");
+		return -ENODEV;
+	}
+
+	return 0;
+}
+
+static void __exit hexium_cleanup_module(void)
+{
+	saa7146_unregister_extension(&hexium_extension);
+}
+
+module_init(hexium_init_module);
+module_exit(hexium_cleanup_module);
+
+MODULE_DESCRIPTION("video4linux-2 driver for Hexium Gemini frame grabber cards");
+MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
+MODULE_LICENSE("GPL");
diff --git a/drivers/media/pci/saa7146/hexium_orion.c b/drivers/media/pci/saa7146/hexium_orion.c
new file mode 100644
index 0000000..a1eb26d
--- /dev/null
+++ b/drivers/media/pci/saa7146/hexium_orion.c
@@ -0,0 +1,502 @@
+/*
+    hexium_orion.c - v4l2 driver for the Hexium Orion frame grabber cards
+
+    Visit http://www.mihu.de/linux/saa7146/ and follow the link
+    to "hexium" for further details about this card.
+
+    Copyright (C) 2003 Michael Hunold <michael@mihu.de>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#define DEBUG_VARIABLE debug
+
+#include <media/saa7146_vv.h>
+#include <linux/module.h>
+
+static int debug;
+module_param(debug, int, 0);
+MODULE_PARM_DESC(debug, "debug verbosity");
+
+/* global variables */
+static int hexium_num;
+
+#define HEXIUM_HV_PCI6_ORION		1
+#define HEXIUM_ORION_1SVHS_3BNC		2
+#define HEXIUM_ORION_4BNC		3
+
+#define HEXIUM_INPUTS	9
+static struct v4l2_input hexium_inputs[HEXIUM_INPUTS] = {
+	{ 0, "CVBS 1",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 1, "CVBS 2",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 2, "CVBS 3",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 3, "CVBS 4",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 4, "CVBS 5",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 5, "CVBS 6",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 6, "Y/C 1",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 7, "Y/C 2",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ 8, "Y/C 3",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+};
+
+#define HEXIUM_AUDIOS	0
+
+struct hexium_data
+{
+	s8 adr;
+	u8 byte;
+};
+
+struct hexium
+{
+	int type;
+	struct video_device	*video_dev;
+	struct i2c_adapter	i2c_adapter;
+
+	int cur_input;	/* current input */
+};
+
+/* Philips SAA7110 decoder default registers */
+static u8 hexium_saa7110[53]={
+/*00*/ 0x4C,0x3C,0x0D,0xEF,0xBD,0xF0,0x00,0x00,
+/*08*/ 0xF8,0xF8,0x60,0x60,0x40,0x86,0x18,0x90,
+/*10*/ 0x00,0x2C,0x40,0x46,0x42,0x1A,0xFF,0xDA,
+/*18*/ 0xF0,0x8B,0x00,0x00,0x00,0x00,0x00,0x00,
+/*20*/ 0xD9,0x17,0x40,0x41,0x80,0x41,0x80,0x4F,
+/*28*/ 0xFE,0x01,0x0F,0x0F,0x03,0x01,0x81,0x03,
+/*30*/ 0x44,0x75,0x01,0x8C,0x03
+};
+
+static struct {
+	struct hexium_data data[8];
+} hexium_input_select[] = {
+{
+	{ /* cvbs 1 */
+		{ 0x06, 0x00 },
+		{ 0x20, 0xD9 },
+		{ 0x21, 0x17 }, // 0x16,
+		{ 0x22, 0x40 },
+		{ 0x2C, 0x03 },
+		{ 0x30, 0x44 },
+		{ 0x31, 0x75 }, // ??
+		{ 0x21, 0x16 }, // 0x03,
+	}
+}, {
+	{ /* cvbs 2 */
+		{ 0x06, 0x00 },
+		{ 0x20, 0x78 },
+		{ 0x21, 0x07 }, // 0x03,
+		{ 0x22, 0xD2 },
+		{ 0x2C, 0x83 },
+		{ 0x30, 0x60 },
+		{ 0x31, 0xB5 }, // ?
+		{ 0x21, 0x03 },
+	}
+}, {
+	{ /* cvbs 3 */
+		{ 0x06, 0x00 },
+		{ 0x20, 0xBA },
+		{ 0x21, 0x07 }, // 0x05,
+		{ 0x22, 0x91 },
+		{ 0x2C, 0x03 },
+		{ 0x30, 0x60 },
+		{ 0x31, 0xB5 }, // ??
+		{ 0x21, 0x05 }, // 0x03,
+	}
+}, {
+	{ /* cvbs 4 */
+		{ 0x06, 0x00 },
+		{ 0x20, 0xD8 },
+		{ 0x21, 0x17 }, // 0x16,
+		{ 0x22, 0x40 },
+		{ 0x2C, 0x03 },
+		{ 0x30, 0x44 },
+		{ 0x31, 0x75 }, // ??
+		{ 0x21, 0x16 }, // 0x03,
+	}
+}, {
+	{ /* cvbs 5 */
+		{ 0x06, 0x00 },
+		{ 0x20, 0xB8 },
+		{ 0x21, 0x07 }, // 0x05,
+		{ 0x22, 0x91 },
+		{ 0x2C, 0x03 },
+		{ 0x30, 0x60 },
+		{ 0x31, 0xB5 }, // ??
+		{ 0x21, 0x05 }, // 0x03,
+	}
+}, {
+	{ /* cvbs 6 */
+		{ 0x06, 0x00 },
+		{ 0x20, 0x7C },
+		{ 0x21, 0x07 }, // 0x03
+		{ 0x22, 0xD2 },
+		{ 0x2C, 0x83 },
+		{ 0x30, 0x60 },
+		{ 0x31, 0xB5 }, // ??
+		{ 0x21, 0x03 },
+	}
+}, {
+	{ /* y/c 1 */
+		{ 0x06, 0x80 },
+		{ 0x20, 0x59 },
+		{ 0x21, 0x17 },
+		{ 0x22, 0x42 },
+		{ 0x2C, 0xA3 },
+		{ 0x30, 0x44 },
+		{ 0x31, 0x75 },
+		{ 0x21, 0x12 },
+	}
+}, {
+	{ /* y/c 2 */
+		{ 0x06, 0x80 },
+		{ 0x20, 0x9A },
+		{ 0x21, 0x17 },
+		{ 0x22, 0xB1 },
+		{ 0x2C, 0x13 },
+		{ 0x30, 0x60 },
+		{ 0x31, 0xB5 },
+		{ 0x21, 0x14 },
+	}
+}, {
+	{ /* y/c 3 */
+		{ 0x06, 0x80 },
+		{ 0x20, 0x3C },
+		{ 0x21, 0x27 },
+		{ 0x22, 0xC1 },
+		{ 0x2C, 0x23 },
+		{ 0x30, 0x44 },
+		{ 0x31, 0x75 },
+		{ 0x21, 0x21 },
+	}
+}
+};
+
+static struct saa7146_standard hexium_standards[] = {
+	{
+		.name	= "PAL", 	.id	= V4L2_STD_PAL,
+		.v_offset	= 16,	.v_field 	= 288,
+		.h_offset	= 1,	.h_pixels 	= 680,
+		.v_max_out	= 576,	.h_max_out	= 768,
+	}, {
+		.name	= "NTSC", 	.id	= V4L2_STD_NTSC,
+		.v_offset	= 16,	.v_field 	= 240,
+		.h_offset	= 1,	.h_pixels 	= 640,
+		.v_max_out	= 480,	.h_max_out	= 640,
+	}, {
+		.name	= "SECAM", 	.id	= V4L2_STD_SECAM,
+		.v_offset	= 16,	.v_field 	= 288,
+		.h_offset	= 1,	.h_pixels 	= 720,
+		.v_max_out	= 576,	.h_max_out	= 768,
+	}
+};
+
+/* this is only called for old HV-PCI6/Orion cards
+   without eeprom */
+static int hexium_probe(struct saa7146_dev *dev)
+{
+	struct hexium *hexium = NULL;
+	union i2c_smbus_data data;
+	int err = 0;
+
+	DEB_EE("\n");
+
+	/* there are no hexium orion cards with revision 0 saa7146s */
+	if (0 == dev->revision) {
+		return -EFAULT;
+	}
+
+	hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL);
+	if (NULL == hexium) {
+		pr_err("hexium_probe: not enough kernel memory\n");
+		return -ENOMEM;
+	}
+
+	/* enable i2c-port pins */
+	saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26));
+
+	saa7146_write(dev, DD1_INIT, 0x01000100);
+	saa7146_write(dev, DD1_STREAM_B, 0x00000000);
+	saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
+
+	hexium->i2c_adapter = (struct i2c_adapter) {
+		.name = "hexium orion",
+	};
+	saa7146_i2c_adapter_prepare(dev, &hexium->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480);
+	if (i2c_add_adapter(&hexium->i2c_adapter) < 0) {
+		DEB_S("cannot register i2c-device. skipping.\n");
+		kfree(hexium);
+		return -EFAULT;
+	}
+
+	/* set SAA7110 control GPIO 0 */
+	saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTHI);
+	/*  set HWControl GPIO number 2 */
+	saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI);
+
+	mdelay(10);
+
+	/* detect newer Hexium Orion cards by subsystem ids */
+	if (0x17c8 == dev->pci->subsystem_vendor && 0x0101 == dev->pci->subsystem_device) {
+		pr_info("device is a Hexium Orion w/ 1 SVHS + 3 BNC inputs\n");
+		/* we store the pointer in our private data field */
+		dev->ext_priv = hexium;
+		hexium->type = HEXIUM_ORION_1SVHS_3BNC;
+		return 0;
+	}
+
+	if (0x17c8 == dev->pci->subsystem_vendor && 0x2101 == dev->pci->subsystem_device) {
+		pr_info("device is a Hexium Orion w/ 4 BNC inputs\n");
+		/* we store the pointer in our private data field */
+		dev->ext_priv = hexium;
+		hexium->type = HEXIUM_ORION_4BNC;
+		return 0;
+	}
+
+	/* check if this is an old hexium Orion card by looking at
+	   a saa7110 at address 0x4e */
+	if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) {
+		pr_info("device is a Hexium HV-PCI6/Orion (old)\n");
+		/* we store the pointer in our private data field */
+		dev->ext_priv = hexium;
+		hexium->type = HEXIUM_HV_PCI6_ORION;
+		return 0;
+	}
+
+	i2c_del_adapter(&hexium->i2c_adapter);
+	kfree(hexium);
+	return -EFAULT;
+}
+
+/* bring hardware to a sane state. this has to be done, just in case someone
+   wants to capture from this device before it has been properly initialized.
+   the capture engine would badly fail, because no valid signal arrives on the
+   saa7146, thus leading to timeouts and stuff. */
+static int hexium_init_done(struct saa7146_dev *dev)
+{
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+	union i2c_smbus_data data;
+	int i = 0;
+
+	DEB_D("hexium_init_done called\n");
+
+	/* initialize the helper ics to useful values */
+	for (i = 0; i < sizeof(hexium_saa7110); i++) {
+		data.byte = hexium_saa7110[i];
+		if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_WRITE, i, I2C_SMBUS_BYTE_DATA, &data)) {
+			pr_err("failed for address 0x%02x\n", i);
+		}
+	}
+
+	return 0;
+}
+
+static int hexium_set_input(struct hexium *hexium, int input)
+{
+	union i2c_smbus_data data;
+	int i = 0;
+
+	DEB_D("\n");
+
+	for (i = 0; i < 8; i++) {
+		int adr = hexium_input_select[input].data[i].adr;
+		data.byte = hexium_input_select[input].data[i].byte;
+		if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_WRITE, adr, I2C_SMBUS_BYTE_DATA, &data)) {
+			return -1;
+		}
+		pr_debug("%d: 0x%02x => 0x%02x\n", input, adr, data.byte);
+	}
+
+	return 0;
+}
+
+static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
+{
+	DEB_EE("VIDIOC_ENUMINPUT %d\n", i->index);
+
+	if (i->index >= HEXIUM_INPUTS)
+		return -EINVAL;
+
+	memcpy(i, &hexium_inputs[i->index], sizeof(struct v4l2_input));
+
+	DEB_D("v4l2_ioctl: VIDIOC_ENUMINPUT %d\n", i->index);
+	return 0;
+}
+
+static int vidioc_g_input(struct file *file, void *fh, unsigned int *input)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+
+	*input = hexium->cur_input;
+
+	DEB_D("VIDIOC_G_INPUT: %d\n", *input);
+	return 0;
+}
+
+static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+
+	if (input >= HEXIUM_INPUTS)
+		return -EINVAL;
+
+	hexium->cur_input = input;
+	hexium_set_input(hexium, input);
+
+	return 0;
+}
+
+static struct saa7146_ext_vv vv_data;
+
+/* this function only gets called when the probing was successful */
+static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
+{
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+
+	DEB_EE("\n");
+
+	saa7146_vv_init(dev, &vv_data);
+	vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input;
+	vv_data.vid_ops.vidioc_g_input = vidioc_g_input;
+	vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
+	if (0 != saa7146_register_device(&hexium->video_dev, dev, "hexium orion", VFL_TYPE_GRABBER)) {
+		pr_err("cannot register capture v4l2 device. skipping.\n");
+		return -1;
+	}
+
+	pr_err("found 'hexium orion' frame grabber-%d\n", hexium_num);
+	hexium_num++;
+
+	/* the rest */
+	hexium->cur_input = 0;
+	hexium_init_done(dev);
+
+	return 0;
+}
+
+static int hexium_detach(struct saa7146_dev *dev)
+{
+	struct hexium *hexium = (struct hexium *) dev->ext_priv;
+
+	DEB_EE("dev:%p\n", dev);
+
+	saa7146_unregister_device(&hexium->video_dev, dev);
+	saa7146_vv_release(dev);
+
+	hexium_num--;
+
+	i2c_del_adapter(&hexium->i2c_adapter);
+	kfree(hexium);
+	return 0;
+}
+
+static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *std)
+{
+	return 0;
+}
+
+static struct saa7146_extension extension;
+
+static struct saa7146_pci_extension_data hexium_hv_pci6 = {
+	.ext_priv = "Hexium HV-PCI6 / Orion",
+	.ext = &extension,
+};
+
+static struct saa7146_pci_extension_data hexium_orion_1svhs_3bnc = {
+	.ext_priv = "Hexium HV-PCI6 / Orion (1 SVHS/3 BNC)",
+	.ext = &extension,
+};
+
+static struct saa7146_pci_extension_data hexium_orion_4bnc = {
+	.ext_priv = "Hexium HV-PCI6 / Orion (4 BNC)",
+	.ext = &extension,
+};
+
+static struct pci_device_id pci_tbl[] = {
+	{
+	 .vendor = PCI_VENDOR_ID_PHILIPS,
+	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
+	 .subvendor = 0x0000,
+	 .subdevice = 0x0000,
+	 .driver_data = (unsigned long) &hexium_hv_pci6,
+	 },
+	{
+	 .vendor = PCI_VENDOR_ID_PHILIPS,
+	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
+	 .subvendor = 0x17c8,
+	 .subdevice = 0x0101,
+	 .driver_data = (unsigned long) &hexium_orion_1svhs_3bnc,
+	 },
+	{
+	 .vendor = PCI_VENDOR_ID_PHILIPS,
+	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
+	 .subvendor = 0x17c8,
+	 .subdevice = 0x2101,
+	 .driver_data = (unsigned long) &hexium_orion_4bnc,
+	 },
+	{
+	 .vendor = 0,
+	 }
+};
+
+MODULE_DEVICE_TABLE(pci, pci_tbl);
+
+static struct saa7146_ext_vv vv_data = {
+	.inputs = HEXIUM_INPUTS,
+	.capabilities = 0,
+	.stds = &hexium_standards[0],
+	.num_stds = sizeof(hexium_standards) / sizeof(struct saa7146_standard),
+	.std_callback = &std_callback,
+};
+
+static struct saa7146_extension extension = {
+	.name = "hexium HV-PCI6 Orion",
+	.flags = 0,		// SAA7146_USE_I2C_IRQ,
+
+	.pci_tbl = &pci_tbl[0],
+	.module = THIS_MODULE,
+
+	.probe = hexium_probe,
+	.attach = hexium_attach,
+	.detach = hexium_detach,
+
+	.irq_mask = 0,
+	.irq_func = NULL,
+};
+
+static int __init hexium_init_module(void)
+{
+	if (0 != saa7146_register_extension(&extension)) {
+		DEB_S("failed to register extension\n");
+		return -ENODEV;
+	}
+
+	return 0;
+}
+
+static void __exit hexium_cleanup_module(void)
+{
+	saa7146_unregister_extension(&extension);
+}
+
+module_init(hexium_init_module);
+module_exit(hexium_cleanup_module);
+
+MODULE_DESCRIPTION("video4linux-2 driver for Hexium Orion frame grabber cards");
+MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
+MODULE_LICENSE("GPL");
diff --git a/drivers/media/pci/saa7146/mxb.c b/drivers/media/pci/saa7146/mxb.c
new file mode 100644
index 0000000..b520a45
--- /dev/null
+++ b/drivers/media/pci/saa7146/mxb.c
@@ -0,0 +1,886 @@
+/*
+    mxb - v4l2 driver for the Multimedia eXtension Board
+
+    Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de>
+
+    Visit http://www.themm.net/~mihu/linux/saa7146/mxb.html 
+    for further details about this card.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#define DEBUG_VARIABLE debug
+
+#include <media/saa7146_vv.h>
+#include <media/tuner.h>
+#include <media/v4l2-common.h>
+#include <media/saa7115.h>
+#include <linux/module.h>
+
+#include "tea6415c.h"
+#include "tea6420.h"
+
+#define MXB_AUDIOS	6
+
+#define I2C_SAA7111A  0x24
+#define	I2C_TDA9840   0x42
+#define	I2C_TEA6415C  0x43
+#define	I2C_TEA6420_1 0x4c
+#define	I2C_TEA6420_2 0x4d
+#define	I2C_TUNER     0x60
+
+#define MXB_BOARD_CAN_DO_VBI(dev)   (dev->revision != 0)
+
+/* global variable */
+static int mxb_num;
+
+/* initial frequence the tuner will be tuned to.
+   in verden (lower saxony, germany) 4148 is a
+   channel called "phoenix" */
+static int freq = 4148;
+module_param(freq, int, 0644);
+MODULE_PARM_DESC(freq, "initial frequency the tuner will be tuned to while setup");
+
+static int debug;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
+
+#define MXB_INPUTS 4
+enum { TUNER, AUX1, AUX3, AUX3_YC };
+
+static struct v4l2_input mxb_inputs[MXB_INPUTS] = {
+	{ TUNER,   "Tuner",          V4L2_INPUT_TYPE_TUNER,  0x3f, 0,
+		V4L2_STD_PAL_BG | V4L2_STD_PAL_I, 0, V4L2_IN_CAP_STD },
+	{ AUX1,	   "AUX1",           V4L2_INPUT_TYPE_CAMERA, 0x3f, 0,
+		V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ AUX3,	   "AUX3 Composite", V4L2_INPUT_TYPE_CAMERA, 0x3f, 0,
+		V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+	{ AUX3_YC, "AUX3 S-Video",   V4L2_INPUT_TYPE_CAMERA, 0x3f, 0,
+		V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
+};
+
+/* this array holds the information, which port of the saa7146 each
+   input actually uses. the mxb uses port 0 for every input */
+static struct {
+	int hps_source;
+	int hps_sync;
+} input_port_selection[MXB_INPUTS] = {
+	{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
+	{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
+	{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
+	{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
+};
+
+/* this array holds the information of the audio source (mxb_audios),
+   which has to be switched corresponding to the video source (mxb_channels) */
+static int video_audio_connect[MXB_INPUTS] =
+	{ 0, 1, 3, 3 };
+
+struct mxb_routing {
+	u32 input;
+	u32 output;
+};
+
+/* these are the available audio sources, which can switched
+   to the line- and cd-output individually */
+static struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
+	    {
+		.index	= 0,
+		.name	= "Tuner",
+		.capability = V4L2_AUDCAP_STEREO,
+	} , {
+		.index	= 1,
+		.name	= "AUX1",
+		.capability = V4L2_AUDCAP_STEREO,
+	} , {
+		.index	= 2,
+		.name	= "AUX2",
+		.capability = V4L2_AUDCAP_STEREO,
+	} , {
+		.index	= 3,
+		.name	= "AUX3",
+		.capability = V4L2_AUDCAP_STEREO,
+	} , {
+		.index	= 4,
+		.name	= "Radio (X9)",
+		.capability = V4L2_AUDCAP_STEREO,
+	} , {
+		.index	= 5,
+		.name	= "CD-ROM (X10)",
+		.capability = V4L2_AUDCAP_STEREO,
+	}
+};
+
+/* These are the necessary input-output-pins for bringing one audio source
+   (see above) to the CD-output. Note that gain is set to 0 in this table. */
+static struct mxb_routing TEA6420_cd[MXB_AUDIOS + 1][2] = {
+	{ { 1, 1 }, { 1, 1 } },	/* Tuner */
+	{ { 5, 1 }, { 6, 1 } },	/* AUX 1 */
+	{ { 4, 1 }, { 6, 1 } },	/* AUX 2 */
+	{ { 3, 1 }, { 6, 1 } },	/* AUX 3 */
+	{ { 1, 1 }, { 3, 1 } },	/* Radio */
+	{ { 1, 1 }, { 2, 1 } },	/* CD-Rom */
+	{ { 6, 1 }, { 6, 1 } }	/* Mute */
+};
+
+/* These are the necessary input-output-pins for bringing one audio source
+   (see above) to the line-output. Note that gain is set to 0 in this table. */
+static struct mxb_routing TEA6420_line[MXB_AUDIOS + 1][2] = {
+	{ { 2, 3 }, { 1, 2 } },
+	{ { 5, 3 }, { 6, 2 } },
+	{ { 4, 3 }, { 6, 2 } },
+	{ { 3, 3 }, { 6, 2 } },
+	{ { 2, 3 }, { 3, 2 } },
+	{ { 2, 3 }, { 2, 2 } },
+	{ { 6, 3 }, { 6, 2 } }	/* Mute */
+};
+
+struct mxb
+{
+	struct video_device	*video_dev;
+	struct video_device	*vbi_dev;
+
+	struct i2c_adapter	i2c_adapter;
+
+	struct v4l2_subdev	*saa7111a;
+	struct v4l2_subdev	*tda9840;
+	struct v4l2_subdev	*tea6415c;
+	struct v4l2_subdev	*tuner;
+	struct v4l2_subdev	*tea6420_1;
+	struct v4l2_subdev	*tea6420_2;
+
+	int	cur_mode;	/* current audio mode (mono, stereo, ...) */
+	int	cur_input;	/* current input */
+	int	cur_audinput;	/* current audio input */
+	int	cur_mute;	/* current mute status */
+	struct v4l2_frequency	cur_freq;	/* current frequency the tuner is tuned to */
+};
+
+#define saa7111a_call(mxb, o, f, args...) \
+	v4l2_subdev_call(mxb->saa7111a, o, f, ##args)
+#define tda9840_call(mxb, o, f, args...) \
+	v4l2_subdev_call(mxb->tda9840, o, f, ##args)
+#define tea6415c_call(mxb, o, f, args...) \
+	v4l2_subdev_call(mxb->tea6415c, o, f, ##args)
+#define tuner_call(mxb, o, f, args...) \
+	v4l2_subdev_call(mxb->tuner, o, f, ##args)
+#define call_all(dev, o, f, args...) \
+	v4l2_device_call_until_err(&dev->v4l2_dev, 0, o, f, ##args)
+
+static void mxb_update_audmode(struct mxb *mxb)
+{
+	struct v4l2_tuner t = {
+		.audmode = mxb->cur_mode,
+	};
+
+	tda9840_call(mxb, tuner, s_tuner, &t);
+}
+
+static inline void tea6420_route(struct mxb *mxb, int idx)
+{
+	v4l2_subdev_call(mxb->tea6420_1, audio, s_routing,
+		TEA6420_cd[idx][0].input, TEA6420_cd[idx][0].output, 0);
+	v4l2_subdev_call(mxb->tea6420_2, audio, s_routing,
+		TEA6420_cd[idx][1].input, TEA6420_cd[idx][1].output, 0);
+	v4l2_subdev_call(mxb->tea6420_1, audio, s_routing,
+		TEA6420_line[idx][0].input, TEA6420_line[idx][0].output, 0);
+	v4l2_subdev_call(mxb->tea6420_2, audio, s_routing,
+		TEA6420_line[idx][1].input, TEA6420_line[idx][1].output, 0);
+}
+
+static struct saa7146_extension extension;
+
+static int mxb_s_ctrl(struct v4l2_ctrl *ctrl)
+{
+	struct saa7146_dev *dev = container_of(ctrl->handler,
+				struct saa7146_dev, ctrl_handler);
+	struct mxb *mxb = dev->ext_priv;
+
+	switch (ctrl->id) {
+	case V4L2_CID_AUDIO_MUTE:
+		mxb->cur_mute = ctrl->val;
+		/* switch the audio-source */
+		tea6420_route(mxb, ctrl->val ? 6 :
+				video_audio_connect[mxb->cur_input]);
+		break;
+	default:
+		return -EINVAL;
+	}
+	return 0;
+}
+
+static const struct v4l2_ctrl_ops mxb_ctrl_ops = {
+	.s_ctrl = mxb_s_ctrl,
+};
+
+static int mxb_probe(struct saa7146_dev *dev)
+{
+	struct v4l2_ctrl_handler *hdl = &dev->ctrl_handler;
+	struct mxb *mxb = NULL;
+
+	v4l2_ctrl_new_std(hdl, &mxb_ctrl_ops,
+			V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1);
+	if (hdl->error)
+		return hdl->error;
+	mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL);
+	if (mxb == NULL) {
+		DEB_D("not enough kernel memory\n");
+		return -ENOMEM;
+	}
+
+
+	snprintf(mxb->i2c_adapter.name, sizeof(mxb->i2c_adapter.name), "mxb%d", mxb_num);
+
+	saa7146_i2c_adapter_prepare(dev, &mxb->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480);
+	if (i2c_add_adapter(&mxb->i2c_adapter) < 0) {
+		DEB_S("cannot register i2c-device. skipping.\n");
+		kfree(mxb);
+		return -EFAULT;
+	}
+
+	mxb->saa7111a = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+			"saa7111", I2C_SAA7111A, NULL);
+	mxb->tea6420_1 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+			"tea6420", I2C_TEA6420_1, NULL);
+	mxb->tea6420_2 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+			"tea6420", I2C_TEA6420_2, NULL);
+	mxb->tea6415c = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+			"tea6415c", I2C_TEA6415C, NULL);
+	mxb->tda9840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+			"tda9840", I2C_TDA9840, NULL);
+	mxb->tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+			"tuner", I2C_TUNER, NULL);
+
+	/* check if all devices are present */
+	if (!mxb->tea6420_1 || !mxb->tea6420_2 || !mxb->tea6415c ||
+	    !mxb->tda9840 || !mxb->saa7111a || !mxb->tuner) {
+		pr_err("did not find all i2c devices. aborting\n");
+		i2c_del_adapter(&mxb->i2c_adapter);
+		kfree(mxb);
+		return -ENODEV;
+	}
+
+	/* all devices are present, probe was successful */
+
+	/* we store the pointer in our private data field */
+	dev->ext_priv = mxb;
+
+	v4l2_ctrl_handler_setup(hdl);
+
+	return 0;
+}
+
+/* some init data for the saa7740, the so-called 'sound arena module'.
+   there are no specs available, so we simply use some init values */
+static struct {
+	int	length;
+	char	data[9];
+} mxb_saa7740_init[] = {
+	{ 3, { 0x80, 0x00, 0x00 } },{ 3, { 0x80, 0x89, 0x00 } },
+	{ 3, { 0x80, 0xb0, 0x0a } },{ 3, { 0x00, 0x00, 0x00 } },
+	{ 3, { 0x49, 0x00, 0x00 } },{ 3, { 0x4a, 0x00, 0x00 } },
+	{ 3, { 0x4b, 0x00, 0x00 } },{ 3, { 0x4c, 0x00, 0x00 } },
+	{ 3, { 0x4d, 0x00, 0x00 } },{ 3, { 0x4e, 0x00, 0x00 } },
+	{ 3, { 0x4f, 0x00, 0x00 } },{ 3, { 0x50, 0x00, 0x00 } },
+	{ 3, { 0x51, 0x00, 0x00 } },{ 3, { 0x52, 0x00, 0x00 } },
+	{ 3, { 0x53, 0x00, 0x00 } },{ 3, { 0x54, 0x00, 0x00 } },
+	{ 3, { 0x55, 0x00, 0x00 } },{ 3, { 0x56, 0x00, 0x00 } },
+	{ 3, { 0x57, 0x00, 0x00 } },{ 3, { 0x58, 0x00, 0x00 } },
+	{ 3, { 0x59, 0x00, 0x00 } },{ 3, { 0x5a, 0x00, 0x00 } },
+	{ 3, { 0x5b, 0x00, 0x00 } },{ 3, { 0x5c, 0x00, 0x00 } },
+	{ 3, { 0x5d, 0x00, 0x00 } },{ 3, { 0x5e, 0x00, 0x00 } },
+	{ 3, { 0x5f, 0x00, 0x00 } },{ 3, { 0x60, 0x00, 0x00 } },
+	{ 3, { 0x61, 0x00, 0x00 } },{ 3, { 0x62, 0x00, 0x00 } },
+	{ 3, { 0x63, 0x00, 0x00 } },{ 3, { 0x64, 0x00, 0x00 } },
+	{ 3, { 0x65, 0x00, 0x00 } },{ 3, { 0x66, 0x00, 0x00 } },
+	{ 3, { 0x67, 0x00, 0x00 } },{ 3, { 0x68, 0x00, 0x00 } },
+	{ 3, { 0x69, 0x00, 0x00 } },{ 3, { 0x6a, 0x00, 0x00 } },
+	{ 3, { 0x6b, 0x00, 0x00 } },{ 3, { 0x6c, 0x00, 0x00 } },
+	{ 3, { 0x6d, 0x00, 0x00 } },{ 3, { 0x6e, 0x00, 0x00 } },
+	{ 3, { 0x6f, 0x00, 0x00 } },{ 3, { 0x70, 0x00, 0x00 } },
+	{ 3, { 0x71, 0x00, 0x00 } },{ 3, { 0x72, 0x00, 0x00 } },
+	{ 3, { 0x73, 0x00, 0x00 } },{ 3, { 0x74, 0x00, 0x00 } },
+	{ 3, { 0x75, 0x00, 0x00 } },{ 3, { 0x76, 0x00, 0x00 } },
+	{ 3, { 0x77, 0x00, 0x00 } },{ 3, { 0x41, 0x00, 0x42 } },
+	{ 3, { 0x42, 0x10, 0x42 } },{ 3, { 0x43, 0x20, 0x42 } },
+	{ 3, { 0x44, 0x30, 0x42 } },{ 3, { 0x45, 0x00, 0x01 } },
+	{ 3, { 0x46, 0x00, 0x01 } },{ 3, { 0x47, 0x00, 0x01 } },
+	{ 3, { 0x48, 0x00, 0x01 } },
+	{ 9, { 0x01, 0x03, 0xc5, 0x5c, 0x7a, 0x85, 0x01, 0x00, 0x54 } },
+	{ 9, { 0x21, 0x03, 0xc5, 0x5c, 0x7a, 0x85, 0x01, 0x00, 0x54 } },
+	{ 9, { 0x09, 0x0b, 0xb4, 0x6b, 0x74, 0x85, 0x95, 0x00, 0x34 } },
+	{ 9, { 0x29, 0x0b, 0xb4, 0x6b, 0x74, 0x85, 0x95, 0x00, 0x34 } },
+	{ 9, { 0x11, 0x17, 0x43, 0x62, 0x68, 0x89, 0xd1, 0xff, 0xb0 } },
+	{ 9, { 0x31, 0x17, 0x43, 0x62, 0x68, 0x89, 0xd1, 0xff, 0xb0 } },
+	{ 9, { 0x19, 0x20, 0x62, 0x51, 0x5a, 0x95, 0x19, 0x01, 0x50 } },
+	{ 9, { 0x39, 0x20, 0x62, 0x51, 0x5a, 0x95, 0x19, 0x01, 0x50 } },
+	{ 9, { 0x05, 0x3e, 0xd2, 0x69, 0x4e, 0x9a, 0x51, 0x00, 0xf0 } },
+	{ 9, { 0x25, 0x3e, 0xd2, 0x69, 0x4e, 0x9a, 0x51, 0x00, 0xf0 } },
+	{ 9, { 0x0d, 0x3d, 0xa1, 0x40, 0x7d, 0x9f, 0x29, 0xfe, 0x14 } },
+	{ 9, { 0x2d, 0x3d, 0xa1, 0x40, 0x7d, 0x9f, 0x29, 0xfe, 0x14 } },
+	{ 9, { 0x15, 0x73, 0xa1, 0x50, 0x5d, 0xa6, 0xf5, 0xfe, 0x38 } },
+	{ 9, { 0x35, 0x73, 0xa1, 0x50, 0x5d, 0xa6, 0xf5, 0xfe, 0x38 } },
+	{ 9, { 0x1d, 0xed, 0xd0, 0x68, 0x29, 0xb4, 0xe1, 0x00, 0xb8 } },
+	{ 9, { 0x3d, 0xed, 0xd0, 0x68, 0x29, 0xb4, 0xe1, 0x00, 0xb8 } },
+	{ 3, { 0x80, 0xb3, 0x0a } },
+	{-1, { 0 } }
+};
+
+/* bring hardware to a sane state. this has to be done, just in case someone
+   wants to capture from this device before it has been properly initialized.
+   the capture engine would badly fail, because no valid signal arrives on the
+   saa7146, thus leading to timeouts and stuff. */
+static int mxb_init_done(struct saa7146_dev* dev)
+{
+	struct mxb* mxb = (struct mxb*)dev->ext_priv;
+	struct i2c_msg msg;
+	struct tuner_setup tun_setup;
+	v4l2_std_id std = V4L2_STD_PAL_BG;
+
+	int i = 0, err = 0;
+
+	/* mute audio on tea6420s */
+	tea6420_route(mxb, 6);
+
+	/* select video mode in saa7111a */
+	saa7111a_call(mxb, core, s_std, std);
+
+	/* select tuner-output on saa7111a */
+	i = 0;
+	saa7111a_call(mxb, video, s_routing, SAA7115_COMPOSITE0,
+		SAA7111_FMT_CCIR, 0);
+
+	/* select a tuner type */
+	tun_setup.mode_mask = T_ANALOG_TV;
+	tun_setup.addr = ADDR_UNSET;
+	tun_setup.type = TUNER_PHILIPS_PAL;
+	tuner_call(mxb, tuner, s_type_addr, &tun_setup);
+	/* tune in some frequency on tuner */
+	mxb->cur_freq.tuner = 0;
+	mxb->cur_freq.type = V4L2_TUNER_ANALOG_TV;
+	mxb->cur_freq.frequency = freq;
+	tuner_call(mxb, tuner, s_frequency, &mxb->cur_freq);
+
+	/* set a default video standard */
+	/* These two gpio calls set the GPIO pins that control the tda9820 */
+	saa7146_write(dev, GPIO_CTRL, 0x00404050);
+	saa7111a_call(mxb, core, s_gpio, 1);
+	saa7111a_call(mxb, core, s_std, std);
+	tuner_call(mxb, core, s_std, std);
+
+	/* switch to tuner-channel on tea6415c */
+	tea6415c_call(mxb, video, s_routing, 3, 17, 0);
+
+	/* select tuner-output on multicable on tea6415c */
+	tea6415c_call(mxb, video, s_routing, 3, 13, 0);
+
+	/* the rest for mxb */
+	mxb->cur_input = 0;
+	mxb->cur_audinput = video_audio_connect[mxb->cur_input];
+	mxb->cur_mute = 1;
+
+	mxb->cur_mode = V4L2_TUNER_MODE_STEREO;
+	mxb_update_audmode(mxb);
+
+	/* check if the saa7740 (aka 'sound arena module') is present
+	   on the mxb. if so, we must initialize it. due to lack of
+	   informations about the saa7740, the values were reverse
+	   engineered. */
+	msg.addr = 0x1b;
+	msg.flags = 0;
+	msg.len = mxb_saa7740_init[0].length;
+	msg.buf = &mxb_saa7740_init[0].data[0];
+
+	err = i2c_transfer(&mxb->i2c_adapter, &msg, 1);
+	if (err == 1) {
+		/* the sound arena module is a pos, that's probably the reason
+		   philips refuses to hand out a datasheet for the saa7740...
+		   it seems to screw up the i2c bus, so we disable fast irq
+		   based i2c transactions here and rely on the slow and safe
+		   polling method ... */
+		extension.flags &= ~SAA7146_USE_I2C_IRQ;
+		for (i = 1; ; i++) {
+			if (-1 == mxb_saa7740_init[i].length)
+				break;
+
+			msg.len = mxb_saa7740_init[i].length;
+			msg.buf = &mxb_saa7740_init[i].data[0];
+			err = i2c_transfer(&mxb->i2c_adapter, &msg, 1);
+			if (err != 1) {
+				DEB_D("failed to initialize 'sound arena module'\n");
+				goto err;
+			}
+		}
+		pr_info("'sound arena module' detected\n");
+	}
+err:
+	/* the rest for saa7146: you should definitely set some basic values
+	   for the input-port handling of the saa7146. */
+
+	/* ext->saa has been filled by the core driver */
+
+	/* some stuff is done via variables */
+	saa7146_set_hps_source_and_sync(dev, input_port_selection[mxb->cur_input].hps_source,
+			input_port_selection[mxb->cur_input].hps_sync);
+
+	/* some stuff is done via direct write to the registers */
+
+	/* this is ugly, but because of the fact that this is completely
+	   hardware dependend, it should be done directly... */
+	saa7146_write(dev, DD1_STREAM_B,	0x00000000);
+	saa7146_write(dev, DD1_INIT,		0x02000200);
+	saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
+
+	return 0;
+}
+
+/* interrupt-handler. this gets called when irq_mask is != 0.
+   it must clear the interrupt-bits in irq_mask it has handled */
+/*
+void mxb_irq_bh(struct saa7146_dev* dev, u32* irq_mask)
+{
+	struct mxb* mxb = (struct mxb*)dev->ext_priv;
+}
+*/
+
+static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
+{
+	DEB_EE("VIDIOC_ENUMINPUT %d\n", i->index);
+	if (i->index >= MXB_INPUTS)
+		return -EINVAL;
+	memcpy(i, &mxb_inputs[i->index], sizeof(struct v4l2_input));
+	return 0;
+}
+
+static int vidioc_g_input(struct file *file, void *fh, unsigned int *i)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+	*i = mxb->cur_input;
+
+	DEB_EE("VIDIOC_G_INPUT %d\n", *i);
+	return 0;
+}
+
+static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+	int err = 0;
+	int i = 0;
+
+	DEB_EE("VIDIOC_S_INPUT %d\n", input);
+
+	if (input >= MXB_INPUTS)
+		return -EINVAL;
+
+	mxb->cur_input = input;
+
+	saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source,
+			input_port_selection[input].hps_sync);
+
+	/* prepare switching of tea6415c and saa7111a;
+	   have a look at the 'background'-file for further informations  */
+	switch (input) {
+	case TUNER:
+		i = SAA7115_COMPOSITE0;
+
+		err = tea6415c_call(mxb, video, s_routing, 3, 17, 0);
+
+		/* connect tuner-output always to multicable */
+		if (!err)
+			err = tea6415c_call(mxb, video, s_routing, 3, 13, 0);
+		break;
+	case AUX3_YC:
+		/* nothing to be done here. aux3_yc is
+		   directly connected to the saa711a */
+		i = SAA7115_SVIDEO1;
+		break;
+	case AUX3:
+		/* nothing to be done here. aux3 is
+		   directly connected to the saa711a */
+		i = SAA7115_COMPOSITE1;
+		break;
+	case AUX1:
+		i = SAA7115_COMPOSITE0;
+		err = tea6415c_call(mxb, video, s_routing, 1, 17, 0);
+		break;
+	}
+
+	if (err)
+		return err;
+
+	/* switch video in saa7111a */
+	if (saa7111a_call(mxb, video, s_routing, i, SAA7111_FMT_CCIR, 0))
+		pr_err("VIDIOC_S_INPUT: could not address saa7111a\n");
+
+	mxb->cur_audinput = video_audio_connect[input];
+	/* switch the audio-source only if necessary */
+	if (0 == mxb->cur_mute)
+		tea6420_route(mxb, mxb->cur_audinput);
+	if (mxb->cur_audinput == 0)
+		mxb_update_audmode(mxb);
+
+	return 0;
+}
+
+static int vidioc_g_tuner(struct file *file, void *fh, struct v4l2_tuner *t)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+
+	if (t->index) {
+		DEB_D("VIDIOC_G_TUNER: channel %d does not have a tuner attached\n",
+		      t->index);
+		return -EINVAL;
+	}
+
+	DEB_EE("VIDIOC_G_TUNER: %d\n", t->index);
+
+	memset(t, 0, sizeof(*t));
+	strlcpy(t->name, "TV Tuner", sizeof(t->name));
+	t->type = V4L2_TUNER_ANALOG_TV;
+	t->capability = V4L2_TUNER_CAP_NORM | V4L2_TUNER_CAP_STEREO |
+			V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2 | V4L2_TUNER_CAP_SAP;
+	t->audmode = mxb->cur_mode;
+	return call_all(dev, tuner, g_tuner, t);
+}
+
+static int vidioc_s_tuner(struct file *file, void *fh, struct v4l2_tuner *t)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+
+	if (t->index) {
+		DEB_D("VIDIOC_S_TUNER: channel %d does not have a tuner attached\n",
+		      t->index);
+		return -EINVAL;
+	}
+
+	mxb->cur_mode = t->audmode;
+	return call_all(dev, tuner, s_tuner, t);
+}
+
+static int vidioc_querystd(struct file *file, void *fh, v4l2_std_id *norm)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+
+	return call_all(dev, video, querystd, norm);
+}
+
+static int vidioc_g_frequency(struct file *file, void *fh, struct v4l2_frequency *f)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+
+	if (f->tuner)
+		return -EINVAL;
+	*f = mxb->cur_freq;
+
+	DEB_EE("VIDIOC_G_FREQ: freq:0x%08x\n", mxb->cur_freq.frequency);
+	return 0;
+}
+
+static int vidioc_s_frequency(struct file *file, void *fh, struct v4l2_frequency *f)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+	struct saa7146_vv *vv = dev->vv_data;
+
+	if (f->tuner)
+		return -EINVAL;
+
+	if (V4L2_TUNER_ANALOG_TV != f->type)
+		return -EINVAL;
+
+	DEB_EE("VIDIOC_S_FREQUENCY: freq:0x%08x\n", mxb->cur_freq.frequency);
+
+	/* tune in desired frequency */
+	tuner_call(mxb, tuner, s_frequency, f);
+	/* let the tuner subdev clamp the frequency to the tuner range */
+	tuner_call(mxb, tuner, g_frequency, f);
+	mxb->cur_freq = *f;
+	if (mxb->cur_audinput == 0)
+		mxb_update_audmode(mxb);
+
+	if (mxb->cur_input)
+		return 0;
+
+	/* hack: changing the frequency should invalidate the vbi-counter (=> alevt) */
+	spin_lock(&dev->slock);
+	vv->vbi_fieldcount = 0;
+	spin_unlock(&dev->slock);
+
+	return 0;
+}
+
+static int vidioc_enumaudio(struct file *file, void *fh, struct v4l2_audio *a)
+{
+	if (a->index >= MXB_AUDIOS)
+		return -EINVAL;
+	*a = mxb_audios[a->index];
+	return 0;
+}
+
+static int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *a)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+
+	DEB_EE("VIDIOC_G_AUDIO\n");
+	*a = mxb_audios[mxb->cur_audinput];
+	return 0;
+}
+
+static int vidioc_s_audio(struct file *file, void *fh, struct v4l2_audio *a)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+
+	DEB_D("VIDIOC_S_AUDIO %d\n", a->index);
+	if (mxb_inputs[mxb->cur_input].audioset & (1 << a->index)) {
+		if (mxb->cur_audinput != a->index) {
+			mxb->cur_audinput = a->index;
+			tea6420_route(mxb, a->index);
+			if (mxb->cur_audinput == 0)
+				mxb_update_audmode(mxb);
+		}
+		return 0;
+	}
+	return -EINVAL;
+}
+
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+static int vidioc_g_register(struct file *file, void *fh, struct v4l2_dbg_register *reg)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+	if (v4l2_chip_match_host(&reg->match)) {
+		reg->val = saa7146_read(dev, reg->reg);
+		reg->size = 4;
+		return 0;
+	}
+	call_all(dev, core, g_register, reg);
+	return 0;
+}
+
+static int vidioc_s_register(struct file *file, void *fh, struct v4l2_dbg_register *reg)
+{
+	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
+
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+	if (v4l2_chip_match_host(&reg->match)) {
+		saa7146_write(dev, reg->reg, reg->val);
+		reg->size = 4;
+		return 0;
+	}
+	return call_all(dev, core, s_register, reg);
+}
+#endif
+
+static struct saa7146_ext_vv vv_data;
+
+/* this function only gets called when the probing was successful */
+static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
+{
+	struct mxb *mxb;
+
+	DEB_EE("dev:%p\n", dev);
+
+	saa7146_vv_init(dev, &vv_data);
+	if (mxb_probe(dev)) {
+		saa7146_vv_release(dev);
+		return -1;
+	}
+	mxb = (struct mxb *)dev->ext_priv;
+
+	vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input;
+	vv_data.vid_ops.vidioc_g_input = vidioc_g_input;
+	vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
+	vv_data.vid_ops.vidioc_querystd = vidioc_querystd;
+	vv_data.vid_ops.vidioc_g_tuner = vidioc_g_tuner;
+	vv_data.vid_ops.vidioc_s_tuner = vidioc_s_tuner;
+	vv_data.vid_ops.vidioc_g_frequency = vidioc_g_frequency;
+	vv_data.vid_ops.vidioc_s_frequency = vidioc_s_frequency;
+	vv_data.vid_ops.vidioc_enumaudio = vidioc_enumaudio;
+	vv_data.vid_ops.vidioc_g_audio = vidioc_g_audio;
+	vv_data.vid_ops.vidioc_s_audio = vidioc_s_audio;
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+	vv_data.vid_ops.vidioc_g_register = vidioc_g_register;
+	vv_data.vid_ops.vidioc_s_register = vidioc_s_register;
+#endif
+	if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) {
+		ERR("cannot register capture v4l2 device. skipping.\n");
+		saa7146_vv_release(dev);
+		return -1;
+	}
+
+	/* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/
+	if (MXB_BOARD_CAN_DO_VBI(dev)) {
+		if (saa7146_register_device(&mxb->vbi_dev, dev, "mxb", VFL_TYPE_VBI)) {
+			ERR("cannot register vbi v4l2 device. skipping.\n");
+		}
+	}
+
+	pr_info("found Multimedia eXtension Board #%d\n", mxb_num);
+
+	mxb_num++;
+	mxb_init_done(dev);
+	return 0;
+}
+
+static int mxb_detach(struct saa7146_dev *dev)
+{
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+
+	DEB_EE("dev:%p\n", dev);
+
+	/* mute audio on tea6420s */
+	tea6420_route(mxb, 6);
+
+	saa7146_unregister_device(&mxb->video_dev,dev);
+	if (MXB_BOARD_CAN_DO_VBI(dev))
+		saa7146_unregister_device(&mxb->vbi_dev, dev);
+	saa7146_vv_release(dev);
+
+	mxb_num--;
+
+	i2c_del_adapter(&mxb->i2c_adapter);
+	kfree(mxb);
+
+	return 0;
+}
+
+static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *standard)
+{
+	struct mxb *mxb = (struct mxb *)dev->ext_priv;
+
+	if (V4L2_STD_PAL_I == standard->id) {
+		v4l2_std_id std = V4L2_STD_PAL_I;
+
+		DEB_D("VIDIOC_S_STD: setting mxb for PAL_I\n");
+		/* These two gpio calls set the GPIO pins that control the tda9820 */
+		saa7146_write(dev, GPIO_CTRL, 0x00404050);
+		saa7111a_call(mxb, core, s_gpio, 0);
+		saa7111a_call(mxb, core, s_std, std);
+		if (mxb->cur_input == 0)
+			tuner_call(mxb, core, s_std, std);
+	} else {
+		v4l2_std_id std = V4L2_STD_PAL_BG;
+
+		if (mxb->cur_input)
+			std = standard->id;
+		DEB_D("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM\n");
+		/* These two gpio calls set the GPIO pins that control the tda9820 */
+		saa7146_write(dev, GPIO_CTRL, 0x00404050);
+		saa7111a_call(mxb, core, s_gpio, 1);
+		saa7111a_call(mxb, core, s_std, std);
+		if (mxb->cur_input == 0)
+			tuner_call(mxb, core, s_std, std);
+	}
+	return 0;
+}
+
+static struct saa7146_standard standard[] = {
+	{
+		.name	= "PAL-BG", 	.id	= V4L2_STD_PAL_BG,
+		.v_offset	= 0x17,	.v_field 	= 288,
+		.h_offset	= 0x14,	.h_pixels 	= 680,
+		.v_max_out	= 576,	.h_max_out	= 768,
+	}, {
+		.name	= "PAL-I", 	.id	= V4L2_STD_PAL_I,
+		.v_offset	= 0x17,	.v_field 	= 288,
+		.h_offset	= 0x14,	.h_pixels 	= 680,
+		.v_max_out	= 576,	.h_max_out	= 768,
+	}, {
+		.name	= "NTSC", 	.id	= V4L2_STD_NTSC,
+		.v_offset	= 0x16,	.v_field 	= 240,
+		.h_offset	= 0x06,	.h_pixels 	= 708,
+		.v_max_out	= 480,	.h_max_out	= 640,
+	}, {
+		.name	= "SECAM", 	.id	= V4L2_STD_SECAM,
+		.v_offset	= 0x14,	.v_field 	= 288,
+		.h_offset	= 0x14,	.h_pixels 	= 720,
+		.v_max_out	= 576,	.h_max_out	= 768,
+	}
+};
+
+static struct saa7146_pci_extension_data mxb = {
+	.ext_priv = "Multimedia eXtension Board",
+	.ext = &extension,
+};
+
+static struct pci_device_id pci_tbl[] = {
+	{
+		.vendor    = PCI_VENDOR_ID_PHILIPS,
+		.device	   = PCI_DEVICE_ID_PHILIPS_SAA7146,
+		.subvendor = 0x0000,
+		.subdevice = 0x0000,
+		.driver_data = (unsigned long)&mxb,
+	}, {
+		.vendor	= 0,
+	}
+};
+
+MODULE_DEVICE_TABLE(pci, pci_tbl);
+
+static struct saa7146_ext_vv vv_data = {
+	.inputs		= MXB_INPUTS,
+	.capabilities	= V4L2_CAP_TUNER | V4L2_CAP_VBI_CAPTURE | V4L2_CAP_AUDIO,
+	.stds		= &standard[0],
+	.num_stds	= sizeof(standard)/sizeof(struct saa7146_standard),
+	.std_callback	= &std_callback,
+};
+
+static struct saa7146_extension extension = {
+	.name		= "Multimedia eXtension Board",
+	.flags		= SAA7146_USE_I2C_IRQ,
+
+	.pci_tbl	= &pci_tbl[0],
+	.module		= THIS_MODULE,
+
+	.attach		= mxb_attach,
+	.detach		= mxb_detach,
+
+	.irq_mask	= 0,
+	.irq_func	= NULL,
+};
+
+static int __init mxb_init_module(void)
+{
+	if (saa7146_register_extension(&extension)) {
+		DEB_S("failed to register extension\n");
+		return -ENODEV;
+	}
+
+	return 0;
+}
+
+static void __exit mxb_cleanup_module(void)
+{
+	saa7146_unregister_extension(&extension);
+}
+
+module_init(mxb_init_module);
+module_exit(mxb_cleanup_module);
+
+MODULE_DESCRIPTION("video4linux-2 driver for the Siemens-Nixdorf 'Multimedia eXtension board'");
+MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
+MODULE_LICENSE("GPL");
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index a837194..4d79dfd 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -619,29 +619,6 @@ menuconfig V4L_PCI_DRIVERS
 
 if V4L_PCI_DRIVERS
 
-config VIDEO_HEXIUM_GEMINI
-	tristate "Hexium Gemini frame grabber"
-	depends on PCI && VIDEO_V4L2 && I2C
-	select VIDEO_SAA7146_VV
-	---help---
-	  This is a video4linux driver for the Hexium Gemini frame
-	  grabber card by Hexium. Please note that the Gemini Dual
-	  card is *not* fully supported.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called hexium_gemini.
-
-config VIDEO_HEXIUM_ORION
-	tristate "Hexium HV-PCI6 and Orion frame grabber"
-	depends on PCI && VIDEO_V4L2 && I2C
-	select VIDEO_SAA7146_VV
-	---help---
-	  This is a video4linux driver for the Hexium HV-PCI6 and
-	  Orion frame grabber cards by Hexium.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called hexium_orion.
-
 config VIDEO_MEYE
 	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
 	depends on PCI && SONY_LAPTOP && VIDEO_V4L2
@@ -656,21 +633,6 @@ config VIDEO_MEYE
 	  To compile this driver as a module, choose M here: the
 	  module will be called meye.
 
-config VIDEO_MXB
-	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
-	depends on PCI && VIDEO_V4L2 && I2C
-	select VIDEO_SAA7146_VV
-	select VIDEO_TUNER
-	select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TDA9840 if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TEA6415C if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TEA6420 if VIDEO_HELPER_CHIPS_AUTO
-	---help---
-	  This is a video4linux driver for the 'Multimedia eXtension Board'
-	  TV card by Siemens-Nixdorf.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called mxb.
 
 
 config STA2X11_VIP
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 322a159..8df694d 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -93,9 +93,6 @@ obj-$(CONFIG_VIDEO_W9966) += w9966.o
 obj-$(CONFIG_VIDEO_PMS) += pms.o
 obj-$(CONFIG_VIDEO_VINO) += vino.o
 obj-$(CONFIG_VIDEO_MEYE) += meye.o
-obj-$(CONFIG_VIDEO_MXB) += mxb.o
-obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
-obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
 obj-$(CONFIG_STA2X11_VIP) += sta2x11_vip.o
 obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
 
diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c
deleted file mode 100644
index 366434f..0000000
--- a/drivers/media/video/hexium_gemini.c
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
-    hexium_gemini.c - v4l2 driver for Hexium Gemini frame grabber cards
-
-    Visit http://www.mihu.de/linux/saa7146/ and follow the link
-    to "hexium" for further details about this card.
-
-    Copyright (C) 2003 Michael Hunold <michael@mihu.de>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#define DEBUG_VARIABLE debug
-
-#include <media/saa7146_vv.h>
-#include <linux/module.h>
-
-static int debug;
-module_param(debug, int, 0);
-MODULE_PARM_DESC(debug, "debug verbosity");
-
-/* global variables */
-static int hexium_num;
-
-#define HEXIUM_GEMINI			4
-#define HEXIUM_GEMINI_DUAL		5
-
-#define HEXIUM_INPUTS	9
-static struct v4l2_input hexium_inputs[HEXIUM_INPUTS] = {
-	{ 0, "CVBS 1",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 1, "CVBS 2",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 2, "CVBS 3",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 3, "CVBS 4",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 4, "CVBS 5",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 5, "CVBS 6",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 6, "Y/C 1",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 7, "Y/C 2",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 8, "Y/C 3",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-};
-
-#define HEXIUM_AUDIOS	0
-
-struct hexium_data
-{
-	s8 adr;
-	u8 byte;
-};
-
-#define HEXIUM_GEMINI_V_1_0		1
-#define HEXIUM_GEMINI_DUAL_V_1_0	2
-
-struct hexium
-{
-	int type;
-
-	struct video_device	*video_dev;
-	struct i2c_adapter	i2c_adapter;
-
-	int 		cur_input;	/* current input */
-	v4l2_std_id 	cur_std;	/* current standard */
-};
-
-/* Samsung KS0127B decoder default registers */
-static u8 hexium_ks0127b[0x100]={
-/*00*/ 0x00,0x52,0x30,0x40,0x01,0x0C,0x2A,0x10,
-/*08*/ 0x00,0x00,0x00,0x60,0x00,0x00,0x0F,0x06,
-/*10*/ 0x00,0x00,0xE4,0xC0,0x00,0x00,0x00,0x00,
-/*18*/ 0x14,0x9B,0xFE,0xFF,0xFC,0xFF,0x03,0x22,
-/*20*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*28*/ 0x00,0x00,0x00,0x00,0x00,0x2C,0x9B,0x00,
-/*30*/ 0x00,0x00,0x10,0x80,0x80,0x10,0x80,0x80,
-/*38*/ 0x01,0x04,0x00,0x00,0x00,0x29,0xC0,0x00,
-/*40*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*48*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*50*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*58*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*60*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*68*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*70*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*78*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*80*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*88*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*90*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*98*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*A0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*A8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*B0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*B8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*C0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*C8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*D0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*D8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*E0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*E8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*F0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/*F8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-};
-
-static struct hexium_data hexium_pal[] = {
-	{ 0x01, 0x52 }, { 0x12, 0x64 }, { 0x2D, 0x2C }, { 0x2E, 0x9B }, { -1 , 0xFF }
-};
-
-static struct hexium_data hexium_ntsc[] = {
-	{ 0x01, 0x53 }, { 0x12, 0x04 }, { 0x2D, 0x23 }, { 0x2E, 0x81 }, { -1 , 0xFF }
-};
-
-static struct hexium_data hexium_secam[] = {
-	{ 0x01, 0x52 }, { 0x12, 0x64 }, { 0x2D, 0x2C }, { 0x2E, 0x9B }, { -1 , 0xFF }
-};
-
-static struct hexium_data hexium_input_select[] = {
-	{ 0x02, 0x60 },
-	{ 0x02, 0x64 },
-	{ 0x02, 0x61 },
-	{ 0x02, 0x65 },
-	{ 0x02, 0x62 },
-	{ 0x02, 0x66 },
-	{ 0x02, 0x68 },
-	{ 0x02, 0x69 },
-	{ 0x02, 0x6A },
-};
-
-/* fixme: h_offset = 0 for Hexium Gemini *Dual*, which
-   are currently *not* supported*/
-static struct saa7146_standard hexium_standards[] = {
-	{
-		.name	= "PAL", 	.id	= V4L2_STD_PAL,
-		.v_offset	= 28,	.v_field 	= 288,
-		.h_offset	= 1,	.h_pixels 	= 680,
-		.v_max_out	= 576,	.h_max_out	= 768,
-	}, {
-		.name	= "NTSC", 	.id	= V4L2_STD_NTSC,
-		.v_offset	= 28,	.v_field 	= 240,
-		.h_offset	= 1,	.h_pixels 	= 640,
-		.v_max_out	= 480,	.h_max_out	= 640,
-	}, {
-		.name	= "SECAM", 	.id	= V4L2_STD_SECAM,
-		.v_offset	= 28,	.v_field 	= 288,
-		.h_offset	= 1,	.h_pixels 	= 720,
-		.v_max_out	= 576,	.h_max_out	= 768,
-	}
-};
-
-/* bring hardware to a sane state. this has to be done, just in case someone
-   wants to capture from this device before it has been properly initialized.
-   the capture engine would badly fail, because no valid signal arrives on the
-   saa7146, thus leading to timeouts and stuff. */
-static int hexium_init_done(struct saa7146_dev *dev)
-{
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-	union i2c_smbus_data data;
-	int i = 0;
-
-	DEB_D("hexium_init_done called\n");
-
-	/* initialize the helper ics to useful values */
-	for (i = 0; i < sizeof(hexium_ks0127b); i++) {
-		data.byte = hexium_ks0127b[i];
-		if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x6c, 0, I2C_SMBUS_WRITE, i, I2C_SMBUS_BYTE_DATA, &data)) {
-			pr_err("hexium_init_done() failed for address 0x%02x\n",
-			       i);
-		}
-	}
-
-	return 0;
-}
-
-static int hexium_set_input(struct hexium *hexium, int input)
-{
-	union i2c_smbus_data data;
-
-	DEB_D("\n");
-
-	data.byte = hexium_input_select[input].byte;
-	if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x6c, 0, I2C_SMBUS_WRITE, hexium_input_select[input].adr, I2C_SMBUS_BYTE_DATA, &data)) {
-		return -1;
-	}
-
-	return 0;
-}
-
-static int hexium_set_standard(struct hexium *hexium, struct hexium_data *vdec)
-{
-	union i2c_smbus_data data;
-	int i = 0;
-
-	DEB_D("\n");
-
-	while (vdec[i].adr != -1) {
-		data.byte = vdec[i].byte;
-		if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x6c, 0, I2C_SMBUS_WRITE, vdec[i].adr, I2C_SMBUS_BYTE_DATA, &data)) {
-			pr_err("hexium_init_done: hexium_set_standard() failed for address 0x%02x\n",
-			       i);
-			return -1;
-		}
-		i++;
-	}
-	return 0;
-}
-
-static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
-{
-	DEB_EE("VIDIOC_ENUMINPUT %d\n", i->index);
-
-	if (i->index >= HEXIUM_INPUTS)
-		return -EINVAL;
-
-	memcpy(i, &hexium_inputs[i->index], sizeof(struct v4l2_input));
-
-	DEB_D("v4l2_ioctl: VIDIOC_ENUMINPUT %d\n", i->index);
-	return 0;
-}
-
-static int vidioc_g_input(struct file *file, void *fh, unsigned int *input)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-
-	*input = hexium->cur_input;
-
-	DEB_D("VIDIOC_G_INPUT: %d\n", *input);
-	return 0;
-}
-
-static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-
-	DEB_EE("VIDIOC_S_INPUT %d\n", input);
-
-	if (input >= HEXIUM_INPUTS)
-		return -EINVAL;
-
-	hexium->cur_input = input;
-	hexium_set_input(hexium, input);
-	return 0;
-}
-
-static struct saa7146_ext_vv vv_data;
-
-/* this function only gets called when the probing was successful */
-static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
-{
-	struct hexium *hexium;
-	int ret;
-
-	DEB_EE("\n");
-
-	hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL);
-	if (NULL == hexium) {
-		pr_err("not enough kernel memory in hexium_attach()\n");
-		return -ENOMEM;
-	}
-	dev->ext_priv = hexium;
-
-	/* enable i2c-port pins */
-	saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26));
-
-	hexium->i2c_adapter = (struct i2c_adapter) {
-		.name = "hexium gemini",
-	};
-	saa7146_i2c_adapter_prepare(dev, &hexium->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480);
-	if (i2c_add_adapter(&hexium->i2c_adapter) < 0) {
-		DEB_S("cannot register i2c-device. skipping.\n");
-		kfree(hexium);
-		return -EFAULT;
-	}
-
-	/*  set HWControl GPIO number 2 */
-	saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI);
-
-	saa7146_write(dev, DD1_INIT, 0x07000700);
-	saa7146_write(dev, DD1_STREAM_B, 0x00000000);
-	saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
-
-	/* the rest */
-	hexium->cur_input = 0;
-	hexium_init_done(dev);
-
-	hexium_set_standard(hexium, hexium_pal);
-	hexium->cur_std = V4L2_STD_PAL;
-
-	hexium_set_input(hexium, 0);
-	hexium->cur_input = 0;
-
-	saa7146_vv_init(dev, &vv_data);
-
-	vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input;
-	vv_data.vid_ops.vidioc_g_input = vidioc_g_input;
-	vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
-	ret = saa7146_register_device(&hexium->video_dev, dev, "hexium gemini", VFL_TYPE_GRABBER);
-	if (ret < 0) {
-		pr_err("cannot register capture v4l2 device. skipping.\n");
-		return ret;
-	}
-
-	pr_info("found 'hexium gemini' frame grabber-%d\n", hexium_num);
-	hexium_num++;
-
-	return 0;
-}
-
-static int hexium_detach(struct saa7146_dev *dev)
-{
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-
-	DEB_EE("dev:%p\n", dev);
-
-	saa7146_unregister_device(&hexium->video_dev, dev);
-	saa7146_vv_release(dev);
-
-	hexium_num--;
-
-	i2c_del_adapter(&hexium->i2c_adapter);
-	kfree(hexium);
-	return 0;
-}
-
-static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *std)
-{
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-
-	if (V4L2_STD_PAL == std->id) {
-		hexium_set_standard(hexium, hexium_pal);
-		hexium->cur_std = V4L2_STD_PAL;
-		return 0;
-	} else if (V4L2_STD_NTSC == std->id) {
-		hexium_set_standard(hexium, hexium_ntsc);
-		hexium->cur_std = V4L2_STD_NTSC;
-		return 0;
-	} else if (V4L2_STD_SECAM == std->id) {
-		hexium_set_standard(hexium, hexium_secam);
-		hexium->cur_std = V4L2_STD_SECAM;
-		return 0;
-	}
-
-	return -1;
-}
-
-static struct saa7146_extension hexium_extension;
-
-static struct saa7146_pci_extension_data hexium_gemini_4bnc = {
-	.ext_priv = "Hexium Gemini (4 BNC)",
-	.ext = &hexium_extension,
-};
-
-static struct saa7146_pci_extension_data hexium_gemini_dual_4bnc = {
-	.ext_priv = "Hexium Gemini Dual (4 BNC)",
-	.ext = &hexium_extension,
-};
-
-static struct pci_device_id pci_tbl[] = {
-	{
-	 .vendor = PCI_VENDOR_ID_PHILIPS,
-	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
-	 .subvendor = 0x17c8,
-	 .subdevice = 0x2401,
-	 .driver_data = (unsigned long) &hexium_gemini_4bnc,
-	 },
-	{
-	 .vendor = PCI_VENDOR_ID_PHILIPS,
-	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
-	 .subvendor = 0x17c8,
-	 .subdevice = 0x2402,
-	 .driver_data = (unsigned long) &hexium_gemini_dual_4bnc,
-	 },
-	{
-	 .vendor = 0,
-	 }
-};
-
-MODULE_DEVICE_TABLE(pci, pci_tbl);
-
-static struct saa7146_ext_vv vv_data = {
-	.inputs = HEXIUM_INPUTS,
-	.capabilities = 0,
-	.stds = &hexium_standards[0],
-	.num_stds = sizeof(hexium_standards) / sizeof(struct saa7146_standard),
-	.std_callback = &std_callback,
-};
-
-static struct saa7146_extension hexium_extension = {
-	.name = "hexium gemini",
-	.flags = SAA7146_USE_I2C_IRQ,
-
-	.pci_tbl = &pci_tbl[0],
-	.module = THIS_MODULE,
-
-	.attach = hexium_attach,
-	.detach = hexium_detach,
-
-	.irq_mask = 0,
-	.irq_func = NULL,
-};
-
-static int __init hexium_init_module(void)
-{
-	if (0 != saa7146_register_extension(&hexium_extension)) {
-		DEB_S("failed to register extension\n");
-		return -ENODEV;
-	}
-
-	return 0;
-}
-
-static void __exit hexium_cleanup_module(void)
-{
-	saa7146_unregister_extension(&hexium_extension);
-}
-
-module_init(hexium_init_module);
-module_exit(hexium_cleanup_module);
-
-MODULE_DESCRIPTION("video4linux-2 driver for Hexium Gemini frame grabber cards");
-MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
-MODULE_LICENSE("GPL");
diff --git a/drivers/media/video/hexium_orion.c b/drivers/media/video/hexium_orion.c
deleted file mode 100644
index a1eb26d..0000000
--- a/drivers/media/video/hexium_orion.c
+++ /dev/null
@@ -1,502 +0,0 @@
-/*
-    hexium_orion.c - v4l2 driver for the Hexium Orion frame grabber cards
-
-    Visit http://www.mihu.de/linux/saa7146/ and follow the link
-    to "hexium" for further details about this card.
-
-    Copyright (C) 2003 Michael Hunold <michael@mihu.de>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#define DEBUG_VARIABLE debug
-
-#include <media/saa7146_vv.h>
-#include <linux/module.h>
-
-static int debug;
-module_param(debug, int, 0);
-MODULE_PARM_DESC(debug, "debug verbosity");
-
-/* global variables */
-static int hexium_num;
-
-#define HEXIUM_HV_PCI6_ORION		1
-#define HEXIUM_ORION_1SVHS_3BNC		2
-#define HEXIUM_ORION_4BNC		3
-
-#define HEXIUM_INPUTS	9
-static struct v4l2_input hexium_inputs[HEXIUM_INPUTS] = {
-	{ 0, "CVBS 1",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 1, "CVBS 2",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 2, "CVBS 3",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 3, "CVBS 4",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 4, "CVBS 5",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 5, "CVBS 6",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 6, "Y/C 1",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 7, "Y/C 2",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ 8, "Y/C 3",	V4L2_INPUT_TYPE_CAMERA,	0, 0, V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-};
-
-#define HEXIUM_AUDIOS	0
-
-struct hexium_data
-{
-	s8 adr;
-	u8 byte;
-};
-
-struct hexium
-{
-	int type;
-	struct video_device	*video_dev;
-	struct i2c_adapter	i2c_adapter;
-
-	int cur_input;	/* current input */
-};
-
-/* Philips SAA7110 decoder default registers */
-static u8 hexium_saa7110[53]={
-/*00*/ 0x4C,0x3C,0x0D,0xEF,0xBD,0xF0,0x00,0x00,
-/*08*/ 0xF8,0xF8,0x60,0x60,0x40,0x86,0x18,0x90,
-/*10*/ 0x00,0x2C,0x40,0x46,0x42,0x1A,0xFF,0xDA,
-/*18*/ 0xF0,0x8B,0x00,0x00,0x00,0x00,0x00,0x00,
-/*20*/ 0xD9,0x17,0x40,0x41,0x80,0x41,0x80,0x4F,
-/*28*/ 0xFE,0x01,0x0F,0x0F,0x03,0x01,0x81,0x03,
-/*30*/ 0x44,0x75,0x01,0x8C,0x03
-};
-
-static struct {
-	struct hexium_data data[8];
-} hexium_input_select[] = {
-{
-	{ /* cvbs 1 */
-		{ 0x06, 0x00 },
-		{ 0x20, 0xD9 },
-		{ 0x21, 0x17 }, // 0x16,
-		{ 0x22, 0x40 },
-		{ 0x2C, 0x03 },
-		{ 0x30, 0x44 },
-		{ 0x31, 0x75 }, // ??
-		{ 0x21, 0x16 }, // 0x03,
-	}
-}, {
-	{ /* cvbs 2 */
-		{ 0x06, 0x00 },
-		{ 0x20, 0x78 },
-		{ 0x21, 0x07 }, // 0x03,
-		{ 0x22, 0xD2 },
-		{ 0x2C, 0x83 },
-		{ 0x30, 0x60 },
-		{ 0x31, 0xB5 }, // ?
-		{ 0x21, 0x03 },
-	}
-}, {
-	{ /* cvbs 3 */
-		{ 0x06, 0x00 },
-		{ 0x20, 0xBA },
-		{ 0x21, 0x07 }, // 0x05,
-		{ 0x22, 0x91 },
-		{ 0x2C, 0x03 },
-		{ 0x30, 0x60 },
-		{ 0x31, 0xB5 }, // ??
-		{ 0x21, 0x05 }, // 0x03,
-	}
-}, {
-	{ /* cvbs 4 */
-		{ 0x06, 0x00 },
-		{ 0x20, 0xD8 },
-		{ 0x21, 0x17 }, // 0x16,
-		{ 0x22, 0x40 },
-		{ 0x2C, 0x03 },
-		{ 0x30, 0x44 },
-		{ 0x31, 0x75 }, // ??
-		{ 0x21, 0x16 }, // 0x03,
-	}
-}, {
-	{ /* cvbs 5 */
-		{ 0x06, 0x00 },
-		{ 0x20, 0xB8 },
-		{ 0x21, 0x07 }, // 0x05,
-		{ 0x22, 0x91 },
-		{ 0x2C, 0x03 },
-		{ 0x30, 0x60 },
-		{ 0x31, 0xB5 }, // ??
-		{ 0x21, 0x05 }, // 0x03,
-	}
-}, {
-	{ /* cvbs 6 */
-		{ 0x06, 0x00 },
-		{ 0x20, 0x7C },
-		{ 0x21, 0x07 }, // 0x03
-		{ 0x22, 0xD2 },
-		{ 0x2C, 0x83 },
-		{ 0x30, 0x60 },
-		{ 0x31, 0xB5 }, // ??
-		{ 0x21, 0x03 },
-	}
-}, {
-	{ /* y/c 1 */
-		{ 0x06, 0x80 },
-		{ 0x20, 0x59 },
-		{ 0x21, 0x17 },
-		{ 0x22, 0x42 },
-		{ 0x2C, 0xA3 },
-		{ 0x30, 0x44 },
-		{ 0x31, 0x75 },
-		{ 0x21, 0x12 },
-	}
-}, {
-	{ /* y/c 2 */
-		{ 0x06, 0x80 },
-		{ 0x20, 0x9A },
-		{ 0x21, 0x17 },
-		{ 0x22, 0xB1 },
-		{ 0x2C, 0x13 },
-		{ 0x30, 0x60 },
-		{ 0x31, 0xB5 },
-		{ 0x21, 0x14 },
-	}
-}, {
-	{ /* y/c 3 */
-		{ 0x06, 0x80 },
-		{ 0x20, 0x3C },
-		{ 0x21, 0x27 },
-		{ 0x22, 0xC1 },
-		{ 0x2C, 0x23 },
-		{ 0x30, 0x44 },
-		{ 0x31, 0x75 },
-		{ 0x21, 0x21 },
-	}
-}
-};
-
-static struct saa7146_standard hexium_standards[] = {
-	{
-		.name	= "PAL", 	.id	= V4L2_STD_PAL,
-		.v_offset	= 16,	.v_field 	= 288,
-		.h_offset	= 1,	.h_pixels 	= 680,
-		.v_max_out	= 576,	.h_max_out	= 768,
-	}, {
-		.name	= "NTSC", 	.id	= V4L2_STD_NTSC,
-		.v_offset	= 16,	.v_field 	= 240,
-		.h_offset	= 1,	.h_pixels 	= 640,
-		.v_max_out	= 480,	.h_max_out	= 640,
-	}, {
-		.name	= "SECAM", 	.id	= V4L2_STD_SECAM,
-		.v_offset	= 16,	.v_field 	= 288,
-		.h_offset	= 1,	.h_pixels 	= 720,
-		.v_max_out	= 576,	.h_max_out	= 768,
-	}
-};
-
-/* this is only called for old HV-PCI6/Orion cards
-   without eeprom */
-static int hexium_probe(struct saa7146_dev *dev)
-{
-	struct hexium *hexium = NULL;
-	union i2c_smbus_data data;
-	int err = 0;
-
-	DEB_EE("\n");
-
-	/* there are no hexium orion cards with revision 0 saa7146s */
-	if (0 == dev->revision) {
-		return -EFAULT;
-	}
-
-	hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL);
-	if (NULL == hexium) {
-		pr_err("hexium_probe: not enough kernel memory\n");
-		return -ENOMEM;
-	}
-
-	/* enable i2c-port pins */
-	saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26));
-
-	saa7146_write(dev, DD1_INIT, 0x01000100);
-	saa7146_write(dev, DD1_STREAM_B, 0x00000000);
-	saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
-
-	hexium->i2c_adapter = (struct i2c_adapter) {
-		.name = "hexium orion",
-	};
-	saa7146_i2c_adapter_prepare(dev, &hexium->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480);
-	if (i2c_add_adapter(&hexium->i2c_adapter) < 0) {
-		DEB_S("cannot register i2c-device. skipping.\n");
-		kfree(hexium);
-		return -EFAULT;
-	}
-
-	/* set SAA7110 control GPIO 0 */
-	saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTHI);
-	/*  set HWControl GPIO number 2 */
-	saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI);
-
-	mdelay(10);
-
-	/* detect newer Hexium Orion cards by subsystem ids */
-	if (0x17c8 == dev->pci->subsystem_vendor && 0x0101 == dev->pci->subsystem_device) {
-		pr_info("device is a Hexium Orion w/ 1 SVHS + 3 BNC inputs\n");
-		/* we store the pointer in our private data field */
-		dev->ext_priv = hexium;
-		hexium->type = HEXIUM_ORION_1SVHS_3BNC;
-		return 0;
-	}
-
-	if (0x17c8 == dev->pci->subsystem_vendor && 0x2101 == dev->pci->subsystem_device) {
-		pr_info("device is a Hexium Orion w/ 4 BNC inputs\n");
-		/* we store the pointer in our private data field */
-		dev->ext_priv = hexium;
-		hexium->type = HEXIUM_ORION_4BNC;
-		return 0;
-	}
-
-	/* check if this is an old hexium Orion card by looking at
-	   a saa7110 at address 0x4e */
-	if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) {
-		pr_info("device is a Hexium HV-PCI6/Orion (old)\n");
-		/* we store the pointer in our private data field */
-		dev->ext_priv = hexium;
-		hexium->type = HEXIUM_HV_PCI6_ORION;
-		return 0;
-	}
-
-	i2c_del_adapter(&hexium->i2c_adapter);
-	kfree(hexium);
-	return -EFAULT;
-}
-
-/* bring hardware to a sane state. this has to be done, just in case someone
-   wants to capture from this device before it has been properly initialized.
-   the capture engine would badly fail, because no valid signal arrives on the
-   saa7146, thus leading to timeouts and stuff. */
-static int hexium_init_done(struct saa7146_dev *dev)
-{
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-	union i2c_smbus_data data;
-	int i = 0;
-
-	DEB_D("hexium_init_done called\n");
-
-	/* initialize the helper ics to useful values */
-	for (i = 0; i < sizeof(hexium_saa7110); i++) {
-		data.byte = hexium_saa7110[i];
-		if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_WRITE, i, I2C_SMBUS_BYTE_DATA, &data)) {
-			pr_err("failed for address 0x%02x\n", i);
-		}
-	}
-
-	return 0;
-}
-
-static int hexium_set_input(struct hexium *hexium, int input)
-{
-	union i2c_smbus_data data;
-	int i = 0;
-
-	DEB_D("\n");
-
-	for (i = 0; i < 8; i++) {
-		int adr = hexium_input_select[input].data[i].adr;
-		data.byte = hexium_input_select[input].data[i].byte;
-		if (0 != i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_WRITE, adr, I2C_SMBUS_BYTE_DATA, &data)) {
-			return -1;
-		}
-		pr_debug("%d: 0x%02x => 0x%02x\n", input, adr, data.byte);
-	}
-
-	return 0;
-}
-
-static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
-{
-	DEB_EE("VIDIOC_ENUMINPUT %d\n", i->index);
-
-	if (i->index >= HEXIUM_INPUTS)
-		return -EINVAL;
-
-	memcpy(i, &hexium_inputs[i->index], sizeof(struct v4l2_input));
-
-	DEB_D("v4l2_ioctl: VIDIOC_ENUMINPUT %d\n", i->index);
-	return 0;
-}
-
-static int vidioc_g_input(struct file *file, void *fh, unsigned int *input)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-
-	*input = hexium->cur_input;
-
-	DEB_D("VIDIOC_G_INPUT: %d\n", *input);
-	return 0;
-}
-
-static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-
-	if (input >= HEXIUM_INPUTS)
-		return -EINVAL;
-
-	hexium->cur_input = input;
-	hexium_set_input(hexium, input);
-
-	return 0;
-}
-
-static struct saa7146_ext_vv vv_data;
-
-/* this function only gets called when the probing was successful */
-static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
-{
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-
-	DEB_EE("\n");
-
-	saa7146_vv_init(dev, &vv_data);
-	vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input;
-	vv_data.vid_ops.vidioc_g_input = vidioc_g_input;
-	vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
-	if (0 != saa7146_register_device(&hexium->video_dev, dev, "hexium orion", VFL_TYPE_GRABBER)) {
-		pr_err("cannot register capture v4l2 device. skipping.\n");
-		return -1;
-	}
-
-	pr_err("found 'hexium orion' frame grabber-%d\n", hexium_num);
-	hexium_num++;
-
-	/* the rest */
-	hexium->cur_input = 0;
-	hexium_init_done(dev);
-
-	return 0;
-}
-
-static int hexium_detach(struct saa7146_dev *dev)
-{
-	struct hexium *hexium = (struct hexium *) dev->ext_priv;
-
-	DEB_EE("dev:%p\n", dev);
-
-	saa7146_unregister_device(&hexium->video_dev, dev);
-	saa7146_vv_release(dev);
-
-	hexium_num--;
-
-	i2c_del_adapter(&hexium->i2c_adapter);
-	kfree(hexium);
-	return 0;
-}
-
-static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *std)
-{
-	return 0;
-}
-
-static struct saa7146_extension extension;
-
-static struct saa7146_pci_extension_data hexium_hv_pci6 = {
-	.ext_priv = "Hexium HV-PCI6 / Orion",
-	.ext = &extension,
-};
-
-static struct saa7146_pci_extension_data hexium_orion_1svhs_3bnc = {
-	.ext_priv = "Hexium HV-PCI6 / Orion (1 SVHS/3 BNC)",
-	.ext = &extension,
-};
-
-static struct saa7146_pci_extension_data hexium_orion_4bnc = {
-	.ext_priv = "Hexium HV-PCI6 / Orion (4 BNC)",
-	.ext = &extension,
-};
-
-static struct pci_device_id pci_tbl[] = {
-	{
-	 .vendor = PCI_VENDOR_ID_PHILIPS,
-	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
-	 .subvendor = 0x0000,
-	 .subdevice = 0x0000,
-	 .driver_data = (unsigned long) &hexium_hv_pci6,
-	 },
-	{
-	 .vendor = PCI_VENDOR_ID_PHILIPS,
-	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
-	 .subvendor = 0x17c8,
-	 .subdevice = 0x0101,
-	 .driver_data = (unsigned long) &hexium_orion_1svhs_3bnc,
-	 },
-	{
-	 .vendor = PCI_VENDOR_ID_PHILIPS,
-	 .device = PCI_DEVICE_ID_PHILIPS_SAA7146,
-	 .subvendor = 0x17c8,
-	 .subdevice = 0x2101,
-	 .driver_data = (unsigned long) &hexium_orion_4bnc,
-	 },
-	{
-	 .vendor = 0,
-	 }
-};
-
-MODULE_DEVICE_TABLE(pci, pci_tbl);
-
-static struct saa7146_ext_vv vv_data = {
-	.inputs = HEXIUM_INPUTS,
-	.capabilities = 0,
-	.stds = &hexium_standards[0],
-	.num_stds = sizeof(hexium_standards) / sizeof(struct saa7146_standard),
-	.std_callback = &std_callback,
-};
-
-static struct saa7146_extension extension = {
-	.name = "hexium HV-PCI6 Orion",
-	.flags = 0,		// SAA7146_USE_I2C_IRQ,
-
-	.pci_tbl = &pci_tbl[0],
-	.module = THIS_MODULE,
-
-	.probe = hexium_probe,
-	.attach = hexium_attach,
-	.detach = hexium_detach,
-
-	.irq_mask = 0,
-	.irq_func = NULL,
-};
-
-static int __init hexium_init_module(void)
-{
-	if (0 != saa7146_register_extension(&extension)) {
-		DEB_S("failed to register extension\n");
-		return -ENODEV;
-	}
-
-	return 0;
-}
-
-static void __exit hexium_cleanup_module(void)
-{
-	saa7146_unregister_extension(&extension);
-}
-
-module_init(hexium_init_module);
-module_exit(hexium_cleanup_module);
-
-MODULE_DESCRIPTION("video4linux-2 driver for Hexium Orion frame grabber cards");
-MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
-MODULE_LICENSE("GPL");
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c
deleted file mode 100644
index b520a45..0000000
--- a/drivers/media/video/mxb.c
+++ /dev/null
@@ -1,886 +0,0 @@
-/*
-    mxb - v4l2 driver for the Multimedia eXtension Board
-
-    Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de>
-
-    Visit http://www.themm.net/~mihu/linux/saa7146/mxb.html 
-    for further details about this card.
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#define DEBUG_VARIABLE debug
-
-#include <media/saa7146_vv.h>
-#include <media/tuner.h>
-#include <media/v4l2-common.h>
-#include <media/saa7115.h>
-#include <linux/module.h>
-
-#include "tea6415c.h"
-#include "tea6420.h"
-
-#define MXB_AUDIOS	6
-
-#define I2C_SAA7111A  0x24
-#define	I2C_TDA9840   0x42
-#define	I2C_TEA6415C  0x43
-#define	I2C_TEA6420_1 0x4c
-#define	I2C_TEA6420_2 0x4d
-#define	I2C_TUNER     0x60
-
-#define MXB_BOARD_CAN_DO_VBI(dev)   (dev->revision != 0)
-
-/* global variable */
-static int mxb_num;
-
-/* initial frequence the tuner will be tuned to.
-   in verden (lower saxony, germany) 4148 is a
-   channel called "phoenix" */
-static int freq = 4148;
-module_param(freq, int, 0644);
-MODULE_PARM_DESC(freq, "initial frequency the tuner will be tuned to while setup");
-
-static int debug;
-module_param(debug, int, 0644);
-MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
-
-#define MXB_INPUTS 4
-enum { TUNER, AUX1, AUX3, AUX3_YC };
-
-static struct v4l2_input mxb_inputs[MXB_INPUTS] = {
-	{ TUNER,   "Tuner",          V4L2_INPUT_TYPE_TUNER,  0x3f, 0,
-		V4L2_STD_PAL_BG | V4L2_STD_PAL_I, 0, V4L2_IN_CAP_STD },
-	{ AUX1,	   "AUX1",           V4L2_INPUT_TYPE_CAMERA, 0x3f, 0,
-		V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ AUX3,	   "AUX3 Composite", V4L2_INPUT_TYPE_CAMERA, 0x3f, 0,
-		V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-	{ AUX3_YC, "AUX3 S-Video",   V4L2_INPUT_TYPE_CAMERA, 0x3f, 0,
-		V4L2_STD_ALL, 0, V4L2_IN_CAP_STD },
-};
-
-/* this array holds the information, which port of the saa7146 each
-   input actually uses. the mxb uses port 0 for every input */
-static struct {
-	int hps_source;
-	int hps_sync;
-} input_port_selection[MXB_INPUTS] = {
-	{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
-	{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
-	{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
-	{ SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A },
-};
-
-/* this array holds the information of the audio source (mxb_audios),
-   which has to be switched corresponding to the video source (mxb_channels) */
-static int video_audio_connect[MXB_INPUTS] =
-	{ 0, 1, 3, 3 };
-
-struct mxb_routing {
-	u32 input;
-	u32 output;
-};
-
-/* these are the available audio sources, which can switched
-   to the line- and cd-output individually */
-static struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
-	    {
-		.index	= 0,
-		.name	= "Tuner",
-		.capability = V4L2_AUDCAP_STEREO,
-	} , {
-		.index	= 1,
-		.name	= "AUX1",
-		.capability = V4L2_AUDCAP_STEREO,
-	} , {
-		.index	= 2,
-		.name	= "AUX2",
-		.capability = V4L2_AUDCAP_STEREO,
-	} , {
-		.index	= 3,
-		.name	= "AUX3",
-		.capability = V4L2_AUDCAP_STEREO,
-	} , {
-		.index	= 4,
-		.name	= "Radio (X9)",
-		.capability = V4L2_AUDCAP_STEREO,
-	} , {
-		.index	= 5,
-		.name	= "CD-ROM (X10)",
-		.capability = V4L2_AUDCAP_STEREO,
-	}
-};
-
-/* These are the necessary input-output-pins for bringing one audio source
-   (see above) to the CD-output. Note that gain is set to 0 in this table. */
-static struct mxb_routing TEA6420_cd[MXB_AUDIOS + 1][2] = {
-	{ { 1, 1 }, { 1, 1 } },	/* Tuner */
-	{ { 5, 1 }, { 6, 1 } },	/* AUX 1 */
-	{ { 4, 1 }, { 6, 1 } },	/* AUX 2 */
-	{ { 3, 1 }, { 6, 1 } },	/* AUX 3 */
-	{ { 1, 1 }, { 3, 1 } },	/* Radio */
-	{ { 1, 1 }, { 2, 1 } },	/* CD-Rom */
-	{ { 6, 1 }, { 6, 1 } }	/* Mute */
-};
-
-/* These are the necessary input-output-pins for bringing one audio source
-   (see above) to the line-output. Note that gain is set to 0 in this table. */
-static struct mxb_routing TEA6420_line[MXB_AUDIOS + 1][2] = {
-	{ { 2, 3 }, { 1, 2 } },
-	{ { 5, 3 }, { 6, 2 } },
-	{ { 4, 3 }, { 6, 2 } },
-	{ { 3, 3 }, { 6, 2 } },
-	{ { 2, 3 }, { 3, 2 } },
-	{ { 2, 3 }, { 2, 2 } },
-	{ { 6, 3 }, { 6, 2 } }	/* Mute */
-};
-
-struct mxb
-{
-	struct video_device	*video_dev;
-	struct video_device	*vbi_dev;
-
-	struct i2c_adapter	i2c_adapter;
-
-	struct v4l2_subdev	*saa7111a;
-	struct v4l2_subdev	*tda9840;
-	struct v4l2_subdev	*tea6415c;
-	struct v4l2_subdev	*tuner;
-	struct v4l2_subdev	*tea6420_1;
-	struct v4l2_subdev	*tea6420_2;
-
-	int	cur_mode;	/* current audio mode (mono, stereo, ...) */
-	int	cur_input;	/* current input */
-	int	cur_audinput;	/* current audio input */
-	int	cur_mute;	/* current mute status */
-	struct v4l2_frequency	cur_freq;	/* current frequency the tuner is tuned to */
-};
-
-#define saa7111a_call(mxb, o, f, args...) \
-	v4l2_subdev_call(mxb->saa7111a, o, f, ##args)
-#define tda9840_call(mxb, o, f, args...) \
-	v4l2_subdev_call(mxb->tda9840, o, f, ##args)
-#define tea6415c_call(mxb, o, f, args...) \
-	v4l2_subdev_call(mxb->tea6415c, o, f, ##args)
-#define tuner_call(mxb, o, f, args...) \
-	v4l2_subdev_call(mxb->tuner, o, f, ##args)
-#define call_all(dev, o, f, args...) \
-	v4l2_device_call_until_err(&dev->v4l2_dev, 0, o, f, ##args)
-
-static void mxb_update_audmode(struct mxb *mxb)
-{
-	struct v4l2_tuner t = {
-		.audmode = mxb->cur_mode,
-	};
-
-	tda9840_call(mxb, tuner, s_tuner, &t);
-}
-
-static inline void tea6420_route(struct mxb *mxb, int idx)
-{
-	v4l2_subdev_call(mxb->tea6420_1, audio, s_routing,
-		TEA6420_cd[idx][0].input, TEA6420_cd[idx][0].output, 0);
-	v4l2_subdev_call(mxb->tea6420_2, audio, s_routing,
-		TEA6420_cd[idx][1].input, TEA6420_cd[idx][1].output, 0);
-	v4l2_subdev_call(mxb->tea6420_1, audio, s_routing,
-		TEA6420_line[idx][0].input, TEA6420_line[idx][0].output, 0);
-	v4l2_subdev_call(mxb->tea6420_2, audio, s_routing,
-		TEA6420_line[idx][1].input, TEA6420_line[idx][1].output, 0);
-}
-
-static struct saa7146_extension extension;
-
-static int mxb_s_ctrl(struct v4l2_ctrl *ctrl)
-{
-	struct saa7146_dev *dev = container_of(ctrl->handler,
-				struct saa7146_dev, ctrl_handler);
-	struct mxb *mxb = dev->ext_priv;
-
-	switch (ctrl->id) {
-	case V4L2_CID_AUDIO_MUTE:
-		mxb->cur_mute = ctrl->val;
-		/* switch the audio-source */
-		tea6420_route(mxb, ctrl->val ? 6 :
-				video_audio_connect[mxb->cur_input]);
-		break;
-	default:
-		return -EINVAL;
-	}
-	return 0;
-}
-
-static const struct v4l2_ctrl_ops mxb_ctrl_ops = {
-	.s_ctrl = mxb_s_ctrl,
-};
-
-static int mxb_probe(struct saa7146_dev *dev)
-{
-	struct v4l2_ctrl_handler *hdl = &dev->ctrl_handler;
-	struct mxb *mxb = NULL;
-
-	v4l2_ctrl_new_std(hdl, &mxb_ctrl_ops,
-			V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1);
-	if (hdl->error)
-		return hdl->error;
-	mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL);
-	if (mxb == NULL) {
-		DEB_D("not enough kernel memory\n");
-		return -ENOMEM;
-	}
-
-
-	snprintf(mxb->i2c_adapter.name, sizeof(mxb->i2c_adapter.name), "mxb%d", mxb_num);
-
-	saa7146_i2c_adapter_prepare(dev, &mxb->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480);
-	if (i2c_add_adapter(&mxb->i2c_adapter) < 0) {
-		DEB_S("cannot register i2c-device. skipping.\n");
-		kfree(mxb);
-		return -EFAULT;
-	}
-
-	mxb->saa7111a = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
-			"saa7111", I2C_SAA7111A, NULL);
-	mxb->tea6420_1 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
-			"tea6420", I2C_TEA6420_1, NULL);
-	mxb->tea6420_2 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
-			"tea6420", I2C_TEA6420_2, NULL);
-	mxb->tea6415c = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
-			"tea6415c", I2C_TEA6415C, NULL);
-	mxb->tda9840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
-			"tda9840", I2C_TDA9840, NULL);
-	mxb->tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
-			"tuner", I2C_TUNER, NULL);
-
-	/* check if all devices are present */
-	if (!mxb->tea6420_1 || !mxb->tea6420_2 || !mxb->tea6415c ||
-	    !mxb->tda9840 || !mxb->saa7111a || !mxb->tuner) {
-		pr_err("did not find all i2c devices. aborting\n");
-		i2c_del_adapter(&mxb->i2c_adapter);
-		kfree(mxb);
-		return -ENODEV;
-	}
-
-	/* all devices are present, probe was successful */
-
-	/* we store the pointer in our private data field */
-	dev->ext_priv = mxb;
-
-	v4l2_ctrl_handler_setup(hdl);
-
-	return 0;
-}
-
-/* some init data for the saa7740, the so-called 'sound arena module'.
-   there are no specs available, so we simply use some init values */
-static struct {
-	int	length;
-	char	data[9];
-} mxb_saa7740_init[] = {
-	{ 3, { 0x80, 0x00, 0x00 } },{ 3, { 0x80, 0x89, 0x00 } },
-	{ 3, { 0x80, 0xb0, 0x0a } },{ 3, { 0x00, 0x00, 0x00 } },
-	{ 3, { 0x49, 0x00, 0x00 } },{ 3, { 0x4a, 0x00, 0x00 } },
-	{ 3, { 0x4b, 0x00, 0x00 } },{ 3, { 0x4c, 0x00, 0x00 } },
-	{ 3, { 0x4d, 0x00, 0x00 } },{ 3, { 0x4e, 0x00, 0x00 } },
-	{ 3, { 0x4f, 0x00, 0x00 } },{ 3, { 0x50, 0x00, 0x00 } },
-	{ 3, { 0x51, 0x00, 0x00 } },{ 3, { 0x52, 0x00, 0x00 } },
-	{ 3, { 0x53, 0x00, 0x00 } },{ 3, { 0x54, 0x00, 0x00 } },
-	{ 3, { 0x55, 0x00, 0x00 } },{ 3, { 0x56, 0x00, 0x00 } },
-	{ 3, { 0x57, 0x00, 0x00 } },{ 3, { 0x58, 0x00, 0x00 } },
-	{ 3, { 0x59, 0x00, 0x00 } },{ 3, { 0x5a, 0x00, 0x00 } },
-	{ 3, { 0x5b, 0x00, 0x00 } },{ 3, { 0x5c, 0x00, 0x00 } },
-	{ 3, { 0x5d, 0x00, 0x00 } },{ 3, { 0x5e, 0x00, 0x00 } },
-	{ 3, { 0x5f, 0x00, 0x00 } },{ 3, { 0x60, 0x00, 0x00 } },
-	{ 3, { 0x61, 0x00, 0x00 } },{ 3, { 0x62, 0x00, 0x00 } },
-	{ 3, { 0x63, 0x00, 0x00 } },{ 3, { 0x64, 0x00, 0x00 } },
-	{ 3, { 0x65, 0x00, 0x00 } },{ 3, { 0x66, 0x00, 0x00 } },
-	{ 3, { 0x67, 0x00, 0x00 } },{ 3, { 0x68, 0x00, 0x00 } },
-	{ 3, { 0x69, 0x00, 0x00 } },{ 3, { 0x6a, 0x00, 0x00 } },
-	{ 3, { 0x6b, 0x00, 0x00 } },{ 3, { 0x6c, 0x00, 0x00 } },
-	{ 3, { 0x6d, 0x00, 0x00 } },{ 3, { 0x6e, 0x00, 0x00 } },
-	{ 3, { 0x6f, 0x00, 0x00 } },{ 3, { 0x70, 0x00, 0x00 } },
-	{ 3, { 0x71, 0x00, 0x00 } },{ 3, { 0x72, 0x00, 0x00 } },
-	{ 3, { 0x73, 0x00, 0x00 } },{ 3, { 0x74, 0x00, 0x00 } },
-	{ 3, { 0x75, 0x00, 0x00 } },{ 3, { 0x76, 0x00, 0x00 } },
-	{ 3, { 0x77, 0x00, 0x00 } },{ 3, { 0x41, 0x00, 0x42 } },
-	{ 3, { 0x42, 0x10, 0x42 } },{ 3, { 0x43, 0x20, 0x42 } },
-	{ 3, { 0x44, 0x30, 0x42 } },{ 3, { 0x45, 0x00, 0x01 } },
-	{ 3, { 0x46, 0x00, 0x01 } },{ 3, { 0x47, 0x00, 0x01 } },
-	{ 3, { 0x48, 0x00, 0x01 } },
-	{ 9, { 0x01, 0x03, 0xc5, 0x5c, 0x7a, 0x85, 0x01, 0x00, 0x54 } },
-	{ 9, { 0x21, 0x03, 0xc5, 0x5c, 0x7a, 0x85, 0x01, 0x00, 0x54 } },
-	{ 9, { 0x09, 0x0b, 0xb4, 0x6b, 0x74, 0x85, 0x95, 0x00, 0x34 } },
-	{ 9, { 0x29, 0x0b, 0xb4, 0x6b, 0x74, 0x85, 0x95, 0x00, 0x34 } },
-	{ 9, { 0x11, 0x17, 0x43, 0x62, 0x68, 0x89, 0xd1, 0xff, 0xb0 } },
-	{ 9, { 0x31, 0x17, 0x43, 0x62, 0x68, 0x89, 0xd1, 0xff, 0xb0 } },
-	{ 9, { 0x19, 0x20, 0x62, 0x51, 0x5a, 0x95, 0x19, 0x01, 0x50 } },
-	{ 9, { 0x39, 0x20, 0x62, 0x51, 0x5a, 0x95, 0x19, 0x01, 0x50 } },
-	{ 9, { 0x05, 0x3e, 0xd2, 0x69, 0x4e, 0x9a, 0x51, 0x00, 0xf0 } },
-	{ 9, { 0x25, 0x3e, 0xd2, 0x69, 0x4e, 0x9a, 0x51, 0x00, 0xf0 } },
-	{ 9, { 0x0d, 0x3d, 0xa1, 0x40, 0x7d, 0x9f, 0x29, 0xfe, 0x14 } },
-	{ 9, { 0x2d, 0x3d, 0xa1, 0x40, 0x7d, 0x9f, 0x29, 0xfe, 0x14 } },
-	{ 9, { 0x15, 0x73, 0xa1, 0x50, 0x5d, 0xa6, 0xf5, 0xfe, 0x38 } },
-	{ 9, { 0x35, 0x73, 0xa1, 0x50, 0x5d, 0xa6, 0xf5, 0xfe, 0x38 } },
-	{ 9, { 0x1d, 0xed, 0xd0, 0x68, 0x29, 0xb4, 0xe1, 0x00, 0xb8 } },
-	{ 9, { 0x3d, 0xed, 0xd0, 0x68, 0x29, 0xb4, 0xe1, 0x00, 0xb8 } },
-	{ 3, { 0x80, 0xb3, 0x0a } },
-	{-1, { 0 } }
-};
-
-/* bring hardware to a sane state. this has to be done, just in case someone
-   wants to capture from this device before it has been properly initialized.
-   the capture engine would badly fail, because no valid signal arrives on the
-   saa7146, thus leading to timeouts and stuff. */
-static int mxb_init_done(struct saa7146_dev* dev)
-{
-	struct mxb* mxb = (struct mxb*)dev->ext_priv;
-	struct i2c_msg msg;
-	struct tuner_setup tun_setup;
-	v4l2_std_id std = V4L2_STD_PAL_BG;
-
-	int i = 0, err = 0;
-
-	/* mute audio on tea6420s */
-	tea6420_route(mxb, 6);
-
-	/* select video mode in saa7111a */
-	saa7111a_call(mxb, core, s_std, std);
-
-	/* select tuner-output on saa7111a */
-	i = 0;
-	saa7111a_call(mxb, video, s_routing, SAA7115_COMPOSITE0,
-		SAA7111_FMT_CCIR, 0);
-
-	/* select a tuner type */
-	tun_setup.mode_mask = T_ANALOG_TV;
-	tun_setup.addr = ADDR_UNSET;
-	tun_setup.type = TUNER_PHILIPS_PAL;
-	tuner_call(mxb, tuner, s_type_addr, &tun_setup);
-	/* tune in some frequency on tuner */
-	mxb->cur_freq.tuner = 0;
-	mxb->cur_freq.type = V4L2_TUNER_ANALOG_TV;
-	mxb->cur_freq.frequency = freq;
-	tuner_call(mxb, tuner, s_frequency, &mxb->cur_freq);
-
-	/* set a default video standard */
-	/* These two gpio calls set the GPIO pins that control the tda9820 */
-	saa7146_write(dev, GPIO_CTRL, 0x00404050);
-	saa7111a_call(mxb, core, s_gpio, 1);
-	saa7111a_call(mxb, core, s_std, std);
-	tuner_call(mxb, core, s_std, std);
-
-	/* switch to tuner-channel on tea6415c */
-	tea6415c_call(mxb, video, s_routing, 3, 17, 0);
-
-	/* select tuner-output on multicable on tea6415c */
-	tea6415c_call(mxb, video, s_routing, 3, 13, 0);
-
-	/* the rest for mxb */
-	mxb->cur_input = 0;
-	mxb->cur_audinput = video_audio_connect[mxb->cur_input];
-	mxb->cur_mute = 1;
-
-	mxb->cur_mode = V4L2_TUNER_MODE_STEREO;
-	mxb_update_audmode(mxb);
-
-	/* check if the saa7740 (aka 'sound arena module') is present
-	   on the mxb. if so, we must initialize it. due to lack of
-	   informations about the saa7740, the values were reverse
-	   engineered. */
-	msg.addr = 0x1b;
-	msg.flags = 0;
-	msg.len = mxb_saa7740_init[0].length;
-	msg.buf = &mxb_saa7740_init[0].data[0];
-
-	err = i2c_transfer(&mxb->i2c_adapter, &msg, 1);
-	if (err == 1) {
-		/* the sound arena module is a pos, that's probably the reason
-		   philips refuses to hand out a datasheet for the saa7740...
-		   it seems to screw up the i2c bus, so we disable fast irq
-		   based i2c transactions here and rely on the slow and safe
-		   polling method ... */
-		extension.flags &= ~SAA7146_USE_I2C_IRQ;
-		for (i = 1; ; i++) {
-			if (-1 == mxb_saa7740_init[i].length)
-				break;
-
-			msg.len = mxb_saa7740_init[i].length;
-			msg.buf = &mxb_saa7740_init[i].data[0];
-			err = i2c_transfer(&mxb->i2c_adapter, &msg, 1);
-			if (err != 1) {
-				DEB_D("failed to initialize 'sound arena module'\n");
-				goto err;
-			}
-		}
-		pr_info("'sound arena module' detected\n");
-	}
-err:
-	/* the rest for saa7146: you should definitely set some basic values
-	   for the input-port handling of the saa7146. */
-
-	/* ext->saa has been filled by the core driver */
-
-	/* some stuff is done via variables */
-	saa7146_set_hps_source_and_sync(dev, input_port_selection[mxb->cur_input].hps_source,
-			input_port_selection[mxb->cur_input].hps_sync);
-
-	/* some stuff is done via direct write to the registers */
-
-	/* this is ugly, but because of the fact that this is completely
-	   hardware dependend, it should be done directly... */
-	saa7146_write(dev, DD1_STREAM_B,	0x00000000);
-	saa7146_write(dev, DD1_INIT,		0x02000200);
-	saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
-
-	return 0;
-}
-
-/* interrupt-handler. this gets called when irq_mask is != 0.
-   it must clear the interrupt-bits in irq_mask it has handled */
-/*
-void mxb_irq_bh(struct saa7146_dev* dev, u32* irq_mask)
-{
-	struct mxb* mxb = (struct mxb*)dev->ext_priv;
-}
-*/
-
-static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
-{
-	DEB_EE("VIDIOC_ENUMINPUT %d\n", i->index);
-	if (i->index >= MXB_INPUTS)
-		return -EINVAL;
-	memcpy(i, &mxb_inputs[i->index], sizeof(struct v4l2_input));
-	return 0;
-}
-
-static int vidioc_g_input(struct file *file, void *fh, unsigned int *i)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-	*i = mxb->cur_input;
-
-	DEB_EE("VIDIOC_G_INPUT %d\n", *i);
-	return 0;
-}
-
-static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-	int err = 0;
-	int i = 0;
-
-	DEB_EE("VIDIOC_S_INPUT %d\n", input);
-
-	if (input >= MXB_INPUTS)
-		return -EINVAL;
-
-	mxb->cur_input = input;
-
-	saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source,
-			input_port_selection[input].hps_sync);
-
-	/* prepare switching of tea6415c and saa7111a;
-	   have a look at the 'background'-file for further informations  */
-	switch (input) {
-	case TUNER:
-		i = SAA7115_COMPOSITE0;
-
-		err = tea6415c_call(mxb, video, s_routing, 3, 17, 0);
-
-		/* connect tuner-output always to multicable */
-		if (!err)
-			err = tea6415c_call(mxb, video, s_routing, 3, 13, 0);
-		break;
-	case AUX3_YC:
-		/* nothing to be done here. aux3_yc is
-		   directly connected to the saa711a */
-		i = SAA7115_SVIDEO1;
-		break;
-	case AUX3:
-		/* nothing to be done here. aux3 is
-		   directly connected to the saa711a */
-		i = SAA7115_COMPOSITE1;
-		break;
-	case AUX1:
-		i = SAA7115_COMPOSITE0;
-		err = tea6415c_call(mxb, video, s_routing, 1, 17, 0);
-		break;
-	}
-
-	if (err)
-		return err;
-
-	/* switch video in saa7111a */
-	if (saa7111a_call(mxb, video, s_routing, i, SAA7111_FMT_CCIR, 0))
-		pr_err("VIDIOC_S_INPUT: could not address saa7111a\n");
-
-	mxb->cur_audinput = video_audio_connect[input];
-	/* switch the audio-source only if necessary */
-	if (0 == mxb->cur_mute)
-		tea6420_route(mxb, mxb->cur_audinput);
-	if (mxb->cur_audinput == 0)
-		mxb_update_audmode(mxb);
-
-	return 0;
-}
-
-static int vidioc_g_tuner(struct file *file, void *fh, struct v4l2_tuner *t)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-
-	if (t->index) {
-		DEB_D("VIDIOC_G_TUNER: channel %d does not have a tuner attached\n",
-		      t->index);
-		return -EINVAL;
-	}
-
-	DEB_EE("VIDIOC_G_TUNER: %d\n", t->index);
-
-	memset(t, 0, sizeof(*t));
-	strlcpy(t->name, "TV Tuner", sizeof(t->name));
-	t->type = V4L2_TUNER_ANALOG_TV;
-	t->capability = V4L2_TUNER_CAP_NORM | V4L2_TUNER_CAP_STEREO |
-			V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2 | V4L2_TUNER_CAP_SAP;
-	t->audmode = mxb->cur_mode;
-	return call_all(dev, tuner, g_tuner, t);
-}
-
-static int vidioc_s_tuner(struct file *file, void *fh, struct v4l2_tuner *t)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-
-	if (t->index) {
-		DEB_D("VIDIOC_S_TUNER: channel %d does not have a tuner attached\n",
-		      t->index);
-		return -EINVAL;
-	}
-
-	mxb->cur_mode = t->audmode;
-	return call_all(dev, tuner, s_tuner, t);
-}
-
-static int vidioc_querystd(struct file *file, void *fh, v4l2_std_id *norm)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-
-	return call_all(dev, video, querystd, norm);
-}
-
-static int vidioc_g_frequency(struct file *file, void *fh, struct v4l2_frequency *f)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-
-	if (f->tuner)
-		return -EINVAL;
-	*f = mxb->cur_freq;
-
-	DEB_EE("VIDIOC_G_FREQ: freq:0x%08x\n", mxb->cur_freq.frequency);
-	return 0;
-}
-
-static int vidioc_s_frequency(struct file *file, void *fh, struct v4l2_frequency *f)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-	struct saa7146_vv *vv = dev->vv_data;
-
-	if (f->tuner)
-		return -EINVAL;
-
-	if (V4L2_TUNER_ANALOG_TV != f->type)
-		return -EINVAL;
-
-	DEB_EE("VIDIOC_S_FREQUENCY: freq:0x%08x\n", mxb->cur_freq.frequency);
-
-	/* tune in desired frequency */
-	tuner_call(mxb, tuner, s_frequency, f);
-	/* let the tuner subdev clamp the frequency to the tuner range */
-	tuner_call(mxb, tuner, g_frequency, f);
-	mxb->cur_freq = *f;
-	if (mxb->cur_audinput == 0)
-		mxb_update_audmode(mxb);
-
-	if (mxb->cur_input)
-		return 0;
-
-	/* hack: changing the frequency should invalidate the vbi-counter (=> alevt) */
-	spin_lock(&dev->slock);
-	vv->vbi_fieldcount = 0;
-	spin_unlock(&dev->slock);
-
-	return 0;
-}
-
-static int vidioc_enumaudio(struct file *file, void *fh, struct v4l2_audio *a)
-{
-	if (a->index >= MXB_AUDIOS)
-		return -EINVAL;
-	*a = mxb_audios[a->index];
-	return 0;
-}
-
-static int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *a)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-
-	DEB_EE("VIDIOC_G_AUDIO\n");
-	*a = mxb_audios[mxb->cur_audinput];
-	return 0;
-}
-
-static int vidioc_s_audio(struct file *file, void *fh, struct v4l2_audio *a)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-
-	DEB_D("VIDIOC_S_AUDIO %d\n", a->index);
-	if (mxb_inputs[mxb->cur_input].audioset & (1 << a->index)) {
-		if (mxb->cur_audinput != a->index) {
-			mxb->cur_audinput = a->index;
-			tea6420_route(mxb, a->index);
-			if (mxb->cur_audinput == 0)
-				mxb_update_audmode(mxb);
-		}
-		return 0;
-	}
-	return -EINVAL;
-}
-
-#ifdef CONFIG_VIDEO_ADV_DEBUG
-static int vidioc_g_register(struct file *file, void *fh, struct v4l2_dbg_register *reg)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-
-	if (!capable(CAP_SYS_ADMIN))
-		return -EPERM;
-	if (v4l2_chip_match_host(&reg->match)) {
-		reg->val = saa7146_read(dev, reg->reg);
-		reg->size = 4;
-		return 0;
-	}
-	call_all(dev, core, g_register, reg);
-	return 0;
-}
-
-static int vidioc_s_register(struct file *file, void *fh, struct v4l2_dbg_register *reg)
-{
-	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
-
-	if (!capable(CAP_SYS_ADMIN))
-		return -EPERM;
-	if (v4l2_chip_match_host(&reg->match)) {
-		saa7146_write(dev, reg->reg, reg->val);
-		reg->size = 4;
-		return 0;
-	}
-	return call_all(dev, core, s_register, reg);
-}
-#endif
-
-static struct saa7146_ext_vv vv_data;
-
-/* this function only gets called when the probing was successful */
-static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
-{
-	struct mxb *mxb;
-
-	DEB_EE("dev:%p\n", dev);
-
-	saa7146_vv_init(dev, &vv_data);
-	if (mxb_probe(dev)) {
-		saa7146_vv_release(dev);
-		return -1;
-	}
-	mxb = (struct mxb *)dev->ext_priv;
-
-	vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input;
-	vv_data.vid_ops.vidioc_g_input = vidioc_g_input;
-	vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
-	vv_data.vid_ops.vidioc_querystd = vidioc_querystd;
-	vv_data.vid_ops.vidioc_g_tuner = vidioc_g_tuner;
-	vv_data.vid_ops.vidioc_s_tuner = vidioc_s_tuner;
-	vv_data.vid_ops.vidioc_g_frequency = vidioc_g_frequency;
-	vv_data.vid_ops.vidioc_s_frequency = vidioc_s_frequency;
-	vv_data.vid_ops.vidioc_enumaudio = vidioc_enumaudio;
-	vv_data.vid_ops.vidioc_g_audio = vidioc_g_audio;
-	vv_data.vid_ops.vidioc_s_audio = vidioc_s_audio;
-#ifdef CONFIG_VIDEO_ADV_DEBUG
-	vv_data.vid_ops.vidioc_g_register = vidioc_g_register;
-	vv_data.vid_ops.vidioc_s_register = vidioc_s_register;
-#endif
-	if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) {
-		ERR("cannot register capture v4l2 device. skipping.\n");
-		saa7146_vv_release(dev);
-		return -1;
-	}
-
-	/* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/
-	if (MXB_BOARD_CAN_DO_VBI(dev)) {
-		if (saa7146_register_device(&mxb->vbi_dev, dev, "mxb", VFL_TYPE_VBI)) {
-			ERR("cannot register vbi v4l2 device. skipping.\n");
-		}
-	}
-
-	pr_info("found Multimedia eXtension Board #%d\n", mxb_num);
-
-	mxb_num++;
-	mxb_init_done(dev);
-	return 0;
-}
-
-static int mxb_detach(struct saa7146_dev *dev)
-{
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-
-	DEB_EE("dev:%p\n", dev);
-
-	/* mute audio on tea6420s */
-	tea6420_route(mxb, 6);
-
-	saa7146_unregister_device(&mxb->video_dev,dev);
-	if (MXB_BOARD_CAN_DO_VBI(dev))
-		saa7146_unregister_device(&mxb->vbi_dev, dev);
-	saa7146_vv_release(dev);
-
-	mxb_num--;
-
-	i2c_del_adapter(&mxb->i2c_adapter);
-	kfree(mxb);
-
-	return 0;
-}
-
-static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *standard)
-{
-	struct mxb *mxb = (struct mxb *)dev->ext_priv;
-
-	if (V4L2_STD_PAL_I == standard->id) {
-		v4l2_std_id std = V4L2_STD_PAL_I;
-
-		DEB_D("VIDIOC_S_STD: setting mxb for PAL_I\n");
-		/* These two gpio calls set the GPIO pins that control the tda9820 */
-		saa7146_write(dev, GPIO_CTRL, 0x00404050);
-		saa7111a_call(mxb, core, s_gpio, 0);
-		saa7111a_call(mxb, core, s_std, std);
-		if (mxb->cur_input == 0)
-			tuner_call(mxb, core, s_std, std);
-	} else {
-		v4l2_std_id std = V4L2_STD_PAL_BG;
-
-		if (mxb->cur_input)
-			std = standard->id;
-		DEB_D("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM\n");
-		/* These two gpio calls set the GPIO pins that control the tda9820 */
-		saa7146_write(dev, GPIO_CTRL, 0x00404050);
-		saa7111a_call(mxb, core, s_gpio, 1);
-		saa7111a_call(mxb, core, s_std, std);
-		if (mxb->cur_input == 0)
-			tuner_call(mxb, core, s_std, std);
-	}
-	return 0;
-}
-
-static struct saa7146_standard standard[] = {
-	{
-		.name	= "PAL-BG", 	.id	= V4L2_STD_PAL_BG,
-		.v_offset	= 0x17,	.v_field 	= 288,
-		.h_offset	= 0x14,	.h_pixels 	= 680,
-		.v_max_out	= 576,	.h_max_out	= 768,
-	}, {
-		.name	= "PAL-I", 	.id	= V4L2_STD_PAL_I,
-		.v_offset	= 0x17,	.v_field 	= 288,
-		.h_offset	= 0x14,	.h_pixels 	= 680,
-		.v_max_out	= 576,	.h_max_out	= 768,
-	}, {
-		.name	= "NTSC", 	.id	= V4L2_STD_NTSC,
-		.v_offset	= 0x16,	.v_field 	= 240,
-		.h_offset	= 0x06,	.h_pixels 	= 708,
-		.v_max_out	= 480,	.h_max_out	= 640,
-	}, {
-		.name	= "SECAM", 	.id	= V4L2_STD_SECAM,
-		.v_offset	= 0x14,	.v_field 	= 288,
-		.h_offset	= 0x14,	.h_pixels 	= 720,
-		.v_max_out	= 576,	.h_max_out	= 768,
-	}
-};
-
-static struct saa7146_pci_extension_data mxb = {
-	.ext_priv = "Multimedia eXtension Board",
-	.ext = &extension,
-};
-
-static struct pci_device_id pci_tbl[] = {
-	{
-		.vendor    = PCI_VENDOR_ID_PHILIPS,
-		.device	   = PCI_DEVICE_ID_PHILIPS_SAA7146,
-		.subvendor = 0x0000,
-		.subdevice = 0x0000,
-		.driver_data = (unsigned long)&mxb,
-	}, {
-		.vendor	= 0,
-	}
-};
-
-MODULE_DEVICE_TABLE(pci, pci_tbl);
-
-static struct saa7146_ext_vv vv_data = {
-	.inputs		= MXB_INPUTS,
-	.capabilities	= V4L2_CAP_TUNER | V4L2_CAP_VBI_CAPTURE | V4L2_CAP_AUDIO,
-	.stds		= &standard[0],
-	.num_stds	= sizeof(standard)/sizeof(struct saa7146_standard),
-	.std_callback	= &std_callback,
-};
-
-static struct saa7146_extension extension = {
-	.name		= "Multimedia eXtension Board",
-	.flags		= SAA7146_USE_I2C_IRQ,
-
-	.pci_tbl	= &pci_tbl[0],
-	.module		= THIS_MODULE,
-
-	.attach		= mxb_attach,
-	.detach		= mxb_detach,
-
-	.irq_mask	= 0,
-	.irq_func	= NULL,
-};
-
-static int __init mxb_init_module(void)
-{
-	if (saa7146_register_extension(&extension)) {
-		DEB_S("failed to register extension\n");
-		return -ENODEV;
-	}
-
-	return 0;
-}
-
-static void __exit mxb_cleanup_module(void)
-{
-	saa7146_unregister_extension(&extension);
-}
-
-module_init(mxb_init_module);
-module_exit(mxb_cleanup_module);
-
-MODULE_DESCRIPTION("video4linux-2 driver for the Siemens-Nixdorf 'Multimedia eXtension board'");
-MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
-MODULE_LICENSE("GPL");
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* =?true?q?=5BPATCH=2006/12=5D=20=5Bmedia=5D=20move=20the=20remaining=20PCI=20devices=20to=20drivers/media/pci?=
  2012-08-14 20:55 [PATCH 00/12] media tree reorganization part 2 (second version) Mauro Carvalho Chehab
  2012-08-14 20:55 ` [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir Mauro Carvalho Chehab
@ 2012-08-14 20:55 ` Mauro Carvalho Chehab
  2012-08-14 20:55 ` [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/ Mauro Carvalho Chehab
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-14 20:55 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=true, Size: 225820 bytes --]

Move meye and sta2x11_vip into the drivers/media/pci subdirs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/Kconfig               |    6 +
 drivers/media/pci/Makefile              |    2 +
 drivers/media/pci/meye/Kconfig          |   13 +
 drivers/media/pci/meye/Makefile         |    1 +
 drivers/media/pci/meye/meye.c           | 1964 +++++++++++++++++++++++++++++++
 drivers/media/pci/meye/meye.h           |  324 +++++
 drivers/media/pci/sta2x11/Kconfig       |   12 +
 drivers/media/pci/sta2x11/Makefile      |    1 +
 drivers/media/pci/sta2x11/sta2x11_vip.c | 1550 ++++++++++++++++++++++++
 drivers/media/pci/sta2x11/sta2x11_vip.h |   40 +
 drivers/media/video/Kconfig             |   45 -
 drivers/media/video/Makefile            |    2 -
 drivers/media/video/meye.c              | 1964 -------------------------------
 drivers/media/video/meye.h              |  324 -----
 drivers/media/video/sta2x11_vip.c       | 1550 ------------------------
 drivers/media/video/sta2x11_vip.h       |   40 -
 16 files changed, 3913 insertions(+), 3925 deletions(-)
 create mode 100644 drivers/media/pci/meye/Kconfig
 create mode 100644 drivers/media/pci/meye/Makefile
 create mode 100644 drivers/media/pci/meye/meye.c
 create mode 100644 drivers/media/pci/meye/meye.h
 create mode 100644 drivers/media/pci/sta2x11/Kconfig
 create mode 100644 drivers/media/pci/sta2x11/Makefile
 create mode 100644 drivers/media/pci/sta2x11/sta2x11_vip.c
 create mode 100644 drivers/media/pci/sta2x11/sta2x11_vip.h
 delete mode 100644 drivers/media/video/meye.c
 delete mode 100644 drivers/media/video/meye.h
 delete mode 100644 drivers/media/video/sta2x11_vip.c
 delete mode 100644 drivers/media/video/sta2x11_vip.h

diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index e1a9e1a..4243d5d 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -5,6 +5,12 @@
 menu "Media PCI Adapters"
 	visible if PCI && MEDIA_SUPPORT
 
+if MEDIA_CAMERA_SUPPORT
+	comment "Media capture support"
+source "drivers/media/pci/meye/Kconfig"
+source "drivers/media/pci/sta2x11/Kconfig"
+endif
+
 if MEDIA_ANALOG_TV_SUPPORT
 	comment "Media capture/analog TV support"
 source "drivers/media/pci/ivtv/Kconfig"
diff --git a/drivers/media/pci/Makefile b/drivers/media/pci/Makefile
index bb71e30..c8dc6c7 100644
--- a/drivers/media/pci/Makefile
+++ b/drivers/media/pci/Makefile
@@ -22,3 +22,5 @@ obj-$(CONFIG_VIDEO_CX88) += cx88/
 obj-$(CONFIG_VIDEO_BT848) += bt8xx/
 obj-$(CONFIG_VIDEO_SAA7134) += saa7134/
 obj-$(CONFIG_VIDEO_SAA7164) += saa7164/
+obj-$(CONFIG_VIDEO_MEYE) += meye/
+obj-$(CONFIG_STA2X11_VIP) += sta2x11/
diff --git a/drivers/media/pci/meye/Kconfig b/drivers/media/pci/meye/Kconfig
new file mode 100644
index 0000000..b4bf848
--- /dev/null
+++ b/drivers/media/pci/meye/Kconfig
@@ -0,0 +1,13 @@
+config VIDEO_MEYE
+	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
+	depends on PCI && SONY_LAPTOP && VIDEO_V4L2
+	---help---
+	  This is the video4linux driver for the Motion Eye camera found
+	  in the Vaio Picturebook laptops. Please read the material in
+	  <file:Documentation/video4linux/meye.txt> for more information.
+
+	  If you say Y or M here, you need to say Y or M to "Sony Laptop
+	  Extras" in the misc device section.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called meye.
diff --git a/drivers/media/pci/meye/Makefile b/drivers/media/pci/meye/Makefile
new file mode 100644
index 0000000..4938851
--- /dev/null
+++ b/drivers/media/pci/meye/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_VIDEO_MEYE) += meye.o
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
new file mode 100644
index 0000000..7bc7752
--- /dev/null
+++ b/drivers/media/pci/meye/meye.c
@@ -0,0 +1,1964 @@
+/*
+ * Motion Eye video4linux driver for Sony Vaio PictureBook
+ *
+ * Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net>
+ *
+ * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
+ *
+ * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com>
+ *
+ * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras.
+ *
+ * Some parts borrowed from various video4linux drivers, especially
+ * bttv-driver.c and zoran.c, see original files for credits.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/gfp.h>
+#include <linux/videodev2.h>
+#include <media/v4l2-common.h>
+#include <media/v4l2-device.h>
+#include <media/v4l2-ioctl.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/vmalloc.h>
+#include <linux/dma-mapping.h>
+
+#include "meye.h"
+#include <linux/meye.h>
+
+MODULE_AUTHOR("Stelian Pop <stelian@popies.net>");
+MODULE_DESCRIPTION("v4l2 driver for the MotionEye camera");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(MEYE_DRIVER_VERSION);
+
+/* number of grab buffers */
+static unsigned int gbuffers = 2;
+module_param(gbuffers, int, 0444);
+MODULE_PARM_DESC(gbuffers, "number of capture buffers, default is 2 (32 max)");
+
+/* size of a grab buffer */
+static unsigned int gbufsize = MEYE_MAX_BUFSIZE;
+module_param(gbufsize, int, 0444);
+MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 614400"
+		 " (will be rounded up to a page multiple)");
+
+/* /dev/videoX registration number */
+static int video_nr = -1;
+module_param(video_nr, int, 0444);
+MODULE_PARM_DESC(video_nr, "video device to register (0=/dev/video0, etc)");
+
+/* driver structure - only one possible */
+static struct meye meye;
+
+/****************************************************************************/
+/* Memory allocation routines (stolen from bttv-driver.c)                   */
+/****************************************************************************/
+static void *rvmalloc(unsigned long size)
+{
+	void *mem;
+	unsigned long adr;
+
+	size = PAGE_ALIGN(size);
+	mem = vmalloc_32(size);
+	if (mem) {
+		memset(mem, 0, size);
+		adr = (unsigned long) mem;
+		while (size > 0) {
+			SetPageReserved(vmalloc_to_page((void *)adr));
+			adr += PAGE_SIZE;
+			size -= PAGE_SIZE;
+		}
+	}
+	return mem;
+}
+
+static void rvfree(void * mem, unsigned long size)
+{
+	unsigned long adr;
+
+	if (mem) {
+		adr = (unsigned long) mem;
+		while ((long) size > 0) {
+			ClearPageReserved(vmalloc_to_page((void *)adr));
+			adr += PAGE_SIZE;
+			size -= PAGE_SIZE;
+		}
+		vfree(mem);
+	}
+}
+
+/*
+ * return a page table pointing to N pages of locked memory
+ *
+ * NOTE: The meye device expects DMA addresses on 32 bits, we build
+ * a table of 1024 entries = 4 bytes * 1024 = 4096 bytes.
+ */
+static int ptable_alloc(void)
+{
+	u32 *pt;
+	int i;
+
+	memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable));
+
+	/* give only 32 bit DMA addresses */
+	if (dma_set_mask(&meye.mchip_dev->dev, DMA_BIT_MASK(32)))
+		return -1;
+
+	meye.mchip_ptable_toc = dma_alloc_coherent(&meye.mchip_dev->dev,
+						   PAGE_SIZE,
+						   &meye.mchip_dmahandle,
+						   GFP_KERNEL);
+	if (!meye.mchip_ptable_toc) {
+		meye.mchip_dmahandle = 0;
+		return -1;
+	}
+
+	pt = meye.mchip_ptable_toc;
+	for (i = 0; i < MCHIP_NB_PAGES; i++) {
+		dma_addr_t dma;
+		meye.mchip_ptable[i] = dma_alloc_coherent(&meye.mchip_dev->dev,
+							  PAGE_SIZE,
+							  &dma,
+							  GFP_KERNEL);
+		if (!meye.mchip_ptable[i]) {
+			int j;
+			pt = meye.mchip_ptable_toc;
+			for (j = 0; j < i; ++j) {
+				dma = (dma_addr_t) *pt;
+				dma_free_coherent(&meye.mchip_dev->dev,
+						  PAGE_SIZE,
+						  meye.mchip_ptable[j], dma);
+				pt++;
+			}
+			dma_free_coherent(&meye.mchip_dev->dev,
+					  PAGE_SIZE,
+					  meye.mchip_ptable_toc,
+					  meye.mchip_dmahandle);
+			meye.mchip_ptable_toc = NULL;
+			meye.mchip_dmahandle = 0;
+			return -1;
+		}
+		*pt = (u32) dma;
+		pt++;
+	}
+	return 0;
+}
+
+static void ptable_free(void)
+{
+	u32 *pt;
+	int i;
+
+	pt = meye.mchip_ptable_toc;
+	for (i = 0; i < MCHIP_NB_PAGES; i++) {
+		dma_addr_t dma = (dma_addr_t) *pt;
+		if (meye.mchip_ptable[i])
+			dma_free_coherent(&meye.mchip_dev->dev,
+					  PAGE_SIZE,
+					  meye.mchip_ptable[i], dma);
+		pt++;
+	}
+
+	if (meye.mchip_ptable_toc)
+		dma_free_coherent(&meye.mchip_dev->dev,
+				  PAGE_SIZE,
+				  meye.mchip_ptable_toc,
+				  meye.mchip_dmahandle);
+
+	memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable));
+	meye.mchip_ptable_toc = NULL;
+	meye.mchip_dmahandle = 0;
+}
+
+/* copy data from ptable into buf */
+static void ptable_copy(u8 *buf, int start, int size, int pt_pages)
+{
+	int i;
+
+	for (i = 0; i < (size / PAGE_SIZE) * PAGE_SIZE; i += PAGE_SIZE) {
+		memcpy(buf + i, meye.mchip_ptable[start++], PAGE_SIZE);
+		if (start >= pt_pages)
+			start = 0;
+	}
+	memcpy(buf + i, meye.mchip_ptable[start], size % PAGE_SIZE);
+}
+
+/****************************************************************************/
+/* JPEG tables at different qualities to load into the VRJ chip             */
+/****************************************************************************/
+
+/* return a set of quantisation tables based on a quality from 1 to 10 */
+static u16 *jpeg_quantisation_tables(int *length, int quality)
+{
+	static u16 jpeg_tables[][70] = { {
+		0xdbff, 0x4300, 0xff00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff,
+		0xdbff, 0x4300, 0xff01, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff,
+	},
+	{
+		0xdbff, 0x4300, 0x5000, 0x3c37, 0x3c46, 0x5032, 0x4146, 0x5a46,
+		0x5055, 0x785f, 0x82c8, 0x6e78, 0x786e, 0xaff5, 0x91b9, 0xffc8,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff,
+		0xdbff, 0x4300, 0x5501, 0x5a5a, 0x6978, 0xeb78, 0x8282, 0xffeb,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+		0xffff, 0xffff, 0xffff,
+	},
+	{
+		0xdbff, 0x4300, 0x2800, 0x1e1c, 0x1e23, 0x2819, 0x2123, 0x2d23,
+		0x282b, 0x3c30, 0x4164, 0x373c, 0x3c37, 0x587b, 0x495d, 0x9164,
+		0x9980, 0x8f96, 0x8c80, 0xa08a, 0xe6b4, 0xa0c3, 0xdaaa, 0x8aad,
+		0xc88c, 0xcbff, 0xeeda, 0xfff5, 0xffff, 0xc19b, 0xffff, 0xfaff,
+		0xe6ff, 0xfffd, 0xfff8,
+		0xdbff, 0x4300, 0x2b01, 0x2d2d, 0x353c, 0x763c, 0x4141, 0xf876,
+		0x8ca5, 0xf8a5, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8,
+		0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8,
+		0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8,
+		0xf8f8, 0xf8f8, 0xfff8,
+	},
+	{
+		0xdbff, 0x4300, 0x1b00, 0x1412, 0x1417, 0x1b11, 0x1617, 0x1e17,
+		0x1b1c, 0x2820, 0x2b42, 0x2528, 0x2825, 0x3a51, 0x303d, 0x6042,
+		0x6555, 0x5f64, 0x5d55, 0x6a5b, 0x9978, 0x6a81, 0x9071, 0x5b73,
+		0x855d, 0x86b5, 0x9e90, 0xaba3, 0xabad, 0x8067, 0xc9bc, 0xa6ba,
+		0x99c7, 0xaba8, 0xffa4,
+		0xdbff, 0x4300, 0x1c01, 0x1e1e, 0x2328, 0x4e28, 0x2b2b, 0xa44e,
+		0x5d6e, 0xa46e, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4,
+		0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4,
+		0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4,
+		0xa4a4, 0xa4a4, 0xffa4,
+	},
+	{
+		0xdbff, 0x4300, 0x1400, 0x0f0e, 0x0f12, 0x140d, 0x1012, 0x1712,
+		0x1415, 0x1e18, 0x2132, 0x1c1e, 0x1e1c, 0x2c3d, 0x242e, 0x4932,
+		0x4c40, 0x474b, 0x4640, 0x5045, 0x735a, 0x5062, 0x6d55, 0x4556,
+		0x6446, 0x6588, 0x776d, 0x817b, 0x8182, 0x604e, 0x978d, 0x7d8c,
+		0x7396, 0x817e, 0xff7c,
+		0xdbff, 0x4300, 0x1501, 0x1717, 0x1a1e, 0x3b1e, 0x2121, 0x7c3b,
+		0x4653, 0x7c53, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c,
+		0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c,
+		0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c,
+		0x7c7c, 0x7c7c, 0xff7c,
+	},
+	{
+		0xdbff, 0x4300, 0x1000, 0x0c0b, 0x0c0e, 0x100a, 0x0d0e, 0x120e,
+		0x1011, 0x1813, 0x1a28, 0x1618, 0x1816, 0x2331, 0x1d25, 0x3a28,
+		0x3d33, 0x393c, 0x3833, 0x4037, 0x5c48, 0x404e, 0x5744, 0x3745,
+		0x5038, 0x516d, 0x5f57, 0x6762, 0x6768, 0x4d3e, 0x7971, 0x6470,
+		0x5c78, 0x6765, 0xff63,
+		0xdbff, 0x4300, 0x1101, 0x1212, 0x1518, 0x2f18, 0x1a1a, 0x632f,
+		0x3842, 0x6342, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363,
+		0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363,
+		0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363,
+		0x6363, 0x6363, 0xff63,
+	},
+	{
+		0xdbff, 0x4300, 0x0d00, 0x0a09, 0x0a0b, 0x0d08, 0x0a0b, 0x0e0b,
+		0x0d0e, 0x130f, 0x1520, 0x1213, 0x1312, 0x1c27, 0x171e, 0x2e20,
+		0x3129, 0x2e30, 0x2d29, 0x332c, 0x4a3a, 0x333e, 0x4636, 0x2c37,
+		0x402d, 0x4157, 0x4c46, 0x524e, 0x5253, 0x3e32, 0x615a, 0x505a,
+		0x4a60, 0x5251, 0xff4f,
+		0xdbff, 0x4300, 0x0e01, 0x0e0e, 0x1113, 0x2613, 0x1515, 0x4f26,
+		0x2d35, 0x4f35, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f,
+		0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f,
+		0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f,
+		0x4f4f, 0x4f4f, 0xff4f,
+	},
+	{
+		0xdbff, 0x4300, 0x0a00, 0x0707, 0x0708, 0x0a06, 0x0808, 0x0b08,
+		0x0a0a, 0x0e0b, 0x1018, 0x0d0e, 0x0e0d, 0x151d, 0x1116, 0x2318,
+		0x251f, 0x2224, 0x221f, 0x2621, 0x372b, 0x262f, 0x3429, 0x2129,
+		0x3022, 0x3141, 0x3934, 0x3e3b, 0x3e3e, 0x2e25, 0x4944, 0x3c43,
+		0x3748, 0x3e3d, 0xff3b,
+		0xdbff, 0x4300, 0x0a01, 0x0b0b, 0x0d0e, 0x1c0e, 0x1010, 0x3b1c,
+		0x2228, 0x3b28, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b,
+		0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b,
+		0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b,
+		0x3b3b, 0x3b3b, 0xff3b,
+	},
+	{
+		0xdbff, 0x4300, 0x0600, 0x0504, 0x0506, 0x0604, 0x0506, 0x0706,
+		0x0607, 0x0a08, 0x0a10, 0x090a, 0x0a09, 0x0e14, 0x0c0f, 0x1710,
+		0x1814, 0x1718, 0x1614, 0x1a16, 0x251d, 0x1a1f, 0x231b, 0x161c,
+		0x2016, 0x202c, 0x2623, 0x2927, 0x292a, 0x1f19, 0x302d, 0x282d,
+		0x2530, 0x2928, 0xff28,
+		0xdbff, 0x4300, 0x0701, 0x0707, 0x080a, 0x130a, 0x0a0a, 0x2813,
+		0x161a, 0x281a, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828,
+		0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828,
+		0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828,
+		0x2828, 0x2828, 0xff28,
+	},
+	{
+		0xdbff, 0x4300, 0x0300, 0x0202, 0x0203, 0x0302, 0x0303, 0x0403,
+		0x0303, 0x0504, 0x0508, 0x0405, 0x0504, 0x070a, 0x0607, 0x0c08,
+		0x0c0a, 0x0b0c, 0x0b0a, 0x0d0b, 0x120e, 0x0d10, 0x110e, 0x0b0e,
+		0x100b, 0x1016, 0x1311, 0x1514, 0x1515, 0x0f0c, 0x1817, 0x1416,
+		0x1218, 0x1514, 0xff14,
+		0xdbff, 0x4300, 0x0301, 0x0404, 0x0405, 0x0905, 0x0505, 0x1409,
+		0x0b0d, 0x140d, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414,
+		0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414,
+		0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414,
+		0x1414, 0x1414, 0xff14,
+	},
+	{
+		0xdbff, 0x4300, 0x0100, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+		0x0101, 0x0101, 0xff01,
+		0xdbff, 0x4300, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+		0x0101, 0x0101, 0xff01,
+	} };
+
+	if (quality < 0 || quality > 10) {
+		printk(KERN_WARNING
+		       "meye: invalid quality level %d - using 8\n", quality);
+		quality = 8;
+	}
+
+	*length = ARRAY_SIZE(jpeg_tables[quality]);
+	return jpeg_tables[quality];
+}
+
+/* return a generic set of huffman tables */
+static u16 *jpeg_huffman_tables(int *length)
+{
+	static u16 tables[] = {
+		0xC4FF, 0xB500, 0x0010, 0x0102, 0x0303, 0x0402, 0x0503, 0x0405,
+		0x0004, 0x0100, 0x017D, 0x0302, 0x0400, 0x0511, 0x2112, 0x4131,
+		0x1306, 0x6151, 0x2207, 0x1471, 0x8132, 0xA191, 0x2308, 0xB142,
+		0x15C1, 0xD152, 0x24F0, 0x6233, 0x8272, 0x0A09, 0x1716, 0x1918,
+		0x251A, 0x2726, 0x2928, 0x342A, 0x3635, 0x3837, 0x3A39, 0x4443,
+		0x4645, 0x4847, 0x4A49, 0x5453, 0x5655, 0x5857, 0x5A59, 0x6463,
+		0x6665, 0x6867, 0x6A69, 0x7473, 0x7675, 0x7877, 0x7A79, 0x8483,
+		0x8685, 0x8887, 0x8A89, 0x9392, 0x9594, 0x9796, 0x9998, 0xA29A,
+		0xA4A3, 0xA6A5, 0xA8A7, 0xAAA9, 0xB3B2, 0xB5B4, 0xB7B6, 0xB9B8,
+		0xC2BA, 0xC4C3, 0xC6C5, 0xC8C7, 0xCAC9, 0xD3D2, 0xD5D4, 0xD7D6,
+		0xD9D8, 0xE1DA, 0xE3E2, 0xE5E4, 0xE7E6, 0xE9E8, 0xF1EA, 0xF3F2,
+		0xF5F4, 0xF7F6, 0xF9F8, 0xFFFA,
+		0xC4FF, 0xB500, 0x0011, 0x0102, 0x0402, 0x0304, 0x0704, 0x0405,
+		0x0004, 0x0201, 0x0077, 0x0201, 0x1103, 0x0504, 0x3121, 0x1206,
+		0x5141, 0x6107, 0x1371, 0x3222, 0x0881, 0x4214, 0xA191, 0xC1B1,
+		0x2309, 0x5233, 0x15F0, 0x7262, 0x0AD1, 0x2416, 0xE134, 0xF125,
+		0x1817, 0x1A19, 0x2726, 0x2928, 0x352A, 0x3736, 0x3938, 0x433A,
+		0x4544, 0x4746, 0x4948, 0x534A, 0x5554, 0x5756, 0x5958, 0x635A,
+		0x6564, 0x6766, 0x6968, 0x736A, 0x7574, 0x7776, 0x7978, 0x827A,
+		0x8483, 0x8685, 0x8887, 0x8A89, 0x9392, 0x9594, 0x9796, 0x9998,
+		0xA29A, 0xA4A3, 0xA6A5, 0xA8A7, 0xAAA9, 0xB3B2, 0xB5B4, 0xB7B6,
+		0xB9B8, 0xC2BA, 0xC4C3, 0xC6C5, 0xC8C7, 0xCAC9, 0xD3D2, 0xD5D4,
+		0xD7D6, 0xD9D8, 0xE2DA, 0xE4E3, 0xE6E5, 0xE8E7, 0xEAE9, 0xF3F2,
+		0xF5F4, 0xF7F6, 0xF9F8, 0xFFFA,
+		0xC4FF, 0x1F00, 0x0000, 0x0501, 0x0101, 0x0101, 0x0101, 0x0000,
+		0x0000, 0x0000, 0x0000, 0x0201, 0x0403, 0x0605, 0x0807, 0x0A09,
+		0xFF0B,
+		0xC4FF, 0x1F00, 0x0001, 0x0103, 0x0101, 0x0101, 0x0101, 0x0101,
+		0x0000, 0x0000, 0x0000, 0x0201, 0x0403, 0x0605, 0x0807, 0x0A09,
+		0xFF0B
+	};
+
+	*length = ARRAY_SIZE(tables);
+	return tables;
+}
+
+/****************************************************************************/
+/* MCHIP low-level functions                                                */
+/****************************************************************************/
+
+/* returns the horizontal capture size */
+static inline int mchip_hsize(void)
+{
+	return meye.params.subsample ? 320 : 640;
+}
+
+/* returns the vertical capture size */
+static inline int mchip_vsize(void)
+{
+	return meye.params.subsample ? 240 : 480;
+}
+
+/* waits for a register to be available */
+static void mchip_sync(int reg)
+{
+	u32 status;
+	int i;
+
+	if (reg == MCHIP_MM_FIFO_DATA) {
+		for (i = 0; i < MCHIP_REG_TIMEOUT; i++) {
+			status = readl(meye.mchip_mmregs +
+				       MCHIP_MM_FIFO_STATUS);
+			if (!(status & MCHIP_MM_FIFO_WAIT)) {
+				printk(KERN_WARNING "meye: fifo not ready\n");
+				return;
+			}
+			if (status & MCHIP_MM_FIFO_READY)
+				return;
+			udelay(1);
+		}
+	} else if (reg > 0x80) {
+		u32 mask = (reg < 0x100) ? MCHIP_HIC_STATUS_MCC_RDY
+					 : MCHIP_HIC_STATUS_VRJ_RDY;
+		for (i = 0; i < MCHIP_REG_TIMEOUT; i++) {
+			status = readl(meye.mchip_mmregs + MCHIP_HIC_STATUS);
+			if (status & mask)
+				return;
+			udelay(1);
+		}
+	} else
+		return;
+	printk(KERN_WARNING
+	       "meye: mchip_sync() timeout on reg 0x%x status=0x%x\n",
+	       reg, status);
+}
+
+/* sets a value into the register */
+static inline void mchip_set(int reg, u32 v)
+{
+	mchip_sync(reg);
+	writel(v, meye.mchip_mmregs + reg);
+}
+
+/* get the register value */
+static inline u32 mchip_read(int reg)
+{
+	mchip_sync(reg);
+	return readl(meye.mchip_mmregs + reg);
+}
+
+/* wait for a register to become a particular value */
+static inline int mchip_delay(u32 reg, u32 v)
+{
+	int n = 10;
+	while (--n && mchip_read(reg) != v)
+		udelay(1);
+	return n;
+}
+
+/* setup subsampling */
+static void mchip_subsample(void)
+{
+	mchip_set(MCHIP_MCC_R_SAMPLING, meye.params.subsample);
+	mchip_set(MCHIP_MCC_R_XRANGE, mchip_hsize());
+	mchip_set(MCHIP_MCC_R_YRANGE, mchip_vsize());
+	mchip_set(MCHIP_MCC_B_XRANGE, mchip_hsize());
+	mchip_set(MCHIP_MCC_B_YRANGE, mchip_vsize());
+	mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE);
+}
+
+/* set the framerate into the mchip */
+static void mchip_set_framerate(void)
+{
+	mchip_set(MCHIP_HIC_S_RATE, meye.params.framerate);
+}
+
+/* load some huffman and quantisation tables into the VRJ chip ready
+   for JPEG compression */
+static void mchip_load_tables(void)
+{
+	int i;
+	int length;
+	u16 *tables;
+
+	tables = jpeg_huffman_tables(&length);
+	for (i = 0; i < length; i++)
+		writel(tables[i], meye.mchip_mmregs + MCHIP_VRJ_TABLE_DATA);
+
+	tables = jpeg_quantisation_tables(&length, meye.params.quality);
+	for (i = 0; i < length; i++)
+		writel(tables[i], meye.mchip_mmregs + MCHIP_VRJ_TABLE_DATA);
+}
+
+/* setup the VRJ parameters in the chip */
+static void mchip_vrj_setup(u8 mode)
+{
+	mchip_set(MCHIP_VRJ_BUS_MODE, 5);
+	mchip_set(MCHIP_VRJ_SIGNAL_ACTIVE_LEVEL, 0x1f);
+	mchip_set(MCHIP_VRJ_PDAT_USE, 1);
+	mchip_set(MCHIP_VRJ_IRQ_FLAG, 0xa0);
+	mchip_set(MCHIP_VRJ_MODE_SPECIFY, mode);
+	mchip_set(MCHIP_VRJ_NUM_LINES, mchip_vsize());
+	mchip_set(MCHIP_VRJ_NUM_PIXELS, mchip_hsize());
+	mchip_set(MCHIP_VRJ_NUM_COMPONENTS, 0x1b);
+	mchip_set(MCHIP_VRJ_LIMIT_COMPRESSED_LO, 0xFFFF);
+	mchip_set(MCHIP_VRJ_LIMIT_COMPRESSED_HI, 0xFFFF);
+	mchip_set(MCHIP_VRJ_COMP_DATA_FORMAT, 0xC);
+	mchip_set(MCHIP_VRJ_RESTART_INTERVAL, 0);
+	mchip_set(MCHIP_VRJ_SOF1, 0x601);
+	mchip_set(MCHIP_VRJ_SOF2, 0x1502);
+	mchip_set(MCHIP_VRJ_SOF3, 0x1503);
+	mchip_set(MCHIP_VRJ_SOF4, 0x1596);
+	mchip_set(MCHIP_VRJ_SOS, 0x0ed0);
+
+	mchip_load_tables();
+}
+
+/* sets the DMA parameters into the chip */
+static void mchip_dma_setup(dma_addr_t dma_addr)
+{
+	int i;
+
+	mchip_set(MCHIP_MM_PT_ADDR, (u32)dma_addr);
+	for (i = 0; i < 4; i++)
+		mchip_set(MCHIP_MM_FIR(i), 0);
+	meye.mchip_fnum = 0;
+}
+
+/* setup for DMA transfers - also zeros the framebuffer */
+static int mchip_dma_alloc(void)
+{
+	if (!meye.mchip_dmahandle)
+		if (ptable_alloc())
+			return -1;
+	return 0;
+}
+
+/* frees the DMA buffer */
+static void mchip_dma_free(void)
+{
+	if (meye.mchip_dmahandle) {
+		mchip_dma_setup(0);
+		ptable_free();
+	}
+}
+
+/* stop any existing HIC action and wait for any dma to complete then
+   reset the dma engine */
+static void mchip_hic_stop(void)
+{
+	int i, j;
+
+	meye.mchip_mode = MCHIP_HIC_MODE_NOOP;
+	if (!(mchip_read(MCHIP_HIC_STATUS) & MCHIP_HIC_STATUS_BUSY))
+		return;
+	for (i = 0; i < 20; ++i) {
+		mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_STOP);
+		mchip_delay(MCHIP_HIC_CMD, 0);
+		for (j = 0; j < 100; ++j) {
+			if (mchip_delay(MCHIP_HIC_STATUS,
+					MCHIP_HIC_STATUS_IDLE))
+				return;
+			msleep(1);
+		}
+		printk(KERN_ERR "meye: need to reset HIC!\n");
+
+		mchip_set(MCHIP_HIC_CTL, MCHIP_HIC_CTL_SOFT_RESET);
+		msleep(250);
+	}
+	printk(KERN_ERR "meye: resetting HIC hanged!\n");
+}
+
+/****************************************************************************/
+/* MCHIP frame processing functions                                         */
+/****************************************************************************/
+
+/* get the next ready frame from the dma engine */
+static u32 mchip_get_frame(void)
+{
+	u32 v;
+
+	v = mchip_read(MCHIP_MM_FIR(meye.mchip_fnum));
+	return v;
+}
+
+/* frees the current frame from the dma engine */
+static void mchip_free_frame(void)
+{
+	mchip_set(MCHIP_MM_FIR(meye.mchip_fnum), 0);
+	meye.mchip_fnum++;
+	meye.mchip_fnum %= 4;
+}
+
+/* read one frame from the framebuffer assuming it was captured using
+   a uncompressed transfer */
+static void mchip_cont_read_frame(u32 v, u8 *buf, int size)
+{
+	int pt_id;
+
+	pt_id = (v >> 17) & 0x3FF;
+
+	ptable_copy(buf, pt_id, size, MCHIP_NB_PAGES);
+}
+
+/* read a compressed frame from the framebuffer */
+static int mchip_comp_read_frame(u32 v, u8 *buf, int size)
+{
+	int pt_start, pt_end, trailer;
+	int fsize;
+	int i;
+
+	pt_start = (v >> 19) & 0xFF;
+	pt_end = (v >> 11) & 0xFF;
+	trailer = (v >> 1) & 0x3FF;
+
+	if (pt_end < pt_start)
+		fsize = (MCHIP_NB_PAGES_MJPEG - pt_start) * PAGE_SIZE +
+			pt_end * PAGE_SIZE + trailer * 4;
+	else
+		fsize = (pt_end - pt_start) * PAGE_SIZE + trailer * 4;
+
+	if (fsize > size) {
+		printk(KERN_WARNING "meye: oversized compressed frame %d\n",
+		       fsize);
+		return -1;
+	}
+
+	ptable_copy(buf, pt_start, fsize, MCHIP_NB_PAGES_MJPEG);
+
+#ifdef MEYE_JPEG_CORRECTION
+
+	/* Some mchip generated jpeg frames are incorrect. In most
+	 * (all ?) of those cases, the final EOI (0xff 0xd9) marker
+	 * is not present at the end of the frame.
+	 *
+	 * Since adding the final marker is not enough to restore
+	 * the jpeg integrity, we drop the frame.
+	 */
+
+	for (i = fsize - 1; i > 0 && buf[i] == 0xff; i--) ;
+
+	if (i < 2 || buf[i - 1] != 0xff || buf[i] != 0xd9)
+		return -1;
+
+#endif
+
+	return fsize;
+}
+
+/* take a picture into SDRAM */
+static void mchip_take_picture(void)
+{
+	int i;
+
+	mchip_hic_stop();
+	mchip_subsample();
+	mchip_dma_setup(meye.mchip_dmahandle);
+
+	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_CAP);
+	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
+
+	mchip_delay(MCHIP_HIC_CMD, 0);
+
+	for (i = 0; i < 100; ++i) {
+		if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE))
+			break;
+		msleep(1);
+	}
+}
+
+/* dma a previously taken picture into a buffer */
+static void mchip_get_picture(u8 *buf, int bufsize)
+{
+	u32 v;
+	int i;
+
+	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_OUT);
+	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
+
+	mchip_delay(MCHIP_HIC_CMD, 0);
+	for (i = 0; i < 100; ++i) {
+		if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE))
+			break;
+		msleep(1);
+	}
+	for (i = 0; i < 4; ++i) {
+		v = mchip_get_frame();
+		if (v & MCHIP_MM_FIR_RDY) {
+			mchip_cont_read_frame(v, buf, bufsize);
+			break;
+		}
+		mchip_free_frame();
+	}
+}
+
+/* start continuous dma capture */
+static void mchip_continuous_start(void)
+{
+	mchip_hic_stop();
+	mchip_subsample();
+	mchip_set_framerate();
+	mchip_dma_setup(meye.mchip_dmahandle);
+
+	meye.mchip_mode = MCHIP_HIC_MODE_CONT_OUT;
+
+	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_CONT_OUT);
+	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
+
+	mchip_delay(MCHIP_HIC_CMD, 0);
+}
+
+/* compress one frame into a buffer */
+static int mchip_compress_frame(u8 *buf, int bufsize)
+{
+	u32 v;
+	int len = -1, i;
+
+	mchip_vrj_setup(0x3f);
+	udelay(50);
+
+	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_COMP);
+	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
+
+	mchip_delay(MCHIP_HIC_CMD, 0);
+	for (i = 0; i < 100; ++i) {
+		if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE))
+			break;
+		msleep(1);
+	}
+
+	for (i = 0; i < 4; ++i) {
+		v = mchip_get_frame();
+		if (v & MCHIP_MM_FIR_RDY) {
+			len = mchip_comp_read_frame(v, buf, bufsize);
+			break;
+		}
+		mchip_free_frame();
+	}
+	return len;
+}
+
+#if 0
+/* uncompress one image into a buffer */
+static int mchip_uncompress_frame(u8 *img, int imgsize, u8 *buf, int bufsize)
+{
+	mchip_vrj_setup(0x3f);
+	udelay(50);
+
+	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_DECOMP);
+	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
+
+	mchip_delay(MCHIP_HIC_CMD, 0);
+
+	return mchip_comp_read_frame(buf, bufsize);
+}
+#endif
+
+/* start continuous compressed capture */
+static void mchip_cont_compression_start(void)
+{
+	mchip_hic_stop();
+	mchip_vrj_setup(0x3f);
+	mchip_subsample();
+	mchip_set_framerate();
+	mchip_dma_setup(meye.mchip_dmahandle);
+
+	meye.mchip_mode = MCHIP_HIC_MODE_CONT_COMP;
+
+	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_CONT_COMP);
+	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
+
+	mchip_delay(MCHIP_HIC_CMD, 0);
+}
+
+/****************************************************************************/
+/* Interrupt handling                                                       */
+/****************************************************************************/
+
+static irqreturn_t meye_irq(int irq, void *dev_id)
+{
+	u32 v;
+	int reqnr;
+	static int sequence;
+
+	v = mchip_read(MCHIP_MM_INTA);
+
+	if (meye.mchip_mode != MCHIP_HIC_MODE_CONT_OUT &&
+	    meye.mchip_mode != MCHIP_HIC_MODE_CONT_COMP)
+		return IRQ_NONE;
+
+again:
+	v = mchip_get_frame();
+	if (!(v & MCHIP_MM_FIR_RDY))
+		return IRQ_HANDLED;
+
+	if (meye.mchip_mode == MCHIP_HIC_MODE_CONT_OUT) {
+		if (kfifo_out_locked(&meye.grabq, (unsigned char *)&reqnr,
+			      sizeof(int), &meye.grabq_lock) != sizeof(int)) {
+			mchip_free_frame();
+			return IRQ_HANDLED;
+		}
+		mchip_cont_read_frame(v, meye.grab_fbuffer + gbufsize * reqnr,
+				      mchip_hsize() * mchip_vsize() * 2);
+		meye.grab_buffer[reqnr].size = mchip_hsize() * mchip_vsize() * 2;
+		meye.grab_buffer[reqnr].state = MEYE_BUF_DONE;
+		do_gettimeofday(&meye.grab_buffer[reqnr].timestamp);
+		meye.grab_buffer[reqnr].sequence = sequence++;
+		kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr,
+				sizeof(int), &meye.doneq_lock);
+		wake_up_interruptible(&meye.proc_list);
+	} else {
+		int size;
+		size = mchip_comp_read_frame(v, meye.grab_temp, gbufsize);
+		if (size == -1) {
+			mchip_free_frame();
+			goto again;
+		}
+		if (kfifo_out_locked(&meye.grabq, (unsigned char *)&reqnr,
+			      sizeof(int), &meye.grabq_lock) != sizeof(int)) {
+			mchip_free_frame();
+			goto again;
+		}
+		memcpy(meye.grab_fbuffer + gbufsize * reqnr, meye.grab_temp,
+		       size);
+		meye.grab_buffer[reqnr].size = size;
+		meye.grab_buffer[reqnr].state = MEYE_BUF_DONE;
+		do_gettimeofday(&meye.grab_buffer[reqnr].timestamp);
+		meye.grab_buffer[reqnr].sequence = sequence++;
+		kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr,
+				sizeof(int), &meye.doneq_lock);
+		wake_up_interruptible(&meye.proc_list);
+	}
+	mchip_free_frame();
+	goto again;
+}
+
+/****************************************************************************/
+/* video4linux integration                                                  */
+/****************************************************************************/
+
+static int meye_open(struct file *file)
+{
+	int i;
+
+	if (test_and_set_bit(0, &meye.in_use))
+		return -EBUSY;
+
+	mchip_hic_stop();
+
+	if (mchip_dma_alloc()) {
+		printk(KERN_ERR "meye: mchip framebuffer allocation failed\n");
+		clear_bit(0, &meye.in_use);
+		return -ENOBUFS;
+	}
+
+	for (i = 0; i < MEYE_MAX_BUFNBRS; i++)
+		meye.grab_buffer[i].state = MEYE_BUF_UNUSED;
+	kfifo_reset(&meye.grabq);
+	kfifo_reset(&meye.doneq);
+	return 0;
+}
+
+static int meye_release(struct file *file)
+{
+	mchip_hic_stop();
+	mchip_dma_free();
+	clear_bit(0, &meye.in_use);
+	return 0;
+}
+
+static int meyeioc_g_params(struct meye_params *p)
+{
+	*p = meye.params;
+	return 0;
+}
+
+static int meyeioc_s_params(struct meye_params *jp)
+{
+	if (jp->subsample > 1)
+		return -EINVAL;
+
+	if (jp->quality > 10)
+		return -EINVAL;
+
+	if (jp->sharpness > 63 || jp->agc > 63 || jp->picture > 63)
+		return -EINVAL;
+
+	if (jp->framerate > 31)
+		return -EINVAL;
+
+	mutex_lock(&meye.lock);
+
+	if (meye.params.subsample != jp->subsample ||
+	    meye.params.quality != jp->quality)
+		mchip_hic_stop();	/* need restart */
+
+	meye.params = *jp;
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS,
+			      meye.params.sharpness);
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC,
+			      meye.params.agc);
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE,
+			      meye.params.picture);
+	mutex_unlock(&meye.lock);
+
+	return 0;
+}
+
+static int meyeioc_qbuf_capt(int *nb)
+{
+	if (!meye.grab_fbuffer)
+		return -EINVAL;
+
+	if (*nb >= gbuffers)
+		return -EINVAL;
+
+	if (*nb < 0) {
+		/* stop capture */
+		mchip_hic_stop();
+		return 0;
+	}
+
+	if (meye.grab_buffer[*nb].state != MEYE_BUF_UNUSED)
+		return -EBUSY;
+
+	mutex_lock(&meye.lock);
+
+	if (meye.mchip_mode != MCHIP_HIC_MODE_CONT_COMP)
+		mchip_cont_compression_start();
+
+	meye.grab_buffer[*nb].state = MEYE_BUF_USING;
+	kfifo_in_locked(&meye.grabq, (unsigned char *)nb, sizeof(int),
+			 &meye.grabq_lock);
+	mutex_unlock(&meye.lock);
+
+	return 0;
+}
+
+static int meyeioc_sync(struct file *file, void *fh, int *i)
+{
+	int unused;
+
+	if (*i < 0 || *i >= gbuffers)
+		return -EINVAL;
+
+	mutex_lock(&meye.lock);
+	switch (meye.grab_buffer[*i].state) {
+
+	case MEYE_BUF_UNUSED:
+		mutex_unlock(&meye.lock);
+		return -EINVAL;
+	case MEYE_BUF_USING:
+		if (file->f_flags & O_NONBLOCK) {
+			mutex_unlock(&meye.lock);
+			return -EAGAIN;
+		}
+		if (wait_event_interruptible(meye.proc_list,
+			(meye.grab_buffer[*i].state != MEYE_BUF_USING))) {
+			mutex_unlock(&meye.lock);
+			return -EINTR;
+		}
+		/* fall through */
+	case MEYE_BUF_DONE:
+		meye.grab_buffer[*i].state = MEYE_BUF_UNUSED;
+		if (kfifo_out_locked(&meye.doneq, (unsigned char *)&unused,
+				sizeof(int), &meye.doneq_lock) != sizeof(int))
+					break;
+	}
+	*i = meye.grab_buffer[*i].size;
+	mutex_unlock(&meye.lock);
+	return 0;
+}
+
+static int meyeioc_stillcapt(void)
+{
+	if (!meye.grab_fbuffer)
+		return -EINVAL;
+
+	if (meye.grab_buffer[0].state != MEYE_BUF_UNUSED)
+		return -EBUSY;
+
+	mutex_lock(&meye.lock);
+	meye.grab_buffer[0].state = MEYE_BUF_USING;
+	mchip_take_picture();
+
+	mchip_get_picture(meye.grab_fbuffer,
+			mchip_hsize() * mchip_vsize() * 2);
+
+	meye.grab_buffer[0].state = MEYE_BUF_DONE;
+	mutex_unlock(&meye.lock);
+
+	return 0;
+}
+
+static int meyeioc_stilljcapt(int *len)
+{
+	if (!meye.grab_fbuffer)
+		return -EINVAL;
+
+	if (meye.grab_buffer[0].state != MEYE_BUF_UNUSED)
+		return -EBUSY;
+
+	mutex_lock(&meye.lock);
+	meye.grab_buffer[0].state = MEYE_BUF_USING;
+	*len = -1;
+
+	while (*len == -1) {
+		mchip_take_picture();
+		*len = mchip_compress_frame(meye.grab_fbuffer, gbufsize);
+	}
+
+	meye.grab_buffer[0].state = MEYE_BUF_DONE;
+	mutex_unlock(&meye.lock);
+	return 0;
+}
+
+static int vidioc_querycap(struct file *file, void *fh,
+				struct v4l2_capability *cap)
+{
+	strcpy(cap->driver, "meye");
+	strcpy(cap->card, "meye");
+	sprintf(cap->bus_info, "PCI:%s", pci_name(meye.mchip_dev));
+
+	cap->version = (MEYE_DRIVER_MAJORVERSION << 8) +
+		       MEYE_DRIVER_MINORVERSION;
+
+	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
+			    V4L2_CAP_STREAMING;
+
+	return 0;
+}
+
+static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
+{
+	if (i->index != 0)
+		return -EINVAL;
+
+	strcpy(i->name, "Camera");
+	i->type = V4L2_INPUT_TYPE_CAMERA;
+
+	return 0;
+}
+
+static int vidioc_g_input(struct file *file, void *fh, unsigned int *i)
+{
+	*i = 0;
+	return 0;
+}
+
+static int vidioc_s_input(struct file *file, void *fh, unsigned int i)
+{
+	if (i != 0)
+		return -EINVAL;
+
+	return 0;
+}
+
+static int vidioc_queryctrl(struct file *file, void *fh,
+				struct v4l2_queryctrl *c)
+{
+	switch (c->id) {
+
+	case V4L2_CID_BRIGHTNESS:
+		c->type = V4L2_CTRL_TYPE_INTEGER;
+		strcpy(c->name, "Brightness");
+		c->minimum = 0;
+		c->maximum = 63;
+		c->step = 1;
+		c->default_value = 32;
+		c->flags = 0;
+		break;
+	case V4L2_CID_HUE:
+		c->type = V4L2_CTRL_TYPE_INTEGER;
+		strcpy(c->name, "Hue");
+		c->minimum = 0;
+		c->maximum = 63;
+		c->step = 1;
+		c->default_value = 32;
+		c->flags = 0;
+		break;
+	case V4L2_CID_CONTRAST:
+		c->type = V4L2_CTRL_TYPE_INTEGER;
+		strcpy(c->name, "Contrast");
+		c->minimum = 0;
+		c->maximum = 63;
+		c->step = 1;
+		c->default_value = 32;
+		c->flags = 0;
+		break;
+	case V4L2_CID_SATURATION:
+		c->type = V4L2_CTRL_TYPE_INTEGER;
+		strcpy(c->name, "Saturation");
+		c->minimum = 0;
+		c->maximum = 63;
+		c->step = 1;
+		c->default_value = 32;
+		c->flags = 0;
+		break;
+	case V4L2_CID_AGC:
+		c->type = V4L2_CTRL_TYPE_INTEGER;
+		strcpy(c->name, "Agc");
+		c->minimum = 0;
+		c->maximum = 63;
+		c->step = 1;
+		c->default_value = 48;
+		c->flags = 0;
+		break;
+	case V4L2_CID_MEYE_SHARPNESS:
+	case V4L2_CID_SHARPNESS:
+		c->type = V4L2_CTRL_TYPE_INTEGER;
+		strcpy(c->name, "Sharpness");
+		c->minimum = 0;
+		c->maximum = 63;
+		c->step = 1;
+		c->default_value = 32;
+
+		/* Continue to report legacy private SHARPNESS ctrl but
+		 * say it is disabled in preference to ctrl in the spec
+		 */
+		c->flags = (c->id == V4L2_CID_SHARPNESS) ? 0 :
+						V4L2_CTRL_FLAG_DISABLED;
+		break;
+	case V4L2_CID_PICTURE:
+		c->type = V4L2_CTRL_TYPE_INTEGER;
+		strcpy(c->name, "Picture");
+		c->minimum = 0;
+		c->maximum = 63;
+		c->step = 1;
+		c->default_value = 0;
+		c->flags = 0;
+		break;
+	case V4L2_CID_JPEGQUAL:
+		c->type = V4L2_CTRL_TYPE_INTEGER;
+		strcpy(c->name, "JPEG quality");
+		c->minimum = 0;
+		c->maximum = 10;
+		c->step = 1;
+		c->default_value = 8;
+		c->flags = 0;
+		break;
+	case V4L2_CID_FRAMERATE:
+		c->type = V4L2_CTRL_TYPE_INTEGER;
+		strcpy(c->name, "Framerate");
+		c->minimum = 0;
+		c->maximum = 31;
+		c->step = 1;
+		c->default_value = 0;
+		c->flags = 0;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static int vidioc_s_ctrl(struct file *file, void *fh, struct v4l2_control *c)
+{
+	mutex_lock(&meye.lock);
+	switch (c->id) {
+	case V4L2_CID_BRIGHTNESS:
+		sony_pic_camera_command(
+			SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, c->value);
+		meye.brightness = c->value << 10;
+		break;
+	case V4L2_CID_HUE:
+		sony_pic_camera_command(
+			SONY_PIC_COMMAND_SETCAMERAHUE, c->value);
+		meye.hue = c->value << 10;
+		break;
+	case V4L2_CID_CONTRAST:
+		sony_pic_camera_command(
+			SONY_PIC_COMMAND_SETCAMERACONTRAST, c->value);
+		meye.contrast = c->value << 10;
+		break;
+	case V4L2_CID_SATURATION:
+		sony_pic_camera_command(
+			SONY_PIC_COMMAND_SETCAMERACOLOR, c->value);
+		meye.colour = c->value << 10;
+		break;
+	case V4L2_CID_AGC:
+		sony_pic_camera_command(
+			SONY_PIC_COMMAND_SETCAMERAAGC, c->value);
+		meye.params.agc = c->value;
+		break;
+	case V4L2_CID_SHARPNESS:
+	case V4L2_CID_MEYE_SHARPNESS:
+		sony_pic_camera_command(
+			SONY_PIC_COMMAND_SETCAMERASHARPNESS, c->value);
+		meye.params.sharpness = c->value;
+		break;
+	case V4L2_CID_PICTURE:
+		sony_pic_camera_command(
+			SONY_PIC_COMMAND_SETCAMERAPICTURE, c->value);
+		meye.params.picture = c->value;
+		break;
+	case V4L2_CID_JPEGQUAL:
+		meye.params.quality = c->value;
+		break;
+	case V4L2_CID_FRAMERATE:
+		meye.params.framerate = c->value;
+		break;
+	default:
+		mutex_unlock(&meye.lock);
+		return -EINVAL;
+	}
+	mutex_unlock(&meye.lock);
+
+	return 0;
+}
+
+static int vidioc_g_ctrl(struct file *file, void *fh, struct v4l2_control *c)
+{
+	mutex_lock(&meye.lock);
+	switch (c->id) {
+	case V4L2_CID_BRIGHTNESS:
+		c->value = meye.brightness >> 10;
+		break;
+	case V4L2_CID_HUE:
+		c->value = meye.hue >> 10;
+		break;
+	case V4L2_CID_CONTRAST:
+		c->value = meye.contrast >> 10;
+		break;
+	case V4L2_CID_SATURATION:
+		c->value = meye.colour >> 10;
+		break;
+	case V4L2_CID_AGC:
+		c->value = meye.params.agc;
+		break;
+	case V4L2_CID_SHARPNESS:
+	case V4L2_CID_MEYE_SHARPNESS:
+		c->value = meye.params.sharpness;
+		break;
+	case V4L2_CID_PICTURE:
+		c->value = meye.params.picture;
+		break;
+	case V4L2_CID_JPEGQUAL:
+		c->value = meye.params.quality;
+		break;
+	case V4L2_CID_FRAMERATE:
+		c->value = meye.params.framerate;
+		break;
+	default:
+		mutex_unlock(&meye.lock);
+		return -EINVAL;
+	}
+	mutex_unlock(&meye.lock);
+
+	return 0;
+}
+
+static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh,
+				struct v4l2_fmtdesc *f)
+{
+	if (f->index > 1)
+		return -EINVAL;
+
+	if (f->index == 0) {
+		/* standard YUV 422 capture */
+		f->flags = 0;
+		strcpy(f->description, "YUV422");
+		f->pixelformat = V4L2_PIX_FMT_YUYV;
+	} else {
+		/* compressed MJPEG capture */
+		f->flags = V4L2_FMT_FLAG_COMPRESSED;
+		strcpy(f->description, "MJPEG");
+		f->pixelformat = V4L2_PIX_FMT_MJPEG;
+	}
+
+	return 0;
+}
+
+static int vidioc_try_fmt_vid_cap(struct file *file, void *fh,
+				struct v4l2_format *f)
+{
+	if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_YUYV &&
+	    f->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG)
+		return -EINVAL;
+
+	if (f->fmt.pix.field != V4L2_FIELD_ANY &&
+	    f->fmt.pix.field != V4L2_FIELD_NONE)
+		return -EINVAL;
+
+	f->fmt.pix.field = V4L2_FIELD_NONE;
+
+	if (f->fmt.pix.width <= 320) {
+		f->fmt.pix.width = 320;
+		f->fmt.pix.height = 240;
+	} else {
+		f->fmt.pix.width = 640;
+		f->fmt.pix.height = 480;
+	}
+
+	f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
+	f->fmt.pix.sizeimage = f->fmt.pix.height *
+			       f->fmt.pix.bytesperline;
+	f->fmt.pix.colorspace = 0;
+	f->fmt.pix.priv = 0;
+
+	return 0;
+}
+
+static int vidioc_g_fmt_vid_cap(struct file *file, void *fh,
+				    struct v4l2_format *f)
+{
+	switch (meye.mchip_mode) {
+	case MCHIP_HIC_MODE_CONT_OUT:
+	default:
+		f->fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
+		break;
+	case MCHIP_HIC_MODE_CONT_COMP:
+		f->fmt.pix.pixelformat = V4L2_PIX_FMT_MJPEG;
+		break;
+	}
+
+	f->fmt.pix.field = V4L2_FIELD_NONE;
+	f->fmt.pix.width = mchip_hsize();
+	f->fmt.pix.height = mchip_vsize();
+	f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
+	f->fmt.pix.sizeimage = f->fmt.pix.height *
+			       f->fmt.pix.bytesperline;
+
+	return 0;
+}
+
+static int vidioc_s_fmt_vid_cap(struct file *file, void *fh,
+				    struct v4l2_format *f)
+{
+	if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_YUYV &&
+	    f->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG)
+		return -EINVAL;
+
+	if (f->fmt.pix.field != V4L2_FIELD_ANY &&
+	    f->fmt.pix.field != V4L2_FIELD_NONE)
+		return -EINVAL;
+
+	f->fmt.pix.field = V4L2_FIELD_NONE;
+	mutex_lock(&meye.lock);
+
+	if (f->fmt.pix.width <= 320) {
+		f->fmt.pix.width = 320;
+		f->fmt.pix.height = 240;
+		meye.params.subsample = 1;
+	} else {
+		f->fmt.pix.width = 640;
+		f->fmt.pix.height = 480;
+		meye.params.subsample = 0;
+	}
+
+	switch (f->fmt.pix.pixelformat) {
+	case V4L2_PIX_FMT_YUYV:
+		meye.mchip_mode = MCHIP_HIC_MODE_CONT_OUT;
+		break;
+	case V4L2_PIX_FMT_MJPEG:
+		meye.mchip_mode = MCHIP_HIC_MODE_CONT_COMP;
+		break;
+	}
+
+	mutex_unlock(&meye.lock);
+	f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
+	f->fmt.pix.sizeimage = f->fmt.pix.height *
+			       f->fmt.pix.bytesperline;
+	f->fmt.pix.colorspace = 0;
+	f->fmt.pix.priv = 0;
+
+	return 0;
+}
+
+static int vidioc_reqbufs(struct file *file, void *fh,
+				struct v4l2_requestbuffers *req)
+{
+	int i;
+
+	if (req->memory != V4L2_MEMORY_MMAP)
+		return -EINVAL;
+
+	if (meye.grab_fbuffer && req->count == gbuffers) {
+		/* already allocated, no modifications */
+		return 0;
+	}
+
+	mutex_lock(&meye.lock);
+	if (meye.grab_fbuffer) {
+		for (i = 0; i < gbuffers; i++)
+			if (meye.vma_use_count[i]) {
+				mutex_unlock(&meye.lock);
+				return -EINVAL;
+			}
+		rvfree(meye.grab_fbuffer, gbuffers * gbufsize);
+		meye.grab_fbuffer = NULL;
+	}
+
+	gbuffers = max(2, min((int)req->count, MEYE_MAX_BUFNBRS));
+	req->count = gbuffers;
+	meye.grab_fbuffer = rvmalloc(gbuffers * gbufsize);
+
+	if (!meye.grab_fbuffer) {
+		printk(KERN_ERR "meye: v4l framebuffer allocation"
+				" failed\n");
+		mutex_unlock(&meye.lock);
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < gbuffers; i++)
+		meye.vma_use_count[i] = 0;
+
+	mutex_unlock(&meye.lock);
+
+	return 0;
+}
+
+static int vidioc_querybuf(struct file *file, void *fh, struct v4l2_buffer *buf)
+{
+	unsigned int index = buf->index;
+
+	if (index >= gbuffers)
+		return -EINVAL;
+
+	buf->bytesused = meye.grab_buffer[index].size;
+	buf->flags = V4L2_BUF_FLAG_MAPPED;
+
+	if (meye.grab_buffer[index].state == MEYE_BUF_USING)
+		buf->flags |= V4L2_BUF_FLAG_QUEUED;
+
+	if (meye.grab_buffer[index].state == MEYE_BUF_DONE)
+		buf->flags |= V4L2_BUF_FLAG_DONE;
+
+	buf->field = V4L2_FIELD_NONE;
+	buf->timestamp = meye.grab_buffer[index].timestamp;
+	buf->sequence = meye.grab_buffer[index].sequence;
+	buf->memory = V4L2_MEMORY_MMAP;
+	buf->m.offset = index * gbufsize;
+	buf->length = gbufsize;
+
+	return 0;
+}
+
+static int vidioc_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
+{
+	if (buf->memory != V4L2_MEMORY_MMAP)
+		return -EINVAL;
+
+	if (buf->index >= gbuffers)
+		return -EINVAL;
+
+	if (meye.grab_buffer[buf->index].state != MEYE_BUF_UNUSED)
+		return -EINVAL;
+
+	mutex_lock(&meye.lock);
+	buf->flags |= V4L2_BUF_FLAG_QUEUED;
+	buf->flags &= ~V4L2_BUF_FLAG_DONE;
+	meye.grab_buffer[buf->index].state = MEYE_BUF_USING;
+	kfifo_in_locked(&meye.grabq, (unsigned char *)&buf->index,
+			sizeof(int), &meye.grabq_lock);
+	mutex_unlock(&meye.lock);
+
+	return 0;
+}
+
+static int vidioc_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
+{
+	int reqnr;
+
+	if (buf->memory != V4L2_MEMORY_MMAP)
+		return -EINVAL;
+
+	mutex_lock(&meye.lock);
+
+	if (kfifo_len(&meye.doneq) == 0 && file->f_flags & O_NONBLOCK) {
+		mutex_unlock(&meye.lock);
+		return -EAGAIN;
+	}
+
+	if (wait_event_interruptible(meye.proc_list,
+				     kfifo_len(&meye.doneq) != 0) < 0) {
+		mutex_unlock(&meye.lock);
+		return -EINTR;
+	}
+
+	if (!kfifo_out_locked(&meye.doneq, (unsigned char *)&reqnr,
+		       sizeof(int), &meye.doneq_lock)) {
+		mutex_unlock(&meye.lock);
+		return -EBUSY;
+	}
+
+	if (meye.grab_buffer[reqnr].state != MEYE_BUF_DONE) {
+		mutex_unlock(&meye.lock);
+		return -EINVAL;
+	}
+
+	buf->index = reqnr;
+	buf->bytesused = meye.grab_buffer[reqnr].size;
+	buf->flags = V4L2_BUF_FLAG_MAPPED;
+	buf->field = V4L2_FIELD_NONE;
+	buf->timestamp = meye.grab_buffer[reqnr].timestamp;
+	buf->sequence = meye.grab_buffer[reqnr].sequence;
+	buf->memory = V4L2_MEMORY_MMAP;
+	buf->m.offset = reqnr * gbufsize;
+	buf->length = gbufsize;
+	meye.grab_buffer[reqnr].state = MEYE_BUF_UNUSED;
+	mutex_unlock(&meye.lock);
+
+	return 0;
+}
+
+static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
+{
+	mutex_lock(&meye.lock);
+
+	switch (meye.mchip_mode) {
+	case MCHIP_HIC_MODE_CONT_OUT:
+		mchip_continuous_start();
+		break;
+	case MCHIP_HIC_MODE_CONT_COMP:
+		mchip_cont_compression_start();
+		break;
+	default:
+		mutex_unlock(&meye.lock);
+		return -EINVAL;
+	}
+
+	mutex_unlock(&meye.lock);
+
+	return 0;
+}
+
+static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
+{
+	mutex_lock(&meye.lock);
+	mchip_hic_stop();
+	kfifo_reset(&meye.grabq);
+	kfifo_reset(&meye.doneq);
+
+	for (i = 0; i < MEYE_MAX_BUFNBRS; i++)
+		meye.grab_buffer[i].state = MEYE_BUF_UNUSED;
+
+	mutex_unlock(&meye.lock);
+	return 0;
+}
+
+static long vidioc_default(struct file *file, void *fh, bool valid_prio,
+						int cmd, void *arg)
+{
+	switch (cmd) {
+	case MEYEIOC_G_PARAMS:
+		return meyeioc_g_params((struct meye_params *) arg);
+
+	case MEYEIOC_S_PARAMS:
+		return meyeioc_s_params((struct meye_params *) arg);
+
+	case MEYEIOC_QBUF_CAPT:
+		return meyeioc_qbuf_capt((int *) arg);
+
+	case MEYEIOC_SYNC:
+		return meyeioc_sync(file, fh, (int *) arg);
+
+	case MEYEIOC_STILLCAPT:
+		return meyeioc_stillcapt();
+
+	case MEYEIOC_STILLJCAPT:
+		return meyeioc_stilljcapt((int *) arg);
+
+	default:
+		return -ENOTTY;
+	}
+
+}
+
+static unsigned int meye_poll(struct file *file, poll_table *wait)
+{
+	unsigned int res = 0;
+
+	mutex_lock(&meye.lock);
+	poll_wait(file, &meye.proc_list, wait);
+	if (kfifo_len(&meye.doneq))
+		res = POLLIN | POLLRDNORM;
+	mutex_unlock(&meye.lock);
+	return res;
+}
+
+static void meye_vm_open(struct vm_area_struct *vma)
+{
+	long idx = (long)vma->vm_private_data;
+	meye.vma_use_count[idx]++;
+}
+
+static void meye_vm_close(struct vm_area_struct *vma)
+{
+	long idx = (long)vma->vm_private_data;
+	meye.vma_use_count[idx]--;
+}
+
+static const struct vm_operations_struct meye_vm_ops = {
+	.open		= meye_vm_open,
+	.close		= meye_vm_close,
+};
+
+static int meye_mmap(struct file *file, struct vm_area_struct *vma)
+{
+	unsigned long start = vma->vm_start;
+	unsigned long size = vma->vm_end - vma->vm_start;
+	unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
+	unsigned long page, pos;
+
+	mutex_lock(&meye.lock);
+	if (size > gbuffers * gbufsize) {
+		mutex_unlock(&meye.lock);
+		return -EINVAL;
+	}
+	if (!meye.grab_fbuffer) {
+		int i;
+
+		/* lazy allocation */
+		meye.grab_fbuffer = rvmalloc(gbuffers*gbufsize);
+		if (!meye.grab_fbuffer) {
+			printk(KERN_ERR "meye: v4l framebuffer allocation failed\n");
+			mutex_unlock(&meye.lock);
+			return -ENOMEM;
+		}
+		for (i = 0; i < gbuffers; i++)
+			meye.vma_use_count[i] = 0;
+	}
+	pos = (unsigned long)meye.grab_fbuffer + offset;
+
+	while (size > 0) {
+		page = vmalloc_to_pfn((void *)pos);
+		if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {
+			mutex_unlock(&meye.lock);
+			return -EAGAIN;
+		}
+		start += PAGE_SIZE;
+		pos += PAGE_SIZE;
+		if (size > PAGE_SIZE)
+			size -= PAGE_SIZE;
+		else
+			size = 0;
+	}
+
+	vma->vm_ops = &meye_vm_ops;
+	vma->vm_flags &= ~VM_IO;	/* not I/O memory */
+	vma->vm_flags |= VM_RESERVED;	/* avoid to swap out this VMA */
+	vma->vm_private_data = (void *) (offset / gbufsize);
+	meye_vm_open(vma);
+
+	mutex_unlock(&meye.lock);
+	return 0;
+}
+
+static const struct v4l2_file_operations meye_fops = {
+	.owner		= THIS_MODULE,
+	.open		= meye_open,
+	.release	= meye_release,
+	.mmap		= meye_mmap,
+	.unlocked_ioctl	= video_ioctl2,
+	.poll		= meye_poll,
+};
+
+static const struct v4l2_ioctl_ops meye_ioctl_ops = {
+	.vidioc_querycap	= vidioc_querycap,
+	.vidioc_enum_input	= vidioc_enum_input,
+	.vidioc_g_input		= vidioc_g_input,
+	.vidioc_s_input		= vidioc_s_input,
+	.vidioc_queryctrl	= vidioc_queryctrl,
+	.vidioc_s_ctrl		= vidioc_s_ctrl,
+	.vidioc_g_ctrl		= vidioc_g_ctrl,
+	.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
+	.vidioc_try_fmt_vid_cap	= vidioc_try_fmt_vid_cap,
+	.vidioc_g_fmt_vid_cap	= vidioc_g_fmt_vid_cap,
+	.vidioc_s_fmt_vid_cap	= vidioc_s_fmt_vid_cap,
+	.vidioc_reqbufs		= vidioc_reqbufs,
+	.vidioc_querybuf	= vidioc_querybuf,
+	.vidioc_qbuf		= vidioc_qbuf,
+	.vidioc_dqbuf		= vidioc_dqbuf,
+	.vidioc_streamon	= vidioc_streamon,
+	.vidioc_streamoff	= vidioc_streamoff,
+	.vidioc_default		= vidioc_default,
+};
+
+static struct video_device meye_template = {
+	.name		= "meye",
+	.fops		= &meye_fops,
+	.ioctl_ops 	= &meye_ioctl_ops,
+	.release	= video_device_release,
+};
+
+#ifdef CONFIG_PM
+static int meye_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+	pci_save_state(pdev);
+	meye.pm_mchip_mode = meye.mchip_mode;
+	mchip_hic_stop();
+	mchip_set(MCHIP_MM_INTA, 0x0);
+	return 0;
+}
+
+static int meye_resume(struct pci_dev *pdev)
+{
+	pci_restore_state(pdev);
+	pci_write_config_word(meye.mchip_dev, MCHIP_PCI_SOFTRESET_SET, 1);
+
+	mchip_delay(MCHIP_HIC_CMD, 0);
+	mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE);
+	msleep(1);
+	mchip_set(MCHIP_VRJ_SOFT_RESET, 1);
+	msleep(1);
+	mchip_set(MCHIP_MM_PCI_MODE, 5);
+	msleep(1);
+	mchip_set(MCHIP_MM_INTA, MCHIP_MM_INTA_HIC_1_MASK);
+
+	switch (meye.pm_mchip_mode) {
+	case MCHIP_HIC_MODE_CONT_OUT:
+		mchip_continuous_start();
+		break;
+	case MCHIP_HIC_MODE_CONT_COMP:
+		mchip_cont_compression_start();
+		break;
+	}
+	return 0;
+}
+#endif
+
+static int __devinit meye_probe(struct pci_dev *pcidev,
+				const struct pci_device_id *ent)
+{
+	struct v4l2_device *v4l2_dev = &meye.v4l2_dev;
+	int ret = -EBUSY;
+	unsigned long mchip_adr;
+
+	if (meye.mchip_dev != NULL) {
+		printk(KERN_ERR "meye: only one device allowed!\n");
+		goto outnotdev;
+	}
+
+	ret = v4l2_device_register(&pcidev->dev, v4l2_dev);
+	if (ret < 0) {
+		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
+		return ret;
+	}
+	ret = -ENOMEM;
+	meye.mchip_dev = pcidev;
+	meye.vdev = video_device_alloc();
+	if (!meye.vdev) {
+		v4l2_err(v4l2_dev, "video_device_alloc() failed!\n");
+		goto outnotdev;
+	}
+
+	meye.grab_temp = vmalloc(MCHIP_NB_PAGES_MJPEG * PAGE_SIZE);
+	if (!meye.grab_temp) {
+		v4l2_err(v4l2_dev, "grab buffer allocation failed\n");
+		goto outvmalloc;
+	}
+
+	spin_lock_init(&meye.grabq_lock);
+	if (kfifo_alloc(&meye.grabq, sizeof(int) * MEYE_MAX_BUFNBRS,
+				GFP_KERNEL)) {
+		v4l2_err(v4l2_dev, "fifo allocation failed\n");
+		goto outkfifoalloc1;
+	}
+	spin_lock_init(&meye.doneq_lock);
+	if (kfifo_alloc(&meye.doneq, sizeof(int) * MEYE_MAX_BUFNBRS,
+				GFP_KERNEL)) {
+		v4l2_err(v4l2_dev, "fifo allocation failed\n");
+		goto outkfifoalloc2;
+	}
+
+	memcpy(meye.vdev, &meye_template, sizeof(meye_template));
+	meye.vdev->v4l2_dev = &meye.v4l2_dev;
+
+	ret = -EIO;
+	if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
+		v4l2_err(v4l2_dev, "meye: unable to power on the camera\n");
+		v4l2_err(v4l2_dev, "meye: did you enable the camera in "
+				"sonypi using the module options ?\n");
+		goto outsonypienable;
+	}
+
+	if ((ret = pci_enable_device(meye.mchip_dev))) {
+		v4l2_err(v4l2_dev, "meye: pci_enable_device failed\n");
+		goto outenabledev;
+	}
+
+	mchip_adr = pci_resource_start(meye.mchip_dev,0);
+	if (!mchip_adr) {
+		v4l2_err(v4l2_dev, "meye: mchip has no device base address\n");
+		goto outregions;
+	}
+	if (!request_mem_region(pci_resource_start(meye.mchip_dev, 0),
+				pci_resource_len(meye.mchip_dev, 0),
+				"meye")) {
+		v4l2_err(v4l2_dev, "meye: request_mem_region failed\n");
+		goto outregions;
+	}
+	meye.mchip_mmregs = ioremap(mchip_adr, MCHIP_MM_REGS);
+	if (!meye.mchip_mmregs) {
+		v4l2_err(v4l2_dev, "meye: ioremap failed\n");
+		goto outremap;
+	}
+
+	meye.mchip_irq = pcidev->irq;
+	if (request_irq(meye.mchip_irq, meye_irq,
+			IRQF_DISABLED | IRQF_SHARED, "meye", meye_irq)) {
+		v4l2_err(v4l2_dev, "request_irq failed\n");
+		goto outreqirq;
+	}
+
+	pci_write_config_byte(meye.mchip_dev, PCI_CACHE_LINE_SIZE, 8);
+	pci_write_config_byte(meye.mchip_dev, PCI_LATENCY_TIMER, 64);
+
+	pci_set_master(meye.mchip_dev);
+
+	/* Ask the camera to perform a soft reset. */
+	pci_write_config_word(meye.mchip_dev, MCHIP_PCI_SOFTRESET_SET, 1);
+
+	mchip_delay(MCHIP_HIC_CMD, 0);
+	mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE);
+
+	msleep(1);
+	mchip_set(MCHIP_VRJ_SOFT_RESET, 1);
+
+	msleep(1);
+	mchip_set(MCHIP_MM_PCI_MODE, 5);
+
+	msleep(1);
+	mchip_set(MCHIP_MM_INTA, MCHIP_MM_INTA_HIC_1_MASK);
+
+	mutex_init(&meye.lock);
+	init_waitqueue_head(&meye.proc_list);
+	meye.brightness = 32 << 10;
+	meye.hue = 32 << 10;
+	meye.colour = 32 << 10;
+	meye.contrast = 32 << 10;
+	meye.params.subsample = 0;
+	meye.params.quality = 8;
+	meye.params.sharpness = 32;
+	meye.params.agc = 48;
+	meye.params.picture = 0;
+	meye.params.framerate = 0;
+
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, 32);
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE, 32);
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR, 32);
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST, 32);
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS, 32);
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE, 0);
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC, 48);
+
+	if (video_register_device(meye.vdev, VFL_TYPE_GRABBER,
+				  video_nr) < 0) {
+		v4l2_err(v4l2_dev, "video_register_device failed\n");
+		goto outvideoreg;
+	}
+
+	v4l2_info(v4l2_dev, "Motion Eye Camera Driver v%s.\n",
+	       MEYE_DRIVER_VERSION);
+	v4l2_info(v4l2_dev, "mchip KL5A72002 rev. %d, base %lx, irq %d\n",
+	       meye.mchip_dev->revision, mchip_adr, meye.mchip_irq);
+
+	return 0;
+
+outvideoreg:
+	free_irq(meye.mchip_irq, meye_irq);
+outreqirq:
+	iounmap(meye.mchip_mmregs);
+outremap:
+	release_mem_region(pci_resource_start(meye.mchip_dev, 0),
+			   pci_resource_len(meye.mchip_dev, 0));
+outregions:
+	pci_disable_device(meye.mchip_dev);
+outenabledev:
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
+outsonypienable:
+	kfifo_free(&meye.doneq);
+outkfifoalloc2:
+	kfifo_free(&meye.grabq);
+outkfifoalloc1:
+	vfree(meye.grab_temp);
+outvmalloc:
+	video_device_release(meye.vdev);
+outnotdev:
+	return ret;
+}
+
+static void __devexit meye_remove(struct pci_dev *pcidev)
+{
+	video_unregister_device(meye.vdev);
+
+	mchip_hic_stop();
+
+	mchip_dma_free();
+
+	/* disable interrupts */
+	mchip_set(MCHIP_MM_INTA, 0x0);
+
+	free_irq(meye.mchip_irq, meye_irq);
+
+	iounmap(meye.mchip_mmregs);
+
+	release_mem_region(pci_resource_start(meye.mchip_dev, 0),
+			   pci_resource_len(meye.mchip_dev, 0));
+
+	pci_disable_device(meye.mchip_dev);
+
+	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
+
+	kfifo_free(&meye.doneq);
+	kfifo_free(&meye.grabq);
+
+	vfree(meye.grab_temp);
+
+	if (meye.grab_fbuffer) {
+		rvfree(meye.grab_fbuffer, gbuffers*gbufsize);
+		meye.grab_fbuffer = NULL;
+	}
+
+	printk(KERN_INFO "meye: removed\n");
+}
+
+static struct pci_device_id meye_pci_tbl[] = {
+	{ PCI_VDEVICE(KAWASAKI, PCI_DEVICE_ID_MCHIP_KL5A72002), 0 },
+	{ }
+};
+
+MODULE_DEVICE_TABLE(pci, meye_pci_tbl);
+
+static struct pci_driver meye_driver = {
+	.name		= "meye",
+	.id_table	= meye_pci_tbl,
+	.probe		= meye_probe,
+	.remove		= __devexit_p(meye_remove),
+#ifdef CONFIG_PM
+	.suspend	= meye_suspend,
+	.resume		= meye_resume,
+#endif
+};
+
+static int __init meye_init(void)
+{
+	gbuffers = max(2, min((int)gbuffers, MEYE_MAX_BUFNBRS));
+	if (gbufsize < 0 || gbufsize > MEYE_MAX_BUFSIZE)
+		gbufsize = MEYE_MAX_BUFSIZE;
+	gbufsize = PAGE_ALIGN(gbufsize);
+	printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) "
+			 "for capture\n",
+			 gbuffers,
+			 gbufsize / 1024, gbuffers * gbufsize / 1024);
+	return pci_register_driver(&meye_driver);
+}
+
+static void __exit meye_exit(void)
+{
+	pci_unregister_driver(&meye_driver);
+}
+
+module_init(meye_init);
+module_exit(meye_exit);
diff --git a/drivers/media/pci/meye/meye.h b/drivers/media/pci/meye/meye.h
new file mode 100644
index 0000000..4bdeb03
--- /dev/null
+++ b/drivers/media/pci/meye/meye.h
@@ -0,0 +1,324 @@
+/*
+ * Motion Eye video4linux driver for Sony Vaio PictureBook
+ *
+ * Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net>
+ *
+ * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
+ *
+ * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com>
+ *
+ * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras.
+ *
+ * Some parts borrowed from various video4linux drivers, especially
+ * bttv-driver.c and zoran.c, see original files for credits.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _MEYE_PRIV_H_
+#define _MEYE_PRIV_H_
+
+#define MEYE_DRIVER_MAJORVERSION	 1
+#define MEYE_DRIVER_MINORVERSION	14
+
+#define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \
+			    __stringify(MEYE_DRIVER_MINORVERSION)
+
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <linux/kfifo.h>
+
+/****************************************************************************/
+/* Motion JPEG chip registers                                               */
+/****************************************************************************/
+
+/* Motion JPEG chip PCI configuration registers */
+#define MCHIP_PCI_POWER_CSR		0x54
+#define MCHIP_PCI_MCORE_STATUS		0x60		/* see HIC_STATUS   */
+#define MCHIP_PCI_HOSTUSEREQ_SET	0x64
+#define MCHIP_PCI_HOSTUSEREQ_CLR	0x68
+#define MCHIP_PCI_LOWPOWER_SET		0x6c
+#define MCHIP_PCI_LOWPOWER_CLR		0x70
+#define MCHIP_PCI_SOFTRESET_SET		0x74
+
+/* Motion JPEG chip memory mapped registers */
+#define MCHIP_MM_REGS			0x200		/* 512 bytes        */
+#define MCHIP_REG_TIMEOUT		1000		/* reg access, ~us  */
+#define MCHIP_MCC_VRJ_TIMEOUT		1000		/* MCC & VRJ access */
+
+#define MCHIP_MM_PCI_MODE		0x00		/* PCI access mode */
+#define MCHIP_MM_PCI_MODE_RETRY		0x00000001	/* retry mode */
+#define MCHIP_MM_PCI_MODE_MASTER	0x00000002	/* master access */
+#define MCHIP_MM_PCI_MODE_READ_LINE	0x00000004	/* read line */
+
+#define MCHIP_MM_INTA			0x04		/* Int status/mask */
+#define MCHIP_MM_INTA_MCC		0x00000001	/* MCC interrupt */
+#define MCHIP_MM_INTA_VRJ		0x00000002	/* VRJ interrupt */
+#define MCHIP_MM_INTA_HIC_1		0x00000004	/* one frame done */
+#define MCHIP_MM_INTA_HIC_1_MASK	0x00000400	/* 1: enable */
+#define MCHIP_MM_INTA_HIC_END		0x00000008	/* all frames done */
+#define MCHIP_MM_INTA_HIC_END_MASK	0x00000800
+#define MCHIP_MM_INTA_JPEG		0x00000010	/* decompress. error */
+#define MCHIP_MM_INTA_JPEG_MASK		0x00001000
+#define MCHIP_MM_INTA_CAPTURE		0x00000020	/* capture end */
+#define MCHIP_MM_INTA_PCI_ERR		0x00000040	/* PCI error */
+#define MCHIP_MM_INTA_PCI_ERR_MASK	0x00004000
+
+#define MCHIP_MM_PT_ADDR		0x08		/* page table address*/
+							/* n*4kB */
+#define MCHIP_NB_PAGES			1024		/* pages for display */
+#define MCHIP_NB_PAGES_MJPEG		256		/* pages for mjpeg */
+
+#define MCHIP_MM_FIR(n)			(0x0c+(n)*4)	/* Frame info 0-3 */
+#define MCHIP_MM_FIR_RDY		0x00000001	/* frame ready */
+#define MCHIP_MM_FIR_FAILFR_MASK	0xf8000000	/* # of failed frames */
+#define MCHIP_MM_FIR_FAILFR_SHIFT	27
+
+	/* continuous comp/decomp mode */
+#define MCHIP_MM_FIR_C_ENDL_MASK	0x000007fe	/* end DW [10] */
+#define MCHIP_MM_FIR_C_ENDL_SHIFT	1
+#define MCHIP_MM_FIR_C_ENDP_MASK	0x0007f800	/* end page [8] */
+#define MCHIP_MM_FIR_C_ENDP_SHIFT	11
+#define MCHIP_MM_FIR_C_STARTP_MASK	0x07f80000	/* start page [8] */
+#define MCHIP_MM_FIR_C_STARTP_SHIFT	19
+
+	/* continuous picture output mode */
+#define MCHIP_MM_FIR_O_STARTP_MASK	0x7ffe0000	/* start page [10] */
+#define MCHIP_MM_FIR_O_STARTP_SHIFT	17
+
+#define MCHIP_MM_FIFO_DATA		0x1c		/* PCI TGT FIFO data */
+#define MCHIP_MM_FIFO_STATUS		0x20		/* PCI TGT FIFO stat */
+#define MCHIP_MM_FIFO_MASK		0x00000003
+#define MCHIP_MM_FIFO_WAIT_OR_READY	0x00000002      /* Bits common to WAIT & READY*/
+#define MCHIP_MM_FIFO_IDLE		0x0		/* HIC idle */
+#define MCHIP_MM_FIFO_IDLE1		0x1		/* idem ??? */
+#define	MCHIP_MM_FIFO_WAIT		0x2		/* wait request */
+#define MCHIP_MM_FIFO_READY		0x3		/* data ready */
+
+#define MCHIP_HIC_HOST_USEREQ		0x40		/* host uses MCORE */
+
+#define MCHIP_HIC_TP_BUSY		0x44		/* taking picture */
+
+#define MCHIP_HIC_PIC_SAVED		0x48		/* pic in SDRAM */
+
+#define MCHIP_HIC_LOWPOWER		0x4c		/* clock stopped */
+
+#define MCHIP_HIC_CTL			0x50		/* HIC control */
+#define MCHIP_HIC_CTL_SOFT_RESET	0x00000001	/* MCORE reset */
+#define MCHIP_HIC_CTL_MCORE_RDY		0x00000002	/* MCORE ready */
+
+#define MCHIP_HIC_CMD			0x54		/* HIC command */
+#define MCHIP_HIC_CMD_BITS		0x00000003      /* cmd width=[1:0]*/
+#define MCHIP_HIC_CMD_NOOP		0x0
+#define MCHIP_HIC_CMD_START		0x1
+#define MCHIP_HIC_CMD_STOP		0x2
+
+#define MCHIP_HIC_MODE			0x58
+#define MCHIP_HIC_MODE_NOOP		0x0
+#define MCHIP_HIC_MODE_STILL_CAP	0x1		/* still pic capt */
+#define MCHIP_HIC_MODE_DISPLAY		0x2		/* display */
+#define MCHIP_HIC_MODE_STILL_COMP	0x3		/* still pic comp. */
+#define MCHIP_HIC_MODE_STILL_DECOMP	0x4		/* still pic decomp. */
+#define MCHIP_HIC_MODE_CONT_COMP	0x5		/* cont capt+comp */
+#define MCHIP_HIC_MODE_CONT_DECOMP	0x6		/* cont decomp+disp */
+#define MCHIP_HIC_MODE_STILL_OUT	0x7		/* still pic output */
+#define MCHIP_HIC_MODE_CONT_OUT		0x8		/* cont output */
+
+#define MCHIP_HIC_STATUS		0x5c
+#define MCHIP_HIC_STATUS_MCC_RDY	0x00000001	/* MCC reg acc ok */
+#define MCHIP_HIC_STATUS_VRJ_RDY	0x00000002	/* VRJ reg acc ok */
+#define MCHIP_HIC_STATUS_IDLE           0x00000003
+#define MCHIP_HIC_STATUS_CAPDIS		0x00000004	/* cap/disp in prog */
+#define MCHIP_HIC_STATUS_COMPDEC	0x00000008	/* (de)comp in prog */
+#define MCHIP_HIC_STATUS_BUSY		0x00000010	/* HIC busy */
+
+#define MCHIP_HIC_S_RATE		0x60		/* MJPEG # frames */
+
+#define MCHIP_HIC_PCI_VFMT		0x64		/* video format */
+#define MCHIP_HIC_PCI_VFMT_YVYU		0x00000001	/* 0: V Y' U Y */
+							/* 1: Y' V Y U */
+
+#define MCHIP_MCC_CMD			0x80		/* MCC commands */
+#define MCHIP_MCC_CMD_INITIAL		0x0		/* idle ? */
+#define MCHIP_MCC_CMD_IIC_START_SET	0x1
+#define MCHIP_MCC_CMD_IIC_END_SET	0x2
+#define MCHIP_MCC_CMD_FM_WRITE		0x3		/* frame memory */
+#define MCHIP_MCC_CMD_FM_READ		0x4
+#define MCHIP_MCC_CMD_FM_STOP		0x5
+#define MCHIP_MCC_CMD_CAPTURE		0x6
+#define MCHIP_MCC_CMD_DISPLAY		0x7
+#define MCHIP_MCC_CMD_END_DISP		0x8
+#define MCHIP_MCC_CMD_STILL_COMP	0x9
+#define MCHIP_MCC_CMD_STILL_DECOMP	0xa
+#define MCHIP_MCC_CMD_STILL_OUTPUT	0xb
+#define MCHIP_MCC_CMD_CONT_OUTPUT	0xc
+#define MCHIP_MCC_CMD_CONT_COMP		0xd
+#define MCHIP_MCC_CMD_CONT_DECOMP	0xe
+#define MCHIP_MCC_CMD_RESET		0xf		/* MCC reset */
+
+#define MCHIP_MCC_IIC_WR		0x84
+
+#define MCHIP_MCC_MCC_WR		0x88
+
+#define MCHIP_MCC_MCC_RD		0x8c
+
+#define MCHIP_MCC_STATUS		0x90
+#define MCHIP_MCC_STATUS_CAPT		0x00000001	/* capturing */
+#define MCHIP_MCC_STATUS_DISP		0x00000002	/* displaying */
+#define MCHIP_MCC_STATUS_COMP		0x00000004	/* compressing */
+#define MCHIP_MCC_STATUS_DECOMP		0x00000008	/* decompressing */
+#define MCHIP_MCC_STATUS_MCC_WR		0x00000010	/* register ready */
+#define MCHIP_MCC_STATUS_MCC_RD		0x00000020	/* register ready */
+#define MCHIP_MCC_STATUS_IIC_WR		0x00000040	/* register ready */
+#define MCHIP_MCC_STATUS_OUTPUT		0x00000080	/* output in prog */
+
+#define MCHIP_MCC_SIG_POLARITY		0x94
+#define MCHIP_MCC_SIG_POL_VS_H		0x00000001	/* VS active-high */
+#define MCHIP_MCC_SIG_POL_HS_H		0x00000002	/* HS active-high */
+#define MCHIP_MCC_SIG_POL_DOE_H		0x00000004	/* DOE active-high */
+
+#define MCHIP_MCC_IRQ			0x98
+#define MCHIP_MCC_IRQ_CAPDIS_STRT	0x00000001	/* cap/disp started */
+#define MCHIP_MCC_IRQ_CAPDIS_STRT_MASK	0x00000010
+#define MCHIP_MCC_IRQ_CAPDIS_END	0x00000002	/* cap/disp ended */
+#define MCHIP_MCC_IRQ_CAPDIS_END_MASK	0x00000020
+#define MCHIP_MCC_IRQ_COMPDEC_STRT	0x00000004	/* (de)comp started */
+#define MCHIP_MCC_IRQ_COMPDEC_STRT_MASK	0x00000040
+#define MCHIP_MCC_IRQ_COMPDEC_END	0x00000008	/* (de)comp ended */
+#define MCHIP_MCC_IRQ_COMPDEC_END_MASK	0x00000080
+
+#define MCHIP_MCC_HSTART		0x9c		/* video in */
+#define MCHIP_MCC_VSTART		0xa0
+#define MCHIP_MCC_HCOUNT		0xa4
+#define MCHIP_MCC_VCOUNT		0xa8
+#define MCHIP_MCC_R_XBASE		0xac		/* capt/disp */
+#define MCHIP_MCC_R_YBASE		0xb0
+#define MCHIP_MCC_R_XRANGE		0xb4
+#define MCHIP_MCC_R_YRANGE		0xb8
+#define MCHIP_MCC_B_XBASE		0xbc		/* comp/decomp */
+#define MCHIP_MCC_B_YBASE		0xc0
+#define MCHIP_MCC_B_XRANGE		0xc4
+#define MCHIP_MCC_B_YRANGE		0xc8
+
+#define MCHIP_MCC_R_SAMPLING		0xcc		/* 1: 1:4 */
+
+#define MCHIP_VRJ_CMD			0x100		/* VRJ commands */
+
+/* VRJ registers (see table 12.2.4) */
+#define MCHIP_VRJ_COMPRESSED_DATA	0x1b0
+#define MCHIP_VRJ_PIXEL_DATA		0x1b8
+
+#define MCHIP_VRJ_BUS_MODE		0x100
+#define MCHIP_VRJ_SIGNAL_ACTIVE_LEVEL	0x108
+#define MCHIP_VRJ_PDAT_USE		0x110
+#define MCHIP_VRJ_MODE_SPECIFY		0x118
+#define MCHIP_VRJ_LIMIT_COMPRESSED_LO	0x120
+#define MCHIP_VRJ_LIMIT_COMPRESSED_HI	0x124
+#define MCHIP_VRJ_COMP_DATA_FORMAT	0x128
+#define MCHIP_VRJ_TABLE_DATA		0x140
+#define MCHIP_VRJ_RESTART_INTERVAL	0x148
+#define MCHIP_VRJ_NUM_LINES		0x150
+#define MCHIP_VRJ_NUM_PIXELS		0x158
+#define MCHIP_VRJ_NUM_COMPONENTS	0x160
+#define MCHIP_VRJ_SOF1			0x168
+#define MCHIP_VRJ_SOF2			0x170
+#define MCHIP_VRJ_SOF3			0x178
+#define MCHIP_VRJ_SOF4			0x180
+#define MCHIP_VRJ_SOS			0x188
+#define MCHIP_VRJ_SOFT_RESET		0x190
+
+#define MCHIP_VRJ_STATUS		0x1c0
+#define MCHIP_VRJ_STATUS_BUSY		0x00001
+#define MCHIP_VRJ_STATUS_COMP_ACCESS	0x00002
+#define MCHIP_VRJ_STATUS_PIXEL_ACCESS	0x00004
+#define MCHIP_VRJ_STATUS_ERROR		0x00008
+
+#define MCHIP_VRJ_IRQ_FLAG		0x1c8
+#define MCHIP_VRJ_ERROR_REPORT		0x1d8
+
+#define MCHIP_VRJ_START_COMMAND		0x1a0
+
+/****************************************************************************/
+/* Driver definitions.                                                      */
+/****************************************************************************/
+
+/* Sony Programmable I/O Controller for accessing the camera commands */
+#include <linux/sony-laptop.h>
+
+/* private API definitions */
+#include <linux/meye.h>
+#include <linux/mutex.h>
+
+
+/* Enable jpg software correction */
+#define MEYE_JPEG_CORRECTION	1
+
+/* Maximum size of a buffer */
+#define MEYE_MAX_BUFSIZE	614400	/* 640 * 480 * 2 */
+
+/* Maximum number of buffers */
+#define MEYE_MAX_BUFNBRS	32
+
+/* State of a buffer */
+#define MEYE_BUF_UNUSED	0	/* not used */
+#define MEYE_BUF_USING	1	/* currently grabbing / playing */
+#define MEYE_BUF_DONE	2	/* done */
+
+/* grab buffer */
+struct meye_grab_buffer {
+	int state;			/* state of buffer */
+	unsigned long size;		/* size of jpg frame */
+	struct timeval timestamp;	/* timestamp */
+	unsigned long sequence;		/* sequence number */
+};
+
+/* size of kfifos containings buffer indices */
+#define MEYE_QUEUE_SIZE	MEYE_MAX_BUFNBRS
+
+/* Motion Eye device structure */
+struct meye {
+	struct v4l2_device v4l2_dev;	/* Main v4l2_device struct */
+	struct pci_dev *mchip_dev;	/* pci device */
+	u8 mchip_irq;			/* irq */
+	u8 mchip_mode;			/* actual mchip mode: HIC_MODE... */
+	u8 mchip_fnum;			/* current mchip frame number */
+	unsigned char __iomem *mchip_mmregs;/* mchip: memory mapped registers */
+	u8 *mchip_ptable[MCHIP_NB_PAGES];/* mchip: ptable */
+	void *mchip_ptable_toc;		/* mchip: ptable toc */
+	dma_addr_t mchip_dmahandle;	/* mchip: dma handle to ptable toc */
+	unsigned char *grab_fbuffer;	/* capture framebuffer */
+	unsigned char *grab_temp;	/* temporary buffer */
+					/* list of buffers */
+	struct meye_grab_buffer grab_buffer[MEYE_MAX_BUFNBRS];
+	int vma_use_count[MEYE_MAX_BUFNBRS]; /* mmap count */
+	struct mutex lock;		/* mutex for open/mmap... */
+	struct kfifo grabq;		/* queue for buffers to be grabbed */
+	spinlock_t grabq_lock;		/* lock protecting the queue */
+	struct kfifo doneq;		/* queue for grabbed buffers */
+	spinlock_t doneq_lock;		/* lock protecting the queue */
+	wait_queue_head_t proc_list;	/* wait queue */
+	struct video_device *vdev;	/* video device parameters */
+	u16 brightness;
+	u16 hue;
+	u16 contrast;
+	u16 colour;
+	struct meye_params params;	/* additional parameters */
+	unsigned long in_use;		/* set to 1 if the device is in use */
+#ifdef CONFIG_PM
+	u8 pm_mchip_mode;		/* old mchip mode */
+#endif
+};
+
+#endif
diff --git a/drivers/media/pci/sta2x11/Kconfig b/drivers/media/pci/sta2x11/Kconfig
new file mode 100644
index 0000000..04a82cb
--- /dev/null
+++ b/drivers/media/pci/sta2x11/Kconfig
@@ -0,0 +1,12 @@
+config STA2X11_VIP
+	tristate "STA2X11 VIP Video For Linux"
+	depends on STA2X11
+	select VIDEO_ADV7180 if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEOBUF_DMA_CONTIG
+	depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS
+	help
+	  Say Y for support for STA2X11 VIP (Video Input Port) capture
+	  device.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called sta2x11_vip.
diff --git a/drivers/media/pci/sta2x11/Makefile b/drivers/media/pci/sta2x11/Makefile
new file mode 100644
index 0000000..d6c471d
--- /dev/null
+++ b/drivers/media/pci/sta2x11/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_STA2X11_VIP) += sta2x11_vip.o
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c
new file mode 100644
index 0000000..4c10205
--- /dev/null
+++ b/drivers/media/pci/sta2x11/sta2x11_vip.c
@@ -0,0 +1,1550 @@
+/*
+ * This is the driver for the STA2x11 Video Input Port.
+ *
+ * Copyright (C) 2010       WindRiver Systems, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * The full GNU General Public License is included in this distribution in
+ * the file called "COPYING".
+ *
+ * Author: Andreas Kies <andreas.kies@windriver.com>
+ *		Vlad Lungu <vlad.lungu@windriver.com>
+ *
+ */
+
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/vmalloc.h>
+
+#include <linux/videodev2.h>
+
+#include <linux/kmod.h>
+
+#include <linux/pci.h>
+#include <linux/interrupt.h>
+#include <linux/mutex.h>
+#include <linux/io.h>
+#include <linux/gpio.h>
+#include <linux/i2c.h>
+#include <linux/delay.h>
+#include <media/v4l2-common.h>
+#include <media/v4l2-device.h>
+#include <media/v4l2-ioctl.h>
+#include <media/videobuf-dma-contig.h>
+
+#include "sta2x11_vip.h"
+
+#define DRV_NAME "sta2x11_vip"
+#define DRV_VERSION "1.3"
+
+#ifndef PCI_DEVICE_ID_STMICRO_VIP
+#define PCI_DEVICE_ID_STMICRO_VIP 0xCC0D
+#endif
+
+#define MAX_FRAMES 4
+
+/*Register offsets*/
+#define DVP_CTL		0x00
+#define DVP_TFO		0x04
+#define DVP_TFS		0x08
+#define DVP_BFO		0x0C
+#define DVP_BFS		0x10
+#define DVP_VTP         0x14
+#define DVP_VBP         0x18
+#define DVP_VMP		0x1C
+#define DVP_ITM		0x98
+#define DVP_ITS		0x9C
+#define DVP_STA		0xA0
+#define DVP_HLFLN	0xA8
+#define DVP_RGB		0xC0
+#define DVP_PKZ		0xF0
+
+/*Register fields*/
+#define DVP_CTL_ENA	0x00000001
+#define DVP_CTL_RST	0x80000000
+#define DVP_CTL_DIS	(~0x00040001)
+
+#define DVP_IT_VSB	0x00000008
+#define DVP_IT_VST	0x00000010
+#define DVP_IT_FIFO	0x00000020
+
+#define DVP_HLFLN_SD	0x00000001
+
+#define REG_WRITE(vip, reg, value) iowrite32((value), (vip->iomem)+(reg))
+#define REG_READ(vip, reg) ioread32((vip->iomem)+(reg))
+
+#define SAVE_COUNT 8
+#define AUX_COUNT 3
+#define IRQ_COUNT 1
+
+/**
+ * struct sta2x11_vip - All internal data for one instance of device
+ * @v4l2_dev: device registered in v4l layer
+ * @video_dev: properties of our device
+ * @pdev: PCI device
+ * @adapter: contains I2C adapter information
+ * @register_save_area: All relevant register are saved here during suspend
+ * @decoder: contains information about video DAC
+ * @format: pixel format, fixed UYVY
+ * @std: video standard (e.g. PAL/NTSC)
+ * @input: input line for video signal ( 0 or 1 )
+ * @users: Number of open of device ( max. 1 )
+ * @disabled: Device is in power down state
+ * @mutex: ensures exclusive opening of device
+ * @slock: for excluse acces of registers
+ * @vb_vidq: queue maintained by videobuf layer
+ * @capture: linked list of capture buffer
+ * @active: struct videobuf_buffer currently beingg filled
+ * @started: device is ready to capture frame
+ * @closing: device will be shut down
+ * @tcount: Number of top frames
+ * @bcount: Number of bottom frames
+ * @overflow: Number of FIFO overflows
+ * @mem_spare: small buffer of unused frame
+ * @dma_spare: dma addres of mem_spare
+ * @iomem: hardware base address
+ * @config: I2C and gpio config from platform
+ *
+ * All non-local data is accessed via this structure.
+ */
+
+struct sta2x11_vip {
+	struct v4l2_device v4l2_dev;
+	struct video_device *video_dev;
+	struct pci_dev *pdev;
+	struct i2c_adapter *adapter;
+	unsigned int register_save_area[IRQ_COUNT + SAVE_COUNT + AUX_COUNT];
+	struct v4l2_subdev *decoder;
+	struct v4l2_pix_format format;
+	v4l2_std_id std;
+	unsigned int input;
+	int users;
+	int disabled;
+	struct mutex mutex;	/* exclusive access during open */
+	spinlock_t slock;	/* spin lock for hardware and queue access */
+	struct videobuf_queue vb_vidq;
+	struct list_head capture;
+	struct videobuf_buffer *active;
+	int started, closing, tcount, bcount;
+	int overflow;
+	void *mem_spare;
+	dma_addr_t dma_spare;
+	void *iomem;
+	struct vip_config *config;
+};
+
+static const unsigned int registers_to_save[AUX_COUNT] = {
+	DVP_HLFLN, DVP_RGB, DVP_PKZ
+};
+
+static struct v4l2_pix_format formats_50[] = {
+	{			/*PAL interlaced */
+	 .width = 720,
+	 .height = 576,
+	 .pixelformat = V4L2_PIX_FMT_UYVY,
+	 .field = V4L2_FIELD_INTERLACED,
+	 .bytesperline = 720 * 2,
+	 .sizeimage = 720 * 2 * 576,
+	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
+	{			/*PAL top */
+	 .width = 720,
+	 .height = 288,
+	 .pixelformat = V4L2_PIX_FMT_UYVY,
+	 .field = V4L2_FIELD_TOP,
+	 .bytesperline = 720 * 2,
+	 .sizeimage = 720 * 2 * 288,
+	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
+	{			/*PAL bottom */
+	 .width = 720,
+	 .height = 288,
+	 .pixelformat = V4L2_PIX_FMT_UYVY,
+	 .field = V4L2_FIELD_BOTTOM,
+	 .bytesperline = 720 * 2,
+	 .sizeimage = 720 * 2 * 288,
+	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
+
+};
+
+static struct v4l2_pix_format formats_60[] = {
+	{			/*NTSC interlaced */
+	 .width = 720,
+	 .height = 480,
+	 .pixelformat = V4L2_PIX_FMT_UYVY,
+	 .field = V4L2_FIELD_INTERLACED,
+	 .bytesperline = 720 * 2,
+	 .sizeimage = 720 * 2 * 480,
+	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
+	{			/*NTSC top */
+	 .width = 720,
+	 .height = 240,
+	 .pixelformat = V4L2_PIX_FMT_UYVY,
+	 .field = V4L2_FIELD_TOP,
+	 .bytesperline = 720 * 2,
+	 .sizeimage = 720 * 2 * 240,
+	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
+	{			/*NTSC bottom */
+	 .width = 720,
+	 .height = 240,
+	 .pixelformat = V4L2_PIX_FMT_UYVY,
+	 .field = V4L2_FIELD_BOTTOM,
+	 .bytesperline = 720 * 2,
+	 .sizeimage = 720 * 2 * 240,
+	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
+};
+
+/**
+ * buf_setup - Get size and number of video buffer
+ * @vq: queue in videobuf
+ * @count: Number of buffers (1..MAX_FRAMES).
+ *		0 use default value.
+ * @size:  size of buffer in bytes
+ *
+ * returns size and number of buffers
+ * a preset value of 0 returns the default number.
+ * return value: 0, always succesfull.
+ */
+static int buf_setup(struct videobuf_queue *vq, unsigned int *count,
+		     unsigned int *size)
+{
+	struct sta2x11_vip *vip = vq->priv_data;
+
+	*size = vip->format.width * vip->format.height * 2;
+	if (0 == *count || MAX_FRAMES < *count)
+		*count = MAX_FRAMES;
+	return 0;
+};
+
+/**
+ * buf_prepare - prepare buffer for usage
+ * @vq: queue in videobuf layer
+ * @vb: buffer to be prepared
+ * @field: type of video data (interlaced/non-interlaced)
+ *
+ * Allocate or realloc buffer
+ * return value: 0, successful.
+ *
+ * -EINVAL, supplied buffer is too small.
+ *
+ *  other, buffer could not be locked.
+ */
+static int buf_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
+		       enum v4l2_field field)
+{
+	struct sta2x11_vip *vip = vq->priv_data;
+	int ret;
+
+	vb->size = vip->format.width * vip->format.height * 2;
+	if ((0 != vb->baddr) && (vb->bsize < vb->size))
+		return -EINVAL;
+	vb->width = vip->format.width;
+	vb->height = vip->format.height;
+	vb->field = field;
+
+	if (VIDEOBUF_NEEDS_INIT == vb->state) {
+		ret = videobuf_iolock(vq, vb, NULL);
+		if (ret)
+			goto fail;
+	}
+	vb->state = VIDEOBUF_PREPARED;
+	return 0;
+fail:
+	videobuf_dma_contig_free(vq, vb);
+	vb->state = VIDEOBUF_NEEDS_INIT;
+	return ret;
+}
+
+/**
+ * buf_queu - queue buffer for filling
+ * @vq: queue in videobuf layer
+ * @vb: buffer to be queued
+ *
+ * if capturing is already running, the buffer will be queued. Otherwise
+ * capture is started and the buffer is used directly.
+ */
+static void buf_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
+{
+	struct sta2x11_vip *vip = vq->priv_data;
+	u32 dma;
+
+	vb->state = VIDEOBUF_QUEUED;
+
+	if (vip->active) {
+		list_add_tail(&vb->queue, &vip->capture);
+		return;
+	}
+
+	vip->started = 1;
+	vip->tcount = 0;
+	vip->bcount = 0;
+	vip->active = vb;
+	vb->state = VIDEOBUF_ACTIVE;
+
+	dma = videobuf_to_dma_contig(vb);
+
+	REG_WRITE(vip, DVP_TFO, (0 << 16) | (0));
+	/* despite of interlace mode, upper and lower frames start at zero */
+	REG_WRITE(vip, DVP_BFO, (0 << 16) | (0));
+
+	switch (vip->format.field) {
+	case V4L2_FIELD_INTERLACED:
+		REG_WRITE(vip, DVP_TFS,
+			  ((vip->format.height / 2 - 1) << 16) |
+			  (2 * vip->format.width - 1));
+		REG_WRITE(vip, DVP_BFS, ((vip->format.height / 2 - 1) << 16) |
+			  (2 * vip->format.width - 1));
+		REG_WRITE(vip, DVP_VTP, dma);
+		REG_WRITE(vip, DVP_VBP, dma + vip->format.width * 2);
+		REG_WRITE(vip, DVP_VMP, 4 * vip->format.width);
+		break;
+	case V4L2_FIELD_TOP:
+		REG_WRITE(vip, DVP_TFS,
+			  ((vip->format.height - 1) << 16) |
+			  (2 * vip->format.width - 1));
+		REG_WRITE(vip, DVP_BFS, ((0) << 16) |
+			  (2 * vip->format.width - 1));
+		REG_WRITE(vip, DVP_VTP, dma);
+		REG_WRITE(vip, DVP_VBP, dma);
+		REG_WRITE(vip, DVP_VMP, 2 * vip->format.width);
+		break;
+	case V4L2_FIELD_BOTTOM:
+		REG_WRITE(vip, DVP_TFS, ((0) << 16) |
+			  (2 * vip->format.width - 1));
+		REG_WRITE(vip, DVP_BFS,
+			  ((vip->format.height) << 16) |
+			  (2 * vip->format.width - 1));
+		REG_WRITE(vip, DVP_VTP, dma);
+		REG_WRITE(vip, DVP_VBP, dma);
+		REG_WRITE(vip, DVP_VMP, 2 * vip->format.width);
+		break;
+
+	default:
+		pr_warning("VIP: unknown field format\n");
+		return;
+	}
+
+	REG_WRITE(vip, DVP_CTL, DVP_CTL_ENA);
+}
+
+/**
+ * buff_release - release buffer
+ * @vq: queue in videobuf layer
+ * @vb: buffer to be released
+ *
+ * release buffer in videobuf layer
+ */
+static void buf_release(struct videobuf_queue *vq, struct videobuf_buffer *vb)
+{
+
+	videobuf_dma_contig_free(vq, vb);
+	vb->state = VIDEOBUF_NEEDS_INIT;
+}
+
+static struct videobuf_queue_ops vip_qops = {
+	.buf_setup = buf_setup,
+	.buf_prepare = buf_prepare,
+	.buf_queue = buf_queue,
+	.buf_release = buf_release,
+};
+
+/**
+ * vip_open - open video device
+ * @file: descriptor of device
+ *
+ * open device, make sure it is only opened once.
+ * return value: 0, no error.
+ *
+ * -EBUSY, device is already opened
+ *
+ * -ENOMEM, no memory for auxiliary DMA buffer
+ */
+static int vip_open(struct file *file)
+{
+	struct video_device *dev = video_devdata(file);
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	mutex_lock(&vip->mutex);
+	vip->users++;
+
+	if (vip->users > 1) {
+		vip->users--;
+		mutex_unlock(&vip->mutex);
+		return -EBUSY;
+	}
+
+	file->private_data = dev;
+	vip->overflow = 0;
+	vip->started = 0;
+	vip->closing = 0;
+	vip->active = NULL;
+
+	INIT_LIST_HEAD(&vip->capture);
+	vip->mem_spare = dma_alloc_coherent(&vip->pdev->dev, 64,
+					    &vip->dma_spare, GFP_KERNEL);
+	if (!vip->mem_spare) {
+		vip->users--;
+		mutex_unlock(&vip->mutex);
+		return -ENOMEM;
+	}
+
+	mutex_unlock(&vip->mutex);
+	videobuf_queue_dma_contig_init_cached(&vip->vb_vidq,
+					      &vip_qops,
+					      &vip->pdev->dev,
+					      &vip->slock,
+					      V4L2_BUF_TYPE_VIDEO_CAPTURE,
+					      V4L2_FIELD_INTERLACED,
+					      sizeof(struct videobuf_buffer),
+					      vip, NULL);
+	REG_READ(vip, DVP_ITS);
+	REG_WRITE(vip, DVP_HLFLN, DVP_HLFLN_SD);
+	REG_WRITE(vip, DVP_ITM, DVP_IT_VSB | DVP_IT_VST);
+	REG_WRITE(vip, DVP_CTL, DVP_CTL_RST);
+	REG_WRITE(vip, DVP_CTL, 0);
+	REG_READ(vip, DVP_ITS);
+	return 0;
+}
+
+/**
+ * vip_close - close video device
+ * @file: descriptor of device
+ *
+ * close video device, wait until all pending operations are finished
+ * ( maximum FRAME_MAX buffers pending )
+ * Turn off interrupts.
+ *
+ * return value: 0, always succesful.
+ */
+static int vip_close(struct file *file)
+{
+	struct video_device *dev = video_devdata(file);
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	vip->closing = 1;
+	if (vip->active)
+		videobuf_waiton(&vip->vb_vidq, vip->active, 0, 0);
+	spin_lock_irq(&vip->slock);
+
+	REG_WRITE(vip, DVP_ITM, 0);
+	REG_WRITE(vip, DVP_CTL, DVP_CTL_RST);
+	REG_WRITE(vip, DVP_CTL, 0);
+	REG_READ(vip, DVP_ITS);
+
+	vip->started = 0;
+	vip->active = NULL;
+
+	spin_unlock_irq(&vip->slock);
+
+	videobuf_stop(&vip->vb_vidq);
+	videobuf_mmap_free(&vip->vb_vidq);
+
+	dma_free_coherent(&vip->pdev->dev, 64, vip->mem_spare, vip->dma_spare);
+	file->private_data = NULL;
+	mutex_lock(&vip->mutex);
+	vip->users--;
+	mutex_unlock(&vip->mutex);
+	return 0;
+}
+
+/**
+ * vip_read - read from video input
+ * @file: descriptor of device
+ * @data: user buffer
+ * @count: number of bytes to be read
+ * @ppos: position within stream
+ *
+ * read video data from video device.
+ * handling is done in generic videobuf layer
+ * return value: provided by videobuf layer
+ */
+static ssize_t vip_read(struct file *file, char __user *data,
+			size_t count, loff_t *ppos)
+{
+	struct video_device *dev = file->private_data;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return videobuf_read_stream(&vip->vb_vidq, data, count, ppos, 0,
+				    file->f_flags & O_NONBLOCK);
+}
+
+/**
+ * vip_mmap - map user buffer
+ * @file: descriptor of device
+ * @vma: user buffer
+ *
+ * map user space buffer into kernel mode, including DMA address.
+ * handling is done in generic videobuf layer.
+ * return value: provided by videobuf layer
+ */
+static int vip_mmap(struct file *file, struct vm_area_struct *vma)
+{
+	struct video_device *dev = file->private_data;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return videobuf_mmap_mapper(&vip->vb_vidq, vma);
+}
+
+/**
+ * vip_poll - poll for event
+ * @file: descriptor of device
+ * @wait: contains events to be waited for
+ *
+ * wait for event related to video device.
+ * handling is done in generic videobuf layer.
+ * return value: provided by videobuf layer
+ */
+static unsigned int vip_poll(struct file *file, struct poll_table_struct *wait)
+{
+	struct video_device *dev = file->private_data;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return videobuf_poll_stream(file, &vip->vb_vidq, wait);
+}
+
+/**
+ * vidioc_querycap - return capabilities of device
+ * @file: descriptor of device (not used)
+ * @priv: points to current videodevice
+ * @cap: contains return values
+ *
+ * the capabilities of the device are returned
+ *
+ * return value: 0, no error.
+ */
+static int vidioc_querycap(struct file *file, void *priv,
+			   struct v4l2_capability *cap)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	memset(cap, 0, sizeof(struct v4l2_capability));
+	strcpy(cap->driver, DRV_NAME);
+	strcpy(cap->card, DRV_NAME);
+	cap->version = 0;
+	snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s",
+		 pci_name(vip->pdev));
+	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
+	    V4L2_CAP_STREAMING;
+
+	return 0;
+}
+
+/**
+ * vidioc_s_std - set video standard
+ * @file: descriptor of device (not used)
+ * @priv: points to current videodevice
+ * @std: contains standard to be set
+ *
+ * the video standard is set
+ *
+ * return value: 0, no error.
+ *
+ * -EIO, no input signal detected
+ *
+ * other, returned from video DAC.
+ */
+static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *std)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+	v4l2_std_id oldstd = vip->std, newstd;
+	int status;
+
+	if (V4L2_STD_ALL == *std) {
+		v4l2_subdev_call(vip->decoder, core, s_std, *std);
+		ssleep(2);
+		v4l2_subdev_call(vip->decoder, video, querystd, &newstd);
+		v4l2_subdev_call(vip->decoder, video, g_input_status, &status);
+		if (status & V4L2_IN_ST_NO_SIGNAL)
+			return -EIO;
+		*std = vip->std = newstd;
+		if (oldstd != *std) {
+			if (V4L2_STD_525_60 & (*std))
+				vip->format = formats_60[0];
+			else
+				vip->format = formats_50[0];
+		}
+		return 0;
+	}
+
+	if (oldstd != *std) {
+		if (V4L2_STD_525_60 & (*std))
+			vip->format = formats_60[0];
+		else
+			vip->format = formats_50[0];
+	}
+
+	return v4l2_subdev_call(vip->decoder, core, s_std, *std);
+}
+
+/**
+ * vidioc_g_std - get video standard
+ * @file: descriptor of device (not used)
+ * @priv: points to current videodevice
+ * @std: contains return values
+ *
+ * the current video standard is returned
+ *
+ * return value: 0, no error.
+ */
+static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *std)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	*std = vip->std;
+	return 0;
+}
+
+/**
+ * vidioc_querystd - get possible video standards
+ * @file: descriptor of device (not used)
+ * @priv: points to current videodevice
+ * @std: contains return values
+ *
+ * all possible video standards are returned
+ *
+ * return value: delivered by video DAC routine.
+ */
+static int vidioc_querystd(struct file *file, void *priv, v4l2_std_id *std)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return v4l2_subdev_call(vip->decoder, video, querystd, std);
+
+}
+
+/**
+ * vidioc_queryctl - get possible control settings
+ * @file: descriptor of device (not used)
+ * @priv: points to current videodevice
+ * @ctrl: contains return values
+ *
+ * return possible values for a control
+ * return value: delivered by video DAC routine.
+ */
+static int vidioc_queryctrl(struct file *file, void *priv,
+			    struct v4l2_queryctrl *ctrl)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return v4l2_subdev_call(vip->decoder, core, queryctrl, ctrl);
+}
+
+/**
+ * vidioc_g_ctl - get control value
+ * @file: descriptor of device (not used)
+ * @priv: points to current videodevice
+ * @ctrl: contains return values
+ *
+ * return setting for a control value
+ * return value: delivered by video DAC routine.
+ */
+static int vidioc_g_ctrl(struct file *file, void *priv,
+			 struct v4l2_control *ctrl)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return v4l2_subdev_call(vip->decoder, core, g_ctrl, ctrl);
+}
+
+/**
+ * vidioc_s_ctl - set control value
+ * @file: descriptor of device (not used)
+ * @priv: points to current videodevice
+ * @ctrl: contains value to be set
+ *
+ * set value for a specific control
+ * return value: delivered by video DAC routine.
+ */
+static int vidioc_s_ctrl(struct file *file, void *priv,
+			 struct v4l2_control *ctrl)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return v4l2_subdev_call(vip->decoder, core, s_ctrl, ctrl);
+}
+
+/**
+ * vidioc_enum_input - return name of input line
+ * @file: descriptor of device (not used)
+ * @priv: points to current videodevice
+ * @inp: contains return values
+ *
+ * the user friendly name of the input line is returned
+ *
+ * return value: 0, no error.
+ *
+ * -EINVAL, input line number out of range
+ */
+static int vidioc_enum_input(struct file *file, void *priv,
+			     struct v4l2_input *inp)
+{
+	if (inp->index > 1)
+		return -EINVAL;
+
+	inp->type = V4L2_INPUT_TYPE_CAMERA;
+	inp->std = V4L2_STD_ALL;
+	sprintf(inp->name, "Camera %u", inp->index);
+
+	return 0;
+}
+
+/**
+ * vidioc_s_input - set input line
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @i: new input line number
+ *
+ * the current active input line is set
+ *
+ * return value: 0, no error.
+ *
+ * -EINVAL, line number out of range
+ */
+static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+	int ret;
+
+	if (i > 1)
+		return -EINVAL;
+	ret = v4l2_subdev_call(vip->decoder, video, s_routing, i, 0, 0);
+
+	if (!ret)
+		vip->input = i;
+
+	return 0;
+}
+
+/**
+ * vidioc_g_input - return input line
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @i: returned input line number
+ *
+ * the current active input line is returned
+ *
+ * return value: always 0.
+ */
+static int vidioc_g_input(struct file *file, void *priv, unsigned int *i)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	*i = vip->input;
+	return 0;
+}
+
+/**
+ * vidioc_enum_fmt_vid_cap - return video capture format
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @f: returned format information
+ *
+ * returns name and format of video capture
+ * Only UYVY is supported by hardware.
+ *
+ * return value: always 0.
+ */
+static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
+				   struct v4l2_fmtdesc *f)
+{
+
+	if (f->index != 0)
+		return -EINVAL;
+
+	strcpy(f->description, "4:2:2, packed, UYVY");
+	f->pixelformat = V4L2_PIX_FMT_UYVY;
+	f->flags = 0;
+	return 0;
+}
+
+/**
+ * vidioc_try_fmt_vid_cap - set video capture format
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @f: new format
+ *
+ * new video format is set which includes width and
+ * field type. width is fixed to 720, no scaling.
+ * Only UYVY is supported by this hardware.
+ * the minimum height is 200, the maximum is 576 (PAL)
+ *
+ * return value: 0, no error
+ *
+ * -EINVAL, pixel or field format not supported
+ *
+ */
+static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
+				  struct v4l2_format *f)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+	int interlace_lim;
+
+	if (V4L2_PIX_FMT_UYVY != f->fmt.pix.pixelformat)
+		return -EINVAL;
+
+	if (V4L2_STD_525_60 & vip->std)
+		interlace_lim = 240;
+	else
+		interlace_lim = 288;
+
+	switch (f->fmt.pix.field) {
+	case V4L2_FIELD_ANY:
+		if (interlace_lim < f->fmt.pix.height)
+			f->fmt.pix.field = V4L2_FIELD_INTERLACED;
+		else
+			f->fmt.pix.field = V4L2_FIELD_BOTTOM;
+		break;
+	case V4L2_FIELD_TOP:
+	case V4L2_FIELD_BOTTOM:
+		if (interlace_lim < f->fmt.pix.height)
+			f->fmt.pix.height = interlace_lim;
+		break;
+	case V4L2_FIELD_INTERLACED:
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	f->fmt.pix.height &= ~1;
+	if (2 * interlace_lim < f->fmt.pix.height)
+		f->fmt.pix.height = 2 * interlace_lim;
+	if (200 > f->fmt.pix.height)
+		f->fmt.pix.height = 200;
+	f->fmt.pix.width = 720;
+	f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
+	f->fmt.pix.sizeimage = f->fmt.pix.width * 2 * f->fmt.pix.height;
+	f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
+	f->fmt.pix.priv = 0;
+	return 0;
+}
+
+/**
+ * vidioc_s_fmt_vid_cap - set current video format parameters
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @f: returned format information
+ *
+ * set new capture format
+ * return value: 0, no error
+ *
+ * other, delivered by video DAC routine.
+ */
+static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
+				struct v4l2_format *f)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+	int ret;
+
+	ret = vidioc_try_fmt_vid_cap(file, priv, f);
+	if (ret)
+		return ret;
+
+	memcpy(&vip->format, &f->fmt.pix, sizeof(struct v4l2_pix_format));
+	return 0;
+}
+
+/**
+ * vidioc_g_fmt_vid_cap - get current video format parameters
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @f: contains format information
+ *
+ * returns current video format parameters
+ *
+ * return value: 0, always successful
+ */
+static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
+				struct v4l2_format *f)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	memcpy(&f->fmt.pix, &vip->format, sizeof(struct v4l2_pix_format));
+	return 0;
+}
+
+/**
+ * vidioc_reqfs - request buffer
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @p: video buffer
+ *
+ * Handling is done in generic videobuf layer.
+ */
+static int vidioc_reqbufs(struct file *file, void *priv,
+			  struct v4l2_requestbuffers *p)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return videobuf_reqbufs(&vip->vb_vidq, p);
+}
+
+/**
+ * vidioc_querybuf - query buffer
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @p: video buffer
+ *
+ * query buffer state.
+ * Handling is done in generic videobuf layer.
+ */
+static int vidioc_querybuf(struct file *file, void *priv, struct v4l2_buffer *p)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return videobuf_querybuf(&vip->vb_vidq, p);
+}
+
+/**
+ * vidioc_qbuf - queue a buffer
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @p: video buffer
+ *
+ * Handling is done in generic videobuf layer.
+ */
+static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *p)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return videobuf_qbuf(&vip->vb_vidq, p);
+}
+
+/**
+ * vidioc_dqbuf - dequeue a buffer
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @p: video buffer
+ *
+ * Handling is done in generic videobuf layer.
+ */
+static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return videobuf_dqbuf(&vip->vb_vidq, p, file->f_flags & O_NONBLOCK);
+}
+
+/**
+ * vidioc_streamon - turn on streaming
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @type: type of capture
+ *
+ * turn on streaming.
+ * Handling is done in generic videobuf layer.
+ */
+static int vidioc_streamon(struct file *file, void *priv,
+			   enum v4l2_buf_type type)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return videobuf_streamon(&vip->vb_vidq);
+}
+
+/**
+ * vidioc_streamoff - turn off streaming
+ * @file: descriptor of device ( not used)
+ * @priv: points to current videodevice
+ * @type: type of capture
+ *
+ * turn off streaming.
+ * Handling is done in generic videobuf layer.
+ */
+static int vidioc_streamoff(struct file *file, void *priv,
+			    enum v4l2_buf_type type)
+{
+	struct video_device *dev = priv;
+	struct sta2x11_vip *vip = video_get_drvdata(dev);
+
+	return videobuf_streamoff(&vip->vb_vidq);
+}
+
+static const struct v4l2_file_operations vip_fops = {
+	.owner = THIS_MODULE,
+	.open = vip_open,
+	.release = vip_close,
+	.ioctl = video_ioctl2,
+	.read = vip_read,
+	.mmap = vip_mmap,
+	.poll = vip_poll
+};
+
+static const struct v4l2_ioctl_ops vip_ioctl_ops = {
+	.vidioc_querycap = vidioc_querycap,
+	.vidioc_s_std = vidioc_s_std,
+	.vidioc_g_std = vidioc_g_std,
+	.vidioc_querystd = vidioc_querystd,
+	.vidioc_queryctrl = vidioc_queryctrl,
+	.vidioc_g_ctrl = vidioc_g_ctrl,
+	.vidioc_s_ctrl = vidioc_s_ctrl,
+	.vidioc_enum_input = vidioc_enum_input,
+	.vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
+	.vidioc_s_input = vidioc_s_input,
+	.vidioc_g_input = vidioc_g_input,
+	.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
+	.vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
+	.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
+	.vidioc_reqbufs = vidioc_reqbufs,
+	.vidioc_querybuf = vidioc_querybuf,
+	.vidioc_qbuf = vidioc_qbuf,
+	.vidioc_dqbuf = vidioc_dqbuf,
+	.vidioc_streamon = vidioc_streamon,
+	.vidioc_streamoff = vidioc_streamoff,
+};
+
+static struct video_device video_dev_template = {
+	.name = DRV_NAME,
+	.release = video_device_release,
+	.fops = &vip_fops,
+	.ioctl_ops = &vip_ioctl_ops,
+	.tvnorms = V4L2_STD_ALL,
+};
+
+/**
+ * vip_irq - interrupt routine
+ * @irq: Number of interrupt ( not used, correct number is assumed )
+ * @vip: local data structure containing all information
+ *
+ * check for both frame interrupts set ( top and bottom ).
+ * check FIFO overflow, but limit number of log messages after open.
+ * signal a complete buffer if done.
+ * dequeue a new buffer if available.
+ * disable VIP if no buffer available.
+ *
+ * return value: IRQ_NONE, interrupt was not generated by VIP
+ *
+ * IRQ_HANDLED, interrupt done.
+ */
+static irqreturn_t vip_irq(int irq, struct sta2x11_vip *vip)
+{
+	u32 status, dma;
+	unsigned long flags;
+	struct videobuf_buffer *vb;
+
+	status = REG_READ(vip, DVP_ITS);
+
+	if (!status) {
+		pr_debug("VIP: irq ignored\n");
+		return IRQ_NONE;
+	}
+
+	if (!vip->started)
+		return IRQ_HANDLED;
+
+	if (status & DVP_IT_VSB)
+		vip->bcount++;
+
+	if (status & DVP_IT_VST)
+		vip->tcount++;
+
+	if ((DVP_IT_VSB | DVP_IT_VST) == (status & (DVP_IT_VST | DVP_IT_VSB))) {
+		/* this is bad, we are too slow, hope the condition is gone
+		 * on the next frame */
+		pr_info("VIP: both irqs\n");
+		return IRQ_HANDLED;
+	}
+
+	if (status & DVP_IT_FIFO) {
+		if (5 > vip->overflow++)
+			pr_info("VIP: fifo overflow\n");
+	}
+
+	if (2 > vip->tcount)
+		return IRQ_HANDLED;
+
+	if (status & DVP_IT_VSB)
+		return IRQ_HANDLED;
+
+	spin_lock_irqsave(&vip->slock, flags);
+
+	REG_WRITE(vip, DVP_CTL, REG_READ(vip, DVP_CTL) & ~DVP_CTL_ENA);
+	if (vip->active) {
+		do_gettimeofday(&vip->active->ts);
+		vip->active->field_count++;
+		vip->active->state = VIDEOBUF_DONE;
+		wake_up(&vip->active->done);
+		vip->active = NULL;
+	}
+	if (!vip->closing) {
+		if (list_empty(&vip->capture))
+			goto done;
+
+		vb = list_first_entry(&vip->capture, struct videobuf_buffer,
+				      queue);
+		if (NULL == vb) {
+			pr_info("VIP: no buffer\n");
+			goto done;
+		}
+		vb->state = VIDEOBUF_ACTIVE;
+		list_del(&vb->queue);
+		vip->active = vb;
+		dma = videobuf_to_dma_contig(vb);
+		switch (vip->format.field) {
+		case V4L2_FIELD_INTERLACED:
+			REG_WRITE(vip, DVP_VTP, dma);
+			REG_WRITE(vip, DVP_VBP, dma + vip->format.width * 2);
+			break;
+		case V4L2_FIELD_TOP:
+		case V4L2_FIELD_BOTTOM:
+			REG_WRITE(vip, DVP_VTP, dma);
+			REG_WRITE(vip, DVP_VBP, dma);
+			break;
+		default:
+			pr_warning("VIP: unknown field format\n");
+			goto done;
+			break;
+		}
+		REG_WRITE(vip, DVP_CTL, REG_READ(vip, DVP_CTL) | DVP_CTL_ENA);
+	}
+done:
+	spin_unlock_irqrestore(&vip->slock, flags);
+	return IRQ_HANDLED;
+}
+
+/**
+ * vip_gpio_reserve - reserve gpio pin
+ * @dev: device
+ * @pin: GPIO pin number
+ * @dir: direction, input or output
+ * @name: GPIO pin name
+ *
+ */
+static int vip_gpio_reserve(struct device *dev, int pin, int dir,
+			    const char *name)
+{
+	int ret;
+
+	if (pin == -1)
+		return 0;
+
+	ret = gpio_request(pin, name);
+	if (ret) {
+		dev_err(dev, "Failed to allocate pin %d (%s)\n", pin, name);
+		return ret;
+	}
+
+	ret = gpio_direction_output(pin, dir);
+	if (ret) {
+		dev_err(dev, "Failed to set direction for pin %d (%s)\n",
+			pin, name);
+		gpio_free(pin);
+		return ret;
+	}
+
+	ret = gpio_export(pin, false);
+	if (ret) {
+		dev_err(dev, "Failed to export pin %d (%s)\n", pin, name);
+		gpio_free(pin);
+		return ret;
+	}
+
+	return 0;
+}
+
+/**
+ * vip_gpio_release - release gpio pin
+ * @dev: device
+ * @pin: GPIO pin number
+ * @name: GPIO pin name
+ *
+ */
+static void vip_gpio_release(struct device *dev, int pin, const char *name)
+{
+	if (pin != -1) {
+		dev_dbg(dev, "releasing pin %d (%s)\n",	pin, name);
+		gpio_unexport(pin);
+		gpio_free(pin);
+	}
+}
+
+/**
+ * sta2x11_vip_init_one - init one instance of video device
+ * @pdev: PCI device
+ * @ent: (not used)
+ *
+ * allocate reset pins for DAC.
+ * Reset video DAC, this is done via reset line.
+ * allocate memory for managing device
+ * request interrupt
+ * map IO region
+ * register device
+ * find and initialize video DAC
+ *
+ * return value: 0, no error
+ *
+ * -ENOMEM, no memory
+ *
+ * -ENODEV, device could not be detected or registered
+ */
+static int __devinit sta2x11_vip_init_one(struct pci_dev *pdev,
+					  const struct pci_device_id *ent)
+{
+	int ret;
+	struct sta2x11_vip *vip;
+	struct vip_config *config;
+
+	ret = pci_enable_device(pdev);
+	if (ret)
+		return ret;
+
+	config = dev_get_platdata(&pdev->dev);
+	if (!config) {
+		dev_info(&pdev->dev, "VIP slot disabled\n");
+		ret = -EINVAL;
+		goto disable;
+	}
+
+	ret = vip_gpio_reserve(&pdev->dev, config->pwr_pin, 0,
+			       config->pwr_name);
+	if (ret)
+		goto disable;
+
+	if (config->reset_pin >= 0) {
+		ret = vip_gpio_reserve(&pdev->dev, config->reset_pin, 0,
+				       config->reset_name);
+		if (ret) {
+			vip_gpio_release(&pdev->dev, config->pwr_pin,
+					 config->pwr_name);
+			goto disable;
+		}
+	}
+
+	if (config->pwr_pin != -1) {
+		/* Datasheet says 5ms between PWR and RST */
+		usleep_range(5000, 25000);
+		ret = gpio_direction_output(config->pwr_pin, 1);
+	}
+
+	if (config->reset_pin != -1) {
+		/* Datasheet says 5ms between PWR and RST */
+		usleep_range(5000, 25000);
+		ret = gpio_direction_output(config->reset_pin, 1);
+	}
+	usleep_range(5000, 25000);
+
+	vip = kzalloc(sizeof(struct sta2x11_vip), GFP_KERNEL);
+	if (!vip) {
+		ret = -ENOMEM;
+		goto release_gpios;
+	}
+
+	vip->pdev = pdev;
+	vip->std = V4L2_STD_PAL;
+	vip->format = formats_50[0];
+	vip->config = config;
+
+	if (v4l2_device_register(&pdev->dev, &vip->v4l2_dev))
+		goto free_mem;
+
+	dev_dbg(&pdev->dev, "BAR #0 at 0x%lx 0x%lx irq %d\n",
+		(unsigned long)pci_resource_start(pdev, 0),
+		(unsigned long)pci_resource_len(pdev, 0), pdev->irq);
+
+	pci_set_master(pdev);
+
+	ret = pci_request_regions(pdev, DRV_NAME);
+	if (ret)
+		goto unreg;
+
+	vip->iomem = pci_iomap(pdev, 0, 0x100);
+	if (!vip->iomem) {
+		ret = -ENOMEM; /* FIXME */
+		goto release;
+	}
+
+	pci_enable_msi(pdev);
+
+	INIT_LIST_HEAD(&vip->capture);
+	spin_lock_init(&vip->slock);
+	mutex_init(&vip->mutex);
+	vip->started = 0;
+	vip->disabled = 0;
+
+	ret = request_irq(pdev->irq,
+			  (irq_handler_t) vip_irq,
+			  IRQF_SHARED, DRV_NAME, vip);
+	if (ret) {
+		dev_err(&pdev->dev, "request_irq failed\n");
+		ret = -ENODEV;
+		goto unmap;
+	}
+
+	vip->video_dev = video_device_alloc();
+	if (!vip->video_dev) {
+		ret = -ENOMEM;
+		goto release_irq;
+	}
+
+	*(vip->video_dev) = video_dev_template;
+	video_set_drvdata(vip->video_dev, vip);
+
+	ret = video_register_device(vip->video_dev, VFL_TYPE_GRABBER, -1);
+	if (ret)
+		goto vrelease;
+
+	vip->adapter = i2c_get_adapter(vip->config->i2c_id);
+	if (!vip->adapter) {
+		ret = -ENODEV;
+		dev_err(&pdev->dev, "no I2C adapter found\n");
+		goto vunreg;
+	}
+
+	vip->decoder = v4l2_i2c_new_subdev(&vip->v4l2_dev, vip->adapter,
+					   "adv7180", vip->config->i2c_addr,
+					   NULL);
+	if (!vip->decoder) {
+		ret = -ENODEV;
+		dev_err(&pdev->dev, "no decoder found\n");
+		goto vunreg;
+	}
+
+	i2c_put_adapter(vip->adapter);
+
+	v4l2_subdev_call(vip->decoder, core, init, 0);
+
+	pr_info("STA2X11 Video Input Port (VIP) loaded\n");
+	return 0;
+
+vunreg:
+	video_set_drvdata(vip->video_dev, NULL);
+vrelease:
+	if (video_is_registered(vip->video_dev))
+		video_unregister_device(vip->video_dev);
+	else
+		video_device_release(vip->video_dev);
+release_irq:
+	free_irq(pdev->irq, vip);
+	pci_disable_msi(pdev);
+unmap:
+	pci_iounmap(pdev, vip->iomem);
+	mutex_destroy(&vip->mutex);
+release:
+	pci_release_regions(pdev);
+unreg:
+	v4l2_device_unregister(&vip->v4l2_dev);
+free_mem:
+	kfree(vip);
+release_gpios:
+	vip_gpio_release(&pdev->dev, config->reset_pin, config->reset_name);
+	vip_gpio_release(&pdev->dev, config->pwr_pin, config->pwr_name);
+disable:
+	/*
+	 * do not call pci_disable_device on sta2x11 because it break all
+	 * other Bus masters on this EP
+	 */
+	return ret;
+}
+
+/**
+ * sta2x11_vip_remove_one - release device
+ * @pdev: PCI device
+ *
+ * Undo everything done in .._init_one
+ *
+ * unregister video device
+ * free interrupt
+ * unmap ioadresses
+ * free memory
+ * free GPIO pins
+ */
+static void __devexit sta2x11_vip_remove_one(struct pci_dev *pdev)
+{
+	struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev);
+	struct sta2x11_vip *vip =
+	    container_of(v4l2_dev, struct sta2x11_vip, v4l2_dev);
+
+	video_set_drvdata(vip->video_dev, NULL);
+	video_unregister_device(vip->video_dev);
+	/*do not call video_device_release() here, is already done */
+	free_irq(pdev->irq, vip);
+	pci_disable_msi(pdev);
+	pci_iounmap(pdev, vip->iomem);
+	pci_release_regions(pdev);
+
+	v4l2_device_unregister(&vip->v4l2_dev);
+	mutex_destroy(&vip->mutex);
+
+	vip_gpio_release(&pdev->dev, vip->config->pwr_pin,
+			 vip->config->pwr_name);
+	vip_gpio_release(&pdev->dev, vip->config->reset_pin,
+			 vip->config->reset_name);
+
+	kfree(vip);
+	/*
+	 * do not call pci_disable_device on sta2x11 because it break all
+	 * other Bus masters on this EP
+	 */
+}
+
+#ifdef CONFIG_PM
+
+/**
+ * sta2x11_vip_suspend - set device into power save mode
+ * @pdev: PCI device
+ * @state: new state of device
+ *
+ * all relevant registers are saved and an attempt to set a new state is made.
+ *
+ * return value: 0 always indicate success,
+ * even if device could not be disabled. (workaround for hardware problem)
+ *
+ * reurn value : 0, always succesful, even if hardware does not not support
+ * power down mode.
+ */
+static int sta2x11_vip_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+	struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev);
+	struct sta2x11_vip *vip =
+	    container_of(v4l2_dev, struct sta2x11_vip, v4l2_dev);
+	unsigned long flags;
+	int i;
+
+	spin_lock_irqsave(&vip->slock, flags);
+	vip->register_save_area[0] = REG_READ(vip, DVP_CTL);
+	REG_WRITE(vip, DVP_CTL, vip->register_save_area[0] & DVP_CTL_DIS);
+	vip->register_save_area[SAVE_COUNT] = REG_READ(vip, DVP_ITM);
+	REG_WRITE(vip, DVP_ITM, 0);
+	for (i = 1; i < SAVE_COUNT; i++)
+		vip->register_save_area[i] = REG_READ(vip, 4 * i);
+	for (i = 0; i < AUX_COUNT; i++)
+		vip->register_save_area[SAVE_COUNT + IRQ_COUNT + i] =
+		    REG_READ(vip, registers_to_save[i]);
+	spin_unlock_irqrestore(&vip->slock, flags);
+	/* save pci state */
+	pci_save_state(pdev);
+	if (pci_set_power_state(pdev, pci_choose_state(pdev, state))) {
+		/*
+		 * do not call pci_disable_device on sta2x11 because it
+		 * break all other Bus masters on this EP
+		 */
+		vip->disabled = 1;
+	}
+
+	pr_info("VIP: suspend\n");
+	return 0;
+}
+
+/**
+ * sta2x11_vip_resume - resume device operation
+ * @pdev : PCI device
+ *
+ * re-enable device, set PCI state to powered and restore registers.
+ * resume normal device operation afterwards.
+ *
+ * return value: 0, no error.
+ *
+ * other, could not set device to power on state.
+ */
+static int sta2x11_vip_resume(struct pci_dev *pdev)
+{
+	struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev);
+	struct sta2x11_vip *vip =
+	    container_of(v4l2_dev, struct sta2x11_vip, v4l2_dev);
+	unsigned long flags;
+	int ret, i;
+
+	pr_info("VIP: resume\n");
+	/* restore pci state */
+	if (vip->disabled) {
+		ret = pci_enable_device(pdev);
+		if (ret) {
+			pr_warning("VIP: Can't enable device.\n");
+			return ret;
+		}
+		vip->disabled = 0;
+	}
+	ret = pci_set_power_state(pdev, PCI_D0);
+	if (ret) {
+		/*
+		 * do not call pci_disable_device on sta2x11 because it
+		 * break all other Bus masters on this EP
+		 */
+		pr_warning("VIP: Can't enable device.\n");
+		vip->disabled = 1;
+		return ret;
+	}
+
+	pci_restore_state(pdev);
+
+	spin_lock_irqsave(&vip->slock, flags);
+	for (i = 1; i < SAVE_COUNT; i++)
+		REG_WRITE(vip, 4 * i, vip->register_save_area[i]);
+	for (i = 0; i < AUX_COUNT; i++)
+		REG_WRITE(vip, registers_to_save[i],
+			  vip->register_save_area[SAVE_COUNT + IRQ_COUNT + i]);
+	REG_WRITE(vip, DVP_CTL, vip->register_save_area[0]);
+	REG_WRITE(vip, DVP_ITM, vip->register_save_area[SAVE_COUNT]);
+	spin_unlock_irqrestore(&vip->slock, flags);
+	return 0;
+}
+
+#endif
+
+static DEFINE_PCI_DEVICE_TABLE(sta2x11_vip_pci_tbl) = {
+	{PCI_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_VIP)},
+	{0,}
+};
+
+static struct pci_driver sta2x11_vip_driver = {
+	.name = DRV_NAME,
+	.probe = sta2x11_vip_init_one,
+	.remove = __devexit_p(sta2x11_vip_remove_one),
+	.id_table = sta2x11_vip_pci_tbl,
+#ifdef CONFIG_PM
+	.suspend = sta2x11_vip_suspend,
+	.resume = sta2x11_vip_resume,
+#endif
+};
+
+static int __init sta2x11_vip_init_module(void)
+{
+	return pci_register_driver(&sta2x11_vip_driver);
+}
+
+static void __exit sta2x11_vip_exit_module(void)
+{
+	pci_unregister_driver(&sta2x11_vip_driver);
+}
+
+#ifdef MODULE
+module_init(sta2x11_vip_init_module);
+module_exit(sta2x11_vip_exit_module);
+#else
+late_initcall_sync(sta2x11_vip_init_module);
+#endif
+
+MODULE_DESCRIPTION("STA2X11 Video Input Port driver");
+MODULE_AUTHOR("Wind River");
+MODULE_LICENSE("GPL v2");
+MODULE_SUPPORTED_DEVICE("sta2x11 video input");
+MODULE_VERSION(DRV_VERSION);
+MODULE_DEVICE_TABLE(pci, sta2x11_vip_pci_tbl);
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.h b/drivers/media/pci/sta2x11/sta2x11_vip.h
new file mode 100644
index 0000000..4f81a13
--- /dev/null
+++ b/drivers/media/pci/sta2x11/sta2x11_vip.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2011 Wind River Systems, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author:  Anders Wallin <anders.wallin@windriver.com>
+ *
+ */
+
+#ifndef __STA2X11_VIP_H
+#define __STA2X11_VIP_H
+
+/**
+ * struct vip_config - video input configuration data
+ * @pwr_name: ADV powerdown name
+ * @pwr_pin: ADV powerdown pin
+ * @reset_name: ADV reset name
+ * @reset_pin: ADV reset pin
+ */
+struct vip_config {
+	const char *pwr_name;
+	int pwr_pin;
+	const char *reset_name;
+	int reset_pin;
+	int i2c_id;
+	int i2c_addr;
+};
+
+#endif /* __STA2X11_VIP_H */
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 4d79dfd..d545d93 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -606,51 +606,6 @@ config VIDEO_VIVI
 	  In doubt, say N.
 
 #
-# PCI drivers configuration - No devices here are for webcams
-#
-
-menuconfig V4L_PCI_DRIVERS
-	bool "V4L PCI(e) devices"
-	depends on PCI
-	depends on MEDIA_ANALOG_TV_SUPPORT
-	default y
-	---help---
-	  Say Y here to enable support for these PCI(e) drivers.
-
-if V4L_PCI_DRIVERS
-
-config VIDEO_MEYE
-	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
-	depends on PCI && SONY_LAPTOP && VIDEO_V4L2
-	---help---
-	  This is the video4linux driver for the Motion Eye camera found
-	  in the Vaio Picturebook laptops. Please read the material in
-	  <file:Documentation/video4linux/meye.txt> for more information.
-
-	  If you say Y or M here, you need to say Y or M to "Sony Laptop
-	  Extras" in the misc device section.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called meye.
-
-
-
-config STA2X11_VIP
-	tristate "STA2X11 VIP Video For Linux"
-	depends on STA2X11
-	select VIDEO_ADV7180 if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEOBUF_DMA_CONTIG
-	depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS
-	help
-	  Say Y for support for STA2X11 VIP (Video Input Port) capture
-	  device.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called sta2x11_vip.
-
-endif # V4L_PCI_DRIVERS
-
-#
 # ISA & parallel port drivers configuration
 #	All devices here are webcam or grabber devices
 #
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 8df694d..f212af3 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -92,8 +92,6 @@ obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
 obj-$(CONFIG_VIDEO_W9966) += w9966.o
 obj-$(CONFIG_VIDEO_PMS) += pms.o
 obj-$(CONFIG_VIDEO_VINO) += vino.o
-obj-$(CONFIG_VIDEO_MEYE) += meye.o
-obj-$(CONFIG_STA2X11_VIP) += sta2x11_vip.o
 obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
 
 obj-$(CONFIG_VIDEO_BTCX)  += btcx-risc.o
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
deleted file mode 100644
index 7bc7752..0000000
--- a/drivers/media/video/meye.c
+++ /dev/null
@@ -1,1964 +0,0 @@
-/*
- * Motion Eye video4linux driver for Sony Vaio PictureBook
- *
- * Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net>
- *
- * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
- *
- * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com>
- *
- * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras.
- *
- * Some parts borrowed from various video4linux drivers, especially
- * bttv-driver.c and zoran.c, see original files for credits.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/gfp.h>
-#include <linux/videodev2.h>
-#include <media/v4l2-common.h>
-#include <media/v4l2-device.h>
-#include <media/v4l2-ioctl.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/vmalloc.h>
-#include <linux/dma-mapping.h>
-
-#include "meye.h"
-#include <linux/meye.h>
-
-MODULE_AUTHOR("Stelian Pop <stelian@popies.net>");
-MODULE_DESCRIPTION("v4l2 driver for the MotionEye camera");
-MODULE_LICENSE("GPL");
-MODULE_VERSION(MEYE_DRIVER_VERSION);
-
-/* number of grab buffers */
-static unsigned int gbuffers = 2;
-module_param(gbuffers, int, 0444);
-MODULE_PARM_DESC(gbuffers, "number of capture buffers, default is 2 (32 max)");
-
-/* size of a grab buffer */
-static unsigned int gbufsize = MEYE_MAX_BUFSIZE;
-module_param(gbufsize, int, 0444);
-MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 614400"
-		 " (will be rounded up to a page multiple)");
-
-/* /dev/videoX registration number */
-static int video_nr = -1;
-module_param(video_nr, int, 0444);
-MODULE_PARM_DESC(video_nr, "video device to register (0=/dev/video0, etc)");
-
-/* driver structure - only one possible */
-static struct meye meye;
-
-/****************************************************************************/
-/* Memory allocation routines (stolen from bttv-driver.c)                   */
-/****************************************************************************/
-static void *rvmalloc(unsigned long size)
-{
-	void *mem;
-	unsigned long adr;
-
-	size = PAGE_ALIGN(size);
-	mem = vmalloc_32(size);
-	if (mem) {
-		memset(mem, 0, size);
-		adr = (unsigned long) mem;
-		while (size > 0) {
-			SetPageReserved(vmalloc_to_page((void *)adr));
-			adr += PAGE_SIZE;
-			size -= PAGE_SIZE;
-		}
-	}
-	return mem;
-}
-
-static void rvfree(void * mem, unsigned long size)
-{
-	unsigned long adr;
-
-	if (mem) {
-		adr = (unsigned long) mem;
-		while ((long) size > 0) {
-			ClearPageReserved(vmalloc_to_page((void *)adr));
-			adr += PAGE_SIZE;
-			size -= PAGE_SIZE;
-		}
-		vfree(mem);
-	}
-}
-
-/*
- * return a page table pointing to N pages of locked memory
- *
- * NOTE: The meye device expects DMA addresses on 32 bits, we build
- * a table of 1024 entries = 4 bytes * 1024 = 4096 bytes.
- */
-static int ptable_alloc(void)
-{
-	u32 *pt;
-	int i;
-
-	memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable));
-
-	/* give only 32 bit DMA addresses */
-	if (dma_set_mask(&meye.mchip_dev->dev, DMA_BIT_MASK(32)))
-		return -1;
-
-	meye.mchip_ptable_toc = dma_alloc_coherent(&meye.mchip_dev->dev,
-						   PAGE_SIZE,
-						   &meye.mchip_dmahandle,
-						   GFP_KERNEL);
-	if (!meye.mchip_ptable_toc) {
-		meye.mchip_dmahandle = 0;
-		return -1;
-	}
-
-	pt = meye.mchip_ptable_toc;
-	for (i = 0; i < MCHIP_NB_PAGES; i++) {
-		dma_addr_t dma;
-		meye.mchip_ptable[i] = dma_alloc_coherent(&meye.mchip_dev->dev,
-							  PAGE_SIZE,
-							  &dma,
-							  GFP_KERNEL);
-		if (!meye.mchip_ptable[i]) {
-			int j;
-			pt = meye.mchip_ptable_toc;
-			for (j = 0; j < i; ++j) {
-				dma = (dma_addr_t) *pt;
-				dma_free_coherent(&meye.mchip_dev->dev,
-						  PAGE_SIZE,
-						  meye.mchip_ptable[j], dma);
-				pt++;
-			}
-			dma_free_coherent(&meye.mchip_dev->dev,
-					  PAGE_SIZE,
-					  meye.mchip_ptable_toc,
-					  meye.mchip_dmahandle);
-			meye.mchip_ptable_toc = NULL;
-			meye.mchip_dmahandle = 0;
-			return -1;
-		}
-		*pt = (u32) dma;
-		pt++;
-	}
-	return 0;
-}
-
-static void ptable_free(void)
-{
-	u32 *pt;
-	int i;
-
-	pt = meye.mchip_ptable_toc;
-	for (i = 0; i < MCHIP_NB_PAGES; i++) {
-		dma_addr_t dma = (dma_addr_t) *pt;
-		if (meye.mchip_ptable[i])
-			dma_free_coherent(&meye.mchip_dev->dev,
-					  PAGE_SIZE,
-					  meye.mchip_ptable[i], dma);
-		pt++;
-	}
-
-	if (meye.mchip_ptable_toc)
-		dma_free_coherent(&meye.mchip_dev->dev,
-				  PAGE_SIZE,
-				  meye.mchip_ptable_toc,
-				  meye.mchip_dmahandle);
-
-	memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable));
-	meye.mchip_ptable_toc = NULL;
-	meye.mchip_dmahandle = 0;
-}
-
-/* copy data from ptable into buf */
-static void ptable_copy(u8 *buf, int start, int size, int pt_pages)
-{
-	int i;
-
-	for (i = 0; i < (size / PAGE_SIZE) * PAGE_SIZE; i += PAGE_SIZE) {
-		memcpy(buf + i, meye.mchip_ptable[start++], PAGE_SIZE);
-		if (start >= pt_pages)
-			start = 0;
-	}
-	memcpy(buf + i, meye.mchip_ptable[start], size % PAGE_SIZE);
-}
-
-/****************************************************************************/
-/* JPEG tables at different qualities to load into the VRJ chip             */
-/****************************************************************************/
-
-/* return a set of quantisation tables based on a quality from 1 to 10 */
-static u16 *jpeg_quantisation_tables(int *length, int quality)
-{
-	static u16 jpeg_tables[][70] = { {
-		0xdbff, 0x4300, 0xff00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff,
-		0xdbff, 0x4300, 0xff01, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff,
-	},
-	{
-		0xdbff, 0x4300, 0x5000, 0x3c37, 0x3c46, 0x5032, 0x4146, 0x5a46,
-		0x5055, 0x785f, 0x82c8, 0x6e78, 0x786e, 0xaff5, 0x91b9, 0xffc8,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff,
-		0xdbff, 0x4300, 0x5501, 0x5a5a, 0x6978, 0xeb78, 0x8282, 0xffeb,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-		0xffff, 0xffff, 0xffff,
-	},
-	{
-		0xdbff, 0x4300, 0x2800, 0x1e1c, 0x1e23, 0x2819, 0x2123, 0x2d23,
-		0x282b, 0x3c30, 0x4164, 0x373c, 0x3c37, 0x587b, 0x495d, 0x9164,
-		0x9980, 0x8f96, 0x8c80, 0xa08a, 0xe6b4, 0xa0c3, 0xdaaa, 0x8aad,
-		0xc88c, 0xcbff, 0xeeda, 0xfff5, 0xffff, 0xc19b, 0xffff, 0xfaff,
-		0xe6ff, 0xfffd, 0xfff8,
-		0xdbff, 0x4300, 0x2b01, 0x2d2d, 0x353c, 0x763c, 0x4141, 0xf876,
-		0x8ca5, 0xf8a5, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8,
-		0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8,
-		0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8,
-		0xf8f8, 0xf8f8, 0xfff8,
-	},
-	{
-		0xdbff, 0x4300, 0x1b00, 0x1412, 0x1417, 0x1b11, 0x1617, 0x1e17,
-		0x1b1c, 0x2820, 0x2b42, 0x2528, 0x2825, 0x3a51, 0x303d, 0x6042,
-		0x6555, 0x5f64, 0x5d55, 0x6a5b, 0x9978, 0x6a81, 0x9071, 0x5b73,
-		0x855d, 0x86b5, 0x9e90, 0xaba3, 0xabad, 0x8067, 0xc9bc, 0xa6ba,
-		0x99c7, 0xaba8, 0xffa4,
-		0xdbff, 0x4300, 0x1c01, 0x1e1e, 0x2328, 0x4e28, 0x2b2b, 0xa44e,
-		0x5d6e, 0xa46e, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4,
-		0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4,
-		0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4,
-		0xa4a4, 0xa4a4, 0xffa4,
-	},
-	{
-		0xdbff, 0x4300, 0x1400, 0x0f0e, 0x0f12, 0x140d, 0x1012, 0x1712,
-		0x1415, 0x1e18, 0x2132, 0x1c1e, 0x1e1c, 0x2c3d, 0x242e, 0x4932,
-		0x4c40, 0x474b, 0x4640, 0x5045, 0x735a, 0x5062, 0x6d55, 0x4556,
-		0x6446, 0x6588, 0x776d, 0x817b, 0x8182, 0x604e, 0x978d, 0x7d8c,
-		0x7396, 0x817e, 0xff7c,
-		0xdbff, 0x4300, 0x1501, 0x1717, 0x1a1e, 0x3b1e, 0x2121, 0x7c3b,
-		0x4653, 0x7c53, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c,
-		0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c,
-		0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c,
-		0x7c7c, 0x7c7c, 0xff7c,
-	},
-	{
-		0xdbff, 0x4300, 0x1000, 0x0c0b, 0x0c0e, 0x100a, 0x0d0e, 0x120e,
-		0x1011, 0x1813, 0x1a28, 0x1618, 0x1816, 0x2331, 0x1d25, 0x3a28,
-		0x3d33, 0x393c, 0x3833, 0x4037, 0x5c48, 0x404e, 0x5744, 0x3745,
-		0x5038, 0x516d, 0x5f57, 0x6762, 0x6768, 0x4d3e, 0x7971, 0x6470,
-		0x5c78, 0x6765, 0xff63,
-		0xdbff, 0x4300, 0x1101, 0x1212, 0x1518, 0x2f18, 0x1a1a, 0x632f,
-		0x3842, 0x6342, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363,
-		0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363,
-		0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363,
-		0x6363, 0x6363, 0xff63,
-	},
-	{
-		0xdbff, 0x4300, 0x0d00, 0x0a09, 0x0a0b, 0x0d08, 0x0a0b, 0x0e0b,
-		0x0d0e, 0x130f, 0x1520, 0x1213, 0x1312, 0x1c27, 0x171e, 0x2e20,
-		0x3129, 0x2e30, 0x2d29, 0x332c, 0x4a3a, 0x333e, 0x4636, 0x2c37,
-		0x402d, 0x4157, 0x4c46, 0x524e, 0x5253, 0x3e32, 0x615a, 0x505a,
-		0x4a60, 0x5251, 0xff4f,
-		0xdbff, 0x4300, 0x0e01, 0x0e0e, 0x1113, 0x2613, 0x1515, 0x4f26,
-		0x2d35, 0x4f35, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f,
-		0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f,
-		0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f,
-		0x4f4f, 0x4f4f, 0xff4f,
-	},
-	{
-		0xdbff, 0x4300, 0x0a00, 0x0707, 0x0708, 0x0a06, 0x0808, 0x0b08,
-		0x0a0a, 0x0e0b, 0x1018, 0x0d0e, 0x0e0d, 0x151d, 0x1116, 0x2318,
-		0x251f, 0x2224, 0x221f, 0x2621, 0x372b, 0x262f, 0x3429, 0x2129,
-		0x3022, 0x3141, 0x3934, 0x3e3b, 0x3e3e, 0x2e25, 0x4944, 0x3c43,
-		0x3748, 0x3e3d, 0xff3b,
-		0xdbff, 0x4300, 0x0a01, 0x0b0b, 0x0d0e, 0x1c0e, 0x1010, 0x3b1c,
-		0x2228, 0x3b28, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b,
-		0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b,
-		0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b,
-		0x3b3b, 0x3b3b, 0xff3b,
-	},
-	{
-		0xdbff, 0x4300, 0x0600, 0x0504, 0x0506, 0x0604, 0x0506, 0x0706,
-		0x0607, 0x0a08, 0x0a10, 0x090a, 0x0a09, 0x0e14, 0x0c0f, 0x1710,
-		0x1814, 0x1718, 0x1614, 0x1a16, 0x251d, 0x1a1f, 0x231b, 0x161c,
-		0x2016, 0x202c, 0x2623, 0x2927, 0x292a, 0x1f19, 0x302d, 0x282d,
-		0x2530, 0x2928, 0xff28,
-		0xdbff, 0x4300, 0x0701, 0x0707, 0x080a, 0x130a, 0x0a0a, 0x2813,
-		0x161a, 0x281a, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828,
-		0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828,
-		0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828,
-		0x2828, 0x2828, 0xff28,
-	},
-	{
-		0xdbff, 0x4300, 0x0300, 0x0202, 0x0203, 0x0302, 0x0303, 0x0403,
-		0x0303, 0x0504, 0x0508, 0x0405, 0x0504, 0x070a, 0x0607, 0x0c08,
-		0x0c0a, 0x0b0c, 0x0b0a, 0x0d0b, 0x120e, 0x0d10, 0x110e, 0x0b0e,
-		0x100b, 0x1016, 0x1311, 0x1514, 0x1515, 0x0f0c, 0x1817, 0x1416,
-		0x1218, 0x1514, 0xff14,
-		0xdbff, 0x4300, 0x0301, 0x0404, 0x0405, 0x0905, 0x0505, 0x1409,
-		0x0b0d, 0x140d, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414,
-		0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414,
-		0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414,
-		0x1414, 0x1414, 0xff14,
-	},
-	{
-		0xdbff, 0x4300, 0x0100, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
-		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
-		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
-		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
-		0x0101, 0x0101, 0xff01,
-		0xdbff, 0x4300, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
-		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
-		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
-		0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
-		0x0101, 0x0101, 0xff01,
-	} };
-
-	if (quality < 0 || quality > 10) {
-		printk(KERN_WARNING
-		       "meye: invalid quality level %d - using 8\n", quality);
-		quality = 8;
-	}
-
-	*length = ARRAY_SIZE(jpeg_tables[quality]);
-	return jpeg_tables[quality];
-}
-
-/* return a generic set of huffman tables */
-static u16 *jpeg_huffman_tables(int *length)
-{
-	static u16 tables[] = {
-		0xC4FF, 0xB500, 0x0010, 0x0102, 0x0303, 0x0402, 0x0503, 0x0405,
-		0x0004, 0x0100, 0x017D, 0x0302, 0x0400, 0x0511, 0x2112, 0x4131,
-		0x1306, 0x6151, 0x2207, 0x1471, 0x8132, 0xA191, 0x2308, 0xB142,
-		0x15C1, 0xD152, 0x24F0, 0x6233, 0x8272, 0x0A09, 0x1716, 0x1918,
-		0x251A, 0x2726, 0x2928, 0x342A, 0x3635, 0x3837, 0x3A39, 0x4443,
-		0x4645, 0x4847, 0x4A49, 0x5453, 0x5655, 0x5857, 0x5A59, 0x6463,
-		0x6665, 0x6867, 0x6A69, 0x7473, 0x7675, 0x7877, 0x7A79, 0x8483,
-		0x8685, 0x8887, 0x8A89, 0x9392, 0x9594, 0x9796, 0x9998, 0xA29A,
-		0xA4A3, 0xA6A5, 0xA8A7, 0xAAA9, 0xB3B2, 0xB5B4, 0xB7B6, 0xB9B8,
-		0xC2BA, 0xC4C3, 0xC6C5, 0xC8C7, 0xCAC9, 0xD3D2, 0xD5D4, 0xD7D6,
-		0xD9D8, 0xE1DA, 0xE3E2, 0xE5E4, 0xE7E6, 0xE9E8, 0xF1EA, 0xF3F2,
-		0xF5F4, 0xF7F6, 0xF9F8, 0xFFFA,
-		0xC4FF, 0xB500, 0x0011, 0x0102, 0x0402, 0x0304, 0x0704, 0x0405,
-		0x0004, 0x0201, 0x0077, 0x0201, 0x1103, 0x0504, 0x3121, 0x1206,
-		0x5141, 0x6107, 0x1371, 0x3222, 0x0881, 0x4214, 0xA191, 0xC1B1,
-		0x2309, 0x5233, 0x15F0, 0x7262, 0x0AD1, 0x2416, 0xE134, 0xF125,
-		0x1817, 0x1A19, 0x2726, 0x2928, 0x352A, 0x3736, 0x3938, 0x433A,
-		0x4544, 0x4746, 0x4948, 0x534A, 0x5554, 0x5756, 0x5958, 0x635A,
-		0x6564, 0x6766, 0x6968, 0x736A, 0x7574, 0x7776, 0x7978, 0x827A,
-		0x8483, 0x8685, 0x8887, 0x8A89, 0x9392, 0x9594, 0x9796, 0x9998,
-		0xA29A, 0xA4A3, 0xA6A5, 0xA8A7, 0xAAA9, 0xB3B2, 0xB5B4, 0xB7B6,
-		0xB9B8, 0xC2BA, 0xC4C3, 0xC6C5, 0xC8C7, 0xCAC9, 0xD3D2, 0xD5D4,
-		0xD7D6, 0xD9D8, 0xE2DA, 0xE4E3, 0xE6E5, 0xE8E7, 0xEAE9, 0xF3F2,
-		0xF5F4, 0xF7F6, 0xF9F8, 0xFFFA,
-		0xC4FF, 0x1F00, 0x0000, 0x0501, 0x0101, 0x0101, 0x0101, 0x0000,
-		0x0000, 0x0000, 0x0000, 0x0201, 0x0403, 0x0605, 0x0807, 0x0A09,
-		0xFF0B,
-		0xC4FF, 0x1F00, 0x0001, 0x0103, 0x0101, 0x0101, 0x0101, 0x0101,
-		0x0000, 0x0000, 0x0000, 0x0201, 0x0403, 0x0605, 0x0807, 0x0A09,
-		0xFF0B
-	};
-
-	*length = ARRAY_SIZE(tables);
-	return tables;
-}
-
-/****************************************************************************/
-/* MCHIP low-level functions                                                */
-/****************************************************************************/
-
-/* returns the horizontal capture size */
-static inline int mchip_hsize(void)
-{
-	return meye.params.subsample ? 320 : 640;
-}
-
-/* returns the vertical capture size */
-static inline int mchip_vsize(void)
-{
-	return meye.params.subsample ? 240 : 480;
-}
-
-/* waits for a register to be available */
-static void mchip_sync(int reg)
-{
-	u32 status;
-	int i;
-
-	if (reg == MCHIP_MM_FIFO_DATA) {
-		for (i = 0; i < MCHIP_REG_TIMEOUT; i++) {
-			status = readl(meye.mchip_mmregs +
-				       MCHIP_MM_FIFO_STATUS);
-			if (!(status & MCHIP_MM_FIFO_WAIT)) {
-				printk(KERN_WARNING "meye: fifo not ready\n");
-				return;
-			}
-			if (status & MCHIP_MM_FIFO_READY)
-				return;
-			udelay(1);
-		}
-	} else if (reg > 0x80) {
-		u32 mask = (reg < 0x100) ? MCHIP_HIC_STATUS_MCC_RDY
-					 : MCHIP_HIC_STATUS_VRJ_RDY;
-		for (i = 0; i < MCHIP_REG_TIMEOUT; i++) {
-			status = readl(meye.mchip_mmregs + MCHIP_HIC_STATUS);
-			if (status & mask)
-				return;
-			udelay(1);
-		}
-	} else
-		return;
-	printk(KERN_WARNING
-	       "meye: mchip_sync() timeout on reg 0x%x status=0x%x\n",
-	       reg, status);
-}
-
-/* sets a value into the register */
-static inline void mchip_set(int reg, u32 v)
-{
-	mchip_sync(reg);
-	writel(v, meye.mchip_mmregs + reg);
-}
-
-/* get the register value */
-static inline u32 mchip_read(int reg)
-{
-	mchip_sync(reg);
-	return readl(meye.mchip_mmregs + reg);
-}
-
-/* wait for a register to become a particular value */
-static inline int mchip_delay(u32 reg, u32 v)
-{
-	int n = 10;
-	while (--n && mchip_read(reg) != v)
-		udelay(1);
-	return n;
-}
-
-/* setup subsampling */
-static void mchip_subsample(void)
-{
-	mchip_set(MCHIP_MCC_R_SAMPLING, meye.params.subsample);
-	mchip_set(MCHIP_MCC_R_XRANGE, mchip_hsize());
-	mchip_set(MCHIP_MCC_R_YRANGE, mchip_vsize());
-	mchip_set(MCHIP_MCC_B_XRANGE, mchip_hsize());
-	mchip_set(MCHIP_MCC_B_YRANGE, mchip_vsize());
-	mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE);
-}
-
-/* set the framerate into the mchip */
-static void mchip_set_framerate(void)
-{
-	mchip_set(MCHIP_HIC_S_RATE, meye.params.framerate);
-}
-
-/* load some huffman and quantisation tables into the VRJ chip ready
-   for JPEG compression */
-static void mchip_load_tables(void)
-{
-	int i;
-	int length;
-	u16 *tables;
-
-	tables = jpeg_huffman_tables(&length);
-	for (i = 0; i < length; i++)
-		writel(tables[i], meye.mchip_mmregs + MCHIP_VRJ_TABLE_DATA);
-
-	tables = jpeg_quantisation_tables(&length, meye.params.quality);
-	for (i = 0; i < length; i++)
-		writel(tables[i], meye.mchip_mmregs + MCHIP_VRJ_TABLE_DATA);
-}
-
-/* setup the VRJ parameters in the chip */
-static void mchip_vrj_setup(u8 mode)
-{
-	mchip_set(MCHIP_VRJ_BUS_MODE, 5);
-	mchip_set(MCHIP_VRJ_SIGNAL_ACTIVE_LEVEL, 0x1f);
-	mchip_set(MCHIP_VRJ_PDAT_USE, 1);
-	mchip_set(MCHIP_VRJ_IRQ_FLAG, 0xa0);
-	mchip_set(MCHIP_VRJ_MODE_SPECIFY, mode);
-	mchip_set(MCHIP_VRJ_NUM_LINES, mchip_vsize());
-	mchip_set(MCHIP_VRJ_NUM_PIXELS, mchip_hsize());
-	mchip_set(MCHIP_VRJ_NUM_COMPONENTS, 0x1b);
-	mchip_set(MCHIP_VRJ_LIMIT_COMPRESSED_LO, 0xFFFF);
-	mchip_set(MCHIP_VRJ_LIMIT_COMPRESSED_HI, 0xFFFF);
-	mchip_set(MCHIP_VRJ_COMP_DATA_FORMAT, 0xC);
-	mchip_set(MCHIP_VRJ_RESTART_INTERVAL, 0);
-	mchip_set(MCHIP_VRJ_SOF1, 0x601);
-	mchip_set(MCHIP_VRJ_SOF2, 0x1502);
-	mchip_set(MCHIP_VRJ_SOF3, 0x1503);
-	mchip_set(MCHIP_VRJ_SOF4, 0x1596);
-	mchip_set(MCHIP_VRJ_SOS, 0x0ed0);
-
-	mchip_load_tables();
-}
-
-/* sets the DMA parameters into the chip */
-static void mchip_dma_setup(dma_addr_t dma_addr)
-{
-	int i;
-
-	mchip_set(MCHIP_MM_PT_ADDR, (u32)dma_addr);
-	for (i = 0; i < 4; i++)
-		mchip_set(MCHIP_MM_FIR(i), 0);
-	meye.mchip_fnum = 0;
-}
-
-/* setup for DMA transfers - also zeros the framebuffer */
-static int mchip_dma_alloc(void)
-{
-	if (!meye.mchip_dmahandle)
-		if (ptable_alloc())
-			return -1;
-	return 0;
-}
-
-/* frees the DMA buffer */
-static void mchip_dma_free(void)
-{
-	if (meye.mchip_dmahandle) {
-		mchip_dma_setup(0);
-		ptable_free();
-	}
-}
-
-/* stop any existing HIC action and wait for any dma to complete then
-   reset the dma engine */
-static void mchip_hic_stop(void)
-{
-	int i, j;
-
-	meye.mchip_mode = MCHIP_HIC_MODE_NOOP;
-	if (!(mchip_read(MCHIP_HIC_STATUS) & MCHIP_HIC_STATUS_BUSY))
-		return;
-	for (i = 0; i < 20; ++i) {
-		mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_STOP);
-		mchip_delay(MCHIP_HIC_CMD, 0);
-		for (j = 0; j < 100; ++j) {
-			if (mchip_delay(MCHIP_HIC_STATUS,
-					MCHIP_HIC_STATUS_IDLE))
-				return;
-			msleep(1);
-		}
-		printk(KERN_ERR "meye: need to reset HIC!\n");
-
-		mchip_set(MCHIP_HIC_CTL, MCHIP_HIC_CTL_SOFT_RESET);
-		msleep(250);
-	}
-	printk(KERN_ERR "meye: resetting HIC hanged!\n");
-}
-
-/****************************************************************************/
-/* MCHIP frame processing functions                                         */
-/****************************************************************************/
-
-/* get the next ready frame from the dma engine */
-static u32 mchip_get_frame(void)
-{
-	u32 v;
-
-	v = mchip_read(MCHIP_MM_FIR(meye.mchip_fnum));
-	return v;
-}
-
-/* frees the current frame from the dma engine */
-static void mchip_free_frame(void)
-{
-	mchip_set(MCHIP_MM_FIR(meye.mchip_fnum), 0);
-	meye.mchip_fnum++;
-	meye.mchip_fnum %= 4;
-}
-
-/* read one frame from the framebuffer assuming it was captured using
-   a uncompressed transfer */
-static void mchip_cont_read_frame(u32 v, u8 *buf, int size)
-{
-	int pt_id;
-
-	pt_id = (v >> 17) & 0x3FF;
-
-	ptable_copy(buf, pt_id, size, MCHIP_NB_PAGES);
-}
-
-/* read a compressed frame from the framebuffer */
-static int mchip_comp_read_frame(u32 v, u8 *buf, int size)
-{
-	int pt_start, pt_end, trailer;
-	int fsize;
-	int i;
-
-	pt_start = (v >> 19) & 0xFF;
-	pt_end = (v >> 11) & 0xFF;
-	trailer = (v >> 1) & 0x3FF;
-
-	if (pt_end < pt_start)
-		fsize = (MCHIP_NB_PAGES_MJPEG - pt_start) * PAGE_SIZE +
-			pt_end * PAGE_SIZE + trailer * 4;
-	else
-		fsize = (pt_end - pt_start) * PAGE_SIZE + trailer * 4;
-
-	if (fsize > size) {
-		printk(KERN_WARNING "meye: oversized compressed frame %d\n",
-		       fsize);
-		return -1;
-	}
-
-	ptable_copy(buf, pt_start, fsize, MCHIP_NB_PAGES_MJPEG);
-
-#ifdef MEYE_JPEG_CORRECTION
-
-	/* Some mchip generated jpeg frames are incorrect. In most
-	 * (all ?) of those cases, the final EOI (0xff 0xd9) marker
-	 * is not present at the end of the frame.
-	 *
-	 * Since adding the final marker is not enough to restore
-	 * the jpeg integrity, we drop the frame.
-	 */
-
-	for (i = fsize - 1; i > 0 && buf[i] == 0xff; i--) ;
-
-	if (i < 2 || buf[i - 1] != 0xff || buf[i] != 0xd9)
-		return -1;
-
-#endif
-
-	return fsize;
-}
-
-/* take a picture into SDRAM */
-static void mchip_take_picture(void)
-{
-	int i;
-
-	mchip_hic_stop();
-	mchip_subsample();
-	mchip_dma_setup(meye.mchip_dmahandle);
-
-	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_CAP);
-	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
-
-	mchip_delay(MCHIP_HIC_CMD, 0);
-
-	for (i = 0; i < 100; ++i) {
-		if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE))
-			break;
-		msleep(1);
-	}
-}
-
-/* dma a previously taken picture into a buffer */
-static void mchip_get_picture(u8 *buf, int bufsize)
-{
-	u32 v;
-	int i;
-
-	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_OUT);
-	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
-
-	mchip_delay(MCHIP_HIC_CMD, 0);
-	for (i = 0; i < 100; ++i) {
-		if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE))
-			break;
-		msleep(1);
-	}
-	for (i = 0; i < 4; ++i) {
-		v = mchip_get_frame();
-		if (v & MCHIP_MM_FIR_RDY) {
-			mchip_cont_read_frame(v, buf, bufsize);
-			break;
-		}
-		mchip_free_frame();
-	}
-}
-
-/* start continuous dma capture */
-static void mchip_continuous_start(void)
-{
-	mchip_hic_stop();
-	mchip_subsample();
-	mchip_set_framerate();
-	mchip_dma_setup(meye.mchip_dmahandle);
-
-	meye.mchip_mode = MCHIP_HIC_MODE_CONT_OUT;
-
-	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_CONT_OUT);
-	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
-
-	mchip_delay(MCHIP_HIC_CMD, 0);
-}
-
-/* compress one frame into a buffer */
-static int mchip_compress_frame(u8 *buf, int bufsize)
-{
-	u32 v;
-	int len = -1, i;
-
-	mchip_vrj_setup(0x3f);
-	udelay(50);
-
-	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_COMP);
-	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
-
-	mchip_delay(MCHIP_HIC_CMD, 0);
-	for (i = 0; i < 100; ++i) {
-		if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE))
-			break;
-		msleep(1);
-	}
-
-	for (i = 0; i < 4; ++i) {
-		v = mchip_get_frame();
-		if (v & MCHIP_MM_FIR_RDY) {
-			len = mchip_comp_read_frame(v, buf, bufsize);
-			break;
-		}
-		mchip_free_frame();
-	}
-	return len;
-}
-
-#if 0
-/* uncompress one image into a buffer */
-static int mchip_uncompress_frame(u8 *img, int imgsize, u8 *buf, int bufsize)
-{
-	mchip_vrj_setup(0x3f);
-	udelay(50);
-
-	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_DECOMP);
-	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
-
-	mchip_delay(MCHIP_HIC_CMD, 0);
-
-	return mchip_comp_read_frame(buf, bufsize);
-}
-#endif
-
-/* start continuous compressed capture */
-static void mchip_cont_compression_start(void)
-{
-	mchip_hic_stop();
-	mchip_vrj_setup(0x3f);
-	mchip_subsample();
-	mchip_set_framerate();
-	mchip_dma_setup(meye.mchip_dmahandle);
-
-	meye.mchip_mode = MCHIP_HIC_MODE_CONT_COMP;
-
-	mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_CONT_COMP);
-	mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START);
-
-	mchip_delay(MCHIP_HIC_CMD, 0);
-}
-
-/****************************************************************************/
-/* Interrupt handling                                                       */
-/****************************************************************************/
-
-static irqreturn_t meye_irq(int irq, void *dev_id)
-{
-	u32 v;
-	int reqnr;
-	static int sequence;
-
-	v = mchip_read(MCHIP_MM_INTA);
-
-	if (meye.mchip_mode != MCHIP_HIC_MODE_CONT_OUT &&
-	    meye.mchip_mode != MCHIP_HIC_MODE_CONT_COMP)
-		return IRQ_NONE;
-
-again:
-	v = mchip_get_frame();
-	if (!(v & MCHIP_MM_FIR_RDY))
-		return IRQ_HANDLED;
-
-	if (meye.mchip_mode == MCHIP_HIC_MODE_CONT_OUT) {
-		if (kfifo_out_locked(&meye.grabq, (unsigned char *)&reqnr,
-			      sizeof(int), &meye.grabq_lock) != sizeof(int)) {
-			mchip_free_frame();
-			return IRQ_HANDLED;
-		}
-		mchip_cont_read_frame(v, meye.grab_fbuffer + gbufsize * reqnr,
-				      mchip_hsize() * mchip_vsize() * 2);
-		meye.grab_buffer[reqnr].size = mchip_hsize() * mchip_vsize() * 2;
-		meye.grab_buffer[reqnr].state = MEYE_BUF_DONE;
-		do_gettimeofday(&meye.grab_buffer[reqnr].timestamp);
-		meye.grab_buffer[reqnr].sequence = sequence++;
-		kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr,
-				sizeof(int), &meye.doneq_lock);
-		wake_up_interruptible(&meye.proc_list);
-	} else {
-		int size;
-		size = mchip_comp_read_frame(v, meye.grab_temp, gbufsize);
-		if (size == -1) {
-			mchip_free_frame();
-			goto again;
-		}
-		if (kfifo_out_locked(&meye.grabq, (unsigned char *)&reqnr,
-			      sizeof(int), &meye.grabq_lock) != sizeof(int)) {
-			mchip_free_frame();
-			goto again;
-		}
-		memcpy(meye.grab_fbuffer + gbufsize * reqnr, meye.grab_temp,
-		       size);
-		meye.grab_buffer[reqnr].size = size;
-		meye.grab_buffer[reqnr].state = MEYE_BUF_DONE;
-		do_gettimeofday(&meye.grab_buffer[reqnr].timestamp);
-		meye.grab_buffer[reqnr].sequence = sequence++;
-		kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr,
-				sizeof(int), &meye.doneq_lock);
-		wake_up_interruptible(&meye.proc_list);
-	}
-	mchip_free_frame();
-	goto again;
-}
-
-/****************************************************************************/
-/* video4linux integration                                                  */
-/****************************************************************************/
-
-static int meye_open(struct file *file)
-{
-	int i;
-
-	if (test_and_set_bit(0, &meye.in_use))
-		return -EBUSY;
-
-	mchip_hic_stop();
-
-	if (mchip_dma_alloc()) {
-		printk(KERN_ERR "meye: mchip framebuffer allocation failed\n");
-		clear_bit(0, &meye.in_use);
-		return -ENOBUFS;
-	}
-
-	for (i = 0; i < MEYE_MAX_BUFNBRS; i++)
-		meye.grab_buffer[i].state = MEYE_BUF_UNUSED;
-	kfifo_reset(&meye.grabq);
-	kfifo_reset(&meye.doneq);
-	return 0;
-}
-
-static int meye_release(struct file *file)
-{
-	mchip_hic_stop();
-	mchip_dma_free();
-	clear_bit(0, &meye.in_use);
-	return 0;
-}
-
-static int meyeioc_g_params(struct meye_params *p)
-{
-	*p = meye.params;
-	return 0;
-}
-
-static int meyeioc_s_params(struct meye_params *jp)
-{
-	if (jp->subsample > 1)
-		return -EINVAL;
-
-	if (jp->quality > 10)
-		return -EINVAL;
-
-	if (jp->sharpness > 63 || jp->agc > 63 || jp->picture > 63)
-		return -EINVAL;
-
-	if (jp->framerate > 31)
-		return -EINVAL;
-
-	mutex_lock(&meye.lock);
-
-	if (meye.params.subsample != jp->subsample ||
-	    meye.params.quality != jp->quality)
-		mchip_hic_stop();	/* need restart */
-
-	meye.params = *jp;
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS,
-			      meye.params.sharpness);
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC,
-			      meye.params.agc);
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE,
-			      meye.params.picture);
-	mutex_unlock(&meye.lock);
-
-	return 0;
-}
-
-static int meyeioc_qbuf_capt(int *nb)
-{
-	if (!meye.grab_fbuffer)
-		return -EINVAL;
-
-	if (*nb >= gbuffers)
-		return -EINVAL;
-
-	if (*nb < 0) {
-		/* stop capture */
-		mchip_hic_stop();
-		return 0;
-	}
-
-	if (meye.grab_buffer[*nb].state != MEYE_BUF_UNUSED)
-		return -EBUSY;
-
-	mutex_lock(&meye.lock);
-
-	if (meye.mchip_mode != MCHIP_HIC_MODE_CONT_COMP)
-		mchip_cont_compression_start();
-
-	meye.grab_buffer[*nb].state = MEYE_BUF_USING;
-	kfifo_in_locked(&meye.grabq, (unsigned char *)nb, sizeof(int),
-			 &meye.grabq_lock);
-	mutex_unlock(&meye.lock);
-
-	return 0;
-}
-
-static int meyeioc_sync(struct file *file, void *fh, int *i)
-{
-	int unused;
-
-	if (*i < 0 || *i >= gbuffers)
-		return -EINVAL;
-
-	mutex_lock(&meye.lock);
-	switch (meye.grab_buffer[*i].state) {
-
-	case MEYE_BUF_UNUSED:
-		mutex_unlock(&meye.lock);
-		return -EINVAL;
-	case MEYE_BUF_USING:
-		if (file->f_flags & O_NONBLOCK) {
-			mutex_unlock(&meye.lock);
-			return -EAGAIN;
-		}
-		if (wait_event_interruptible(meye.proc_list,
-			(meye.grab_buffer[*i].state != MEYE_BUF_USING))) {
-			mutex_unlock(&meye.lock);
-			return -EINTR;
-		}
-		/* fall through */
-	case MEYE_BUF_DONE:
-		meye.grab_buffer[*i].state = MEYE_BUF_UNUSED;
-		if (kfifo_out_locked(&meye.doneq, (unsigned char *)&unused,
-				sizeof(int), &meye.doneq_lock) != sizeof(int))
-					break;
-	}
-	*i = meye.grab_buffer[*i].size;
-	mutex_unlock(&meye.lock);
-	return 0;
-}
-
-static int meyeioc_stillcapt(void)
-{
-	if (!meye.grab_fbuffer)
-		return -EINVAL;
-
-	if (meye.grab_buffer[0].state != MEYE_BUF_UNUSED)
-		return -EBUSY;
-
-	mutex_lock(&meye.lock);
-	meye.grab_buffer[0].state = MEYE_BUF_USING;
-	mchip_take_picture();
-
-	mchip_get_picture(meye.grab_fbuffer,
-			mchip_hsize() * mchip_vsize() * 2);
-
-	meye.grab_buffer[0].state = MEYE_BUF_DONE;
-	mutex_unlock(&meye.lock);
-
-	return 0;
-}
-
-static int meyeioc_stilljcapt(int *len)
-{
-	if (!meye.grab_fbuffer)
-		return -EINVAL;
-
-	if (meye.grab_buffer[0].state != MEYE_BUF_UNUSED)
-		return -EBUSY;
-
-	mutex_lock(&meye.lock);
-	meye.grab_buffer[0].state = MEYE_BUF_USING;
-	*len = -1;
-
-	while (*len == -1) {
-		mchip_take_picture();
-		*len = mchip_compress_frame(meye.grab_fbuffer, gbufsize);
-	}
-
-	meye.grab_buffer[0].state = MEYE_BUF_DONE;
-	mutex_unlock(&meye.lock);
-	return 0;
-}
-
-static int vidioc_querycap(struct file *file, void *fh,
-				struct v4l2_capability *cap)
-{
-	strcpy(cap->driver, "meye");
-	strcpy(cap->card, "meye");
-	sprintf(cap->bus_info, "PCI:%s", pci_name(meye.mchip_dev));
-
-	cap->version = (MEYE_DRIVER_MAJORVERSION << 8) +
-		       MEYE_DRIVER_MINORVERSION;
-
-	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
-			    V4L2_CAP_STREAMING;
-
-	return 0;
-}
-
-static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
-{
-	if (i->index != 0)
-		return -EINVAL;
-
-	strcpy(i->name, "Camera");
-	i->type = V4L2_INPUT_TYPE_CAMERA;
-
-	return 0;
-}
-
-static int vidioc_g_input(struct file *file, void *fh, unsigned int *i)
-{
-	*i = 0;
-	return 0;
-}
-
-static int vidioc_s_input(struct file *file, void *fh, unsigned int i)
-{
-	if (i != 0)
-		return -EINVAL;
-
-	return 0;
-}
-
-static int vidioc_queryctrl(struct file *file, void *fh,
-				struct v4l2_queryctrl *c)
-{
-	switch (c->id) {
-
-	case V4L2_CID_BRIGHTNESS:
-		c->type = V4L2_CTRL_TYPE_INTEGER;
-		strcpy(c->name, "Brightness");
-		c->minimum = 0;
-		c->maximum = 63;
-		c->step = 1;
-		c->default_value = 32;
-		c->flags = 0;
-		break;
-	case V4L2_CID_HUE:
-		c->type = V4L2_CTRL_TYPE_INTEGER;
-		strcpy(c->name, "Hue");
-		c->minimum = 0;
-		c->maximum = 63;
-		c->step = 1;
-		c->default_value = 32;
-		c->flags = 0;
-		break;
-	case V4L2_CID_CONTRAST:
-		c->type = V4L2_CTRL_TYPE_INTEGER;
-		strcpy(c->name, "Contrast");
-		c->minimum = 0;
-		c->maximum = 63;
-		c->step = 1;
-		c->default_value = 32;
-		c->flags = 0;
-		break;
-	case V4L2_CID_SATURATION:
-		c->type = V4L2_CTRL_TYPE_INTEGER;
-		strcpy(c->name, "Saturation");
-		c->minimum = 0;
-		c->maximum = 63;
-		c->step = 1;
-		c->default_value = 32;
-		c->flags = 0;
-		break;
-	case V4L2_CID_AGC:
-		c->type = V4L2_CTRL_TYPE_INTEGER;
-		strcpy(c->name, "Agc");
-		c->minimum = 0;
-		c->maximum = 63;
-		c->step = 1;
-		c->default_value = 48;
-		c->flags = 0;
-		break;
-	case V4L2_CID_MEYE_SHARPNESS:
-	case V4L2_CID_SHARPNESS:
-		c->type = V4L2_CTRL_TYPE_INTEGER;
-		strcpy(c->name, "Sharpness");
-		c->minimum = 0;
-		c->maximum = 63;
-		c->step = 1;
-		c->default_value = 32;
-
-		/* Continue to report legacy private SHARPNESS ctrl but
-		 * say it is disabled in preference to ctrl in the spec
-		 */
-		c->flags = (c->id == V4L2_CID_SHARPNESS) ? 0 :
-						V4L2_CTRL_FLAG_DISABLED;
-		break;
-	case V4L2_CID_PICTURE:
-		c->type = V4L2_CTRL_TYPE_INTEGER;
-		strcpy(c->name, "Picture");
-		c->minimum = 0;
-		c->maximum = 63;
-		c->step = 1;
-		c->default_value = 0;
-		c->flags = 0;
-		break;
-	case V4L2_CID_JPEGQUAL:
-		c->type = V4L2_CTRL_TYPE_INTEGER;
-		strcpy(c->name, "JPEG quality");
-		c->minimum = 0;
-		c->maximum = 10;
-		c->step = 1;
-		c->default_value = 8;
-		c->flags = 0;
-		break;
-	case V4L2_CID_FRAMERATE:
-		c->type = V4L2_CTRL_TYPE_INTEGER;
-		strcpy(c->name, "Framerate");
-		c->minimum = 0;
-		c->maximum = 31;
-		c->step = 1;
-		c->default_value = 0;
-		c->flags = 0;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
-static int vidioc_s_ctrl(struct file *file, void *fh, struct v4l2_control *c)
-{
-	mutex_lock(&meye.lock);
-	switch (c->id) {
-	case V4L2_CID_BRIGHTNESS:
-		sony_pic_camera_command(
-			SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, c->value);
-		meye.brightness = c->value << 10;
-		break;
-	case V4L2_CID_HUE:
-		sony_pic_camera_command(
-			SONY_PIC_COMMAND_SETCAMERAHUE, c->value);
-		meye.hue = c->value << 10;
-		break;
-	case V4L2_CID_CONTRAST:
-		sony_pic_camera_command(
-			SONY_PIC_COMMAND_SETCAMERACONTRAST, c->value);
-		meye.contrast = c->value << 10;
-		break;
-	case V4L2_CID_SATURATION:
-		sony_pic_camera_command(
-			SONY_PIC_COMMAND_SETCAMERACOLOR, c->value);
-		meye.colour = c->value << 10;
-		break;
-	case V4L2_CID_AGC:
-		sony_pic_camera_command(
-			SONY_PIC_COMMAND_SETCAMERAAGC, c->value);
-		meye.params.agc = c->value;
-		break;
-	case V4L2_CID_SHARPNESS:
-	case V4L2_CID_MEYE_SHARPNESS:
-		sony_pic_camera_command(
-			SONY_PIC_COMMAND_SETCAMERASHARPNESS, c->value);
-		meye.params.sharpness = c->value;
-		break;
-	case V4L2_CID_PICTURE:
-		sony_pic_camera_command(
-			SONY_PIC_COMMAND_SETCAMERAPICTURE, c->value);
-		meye.params.picture = c->value;
-		break;
-	case V4L2_CID_JPEGQUAL:
-		meye.params.quality = c->value;
-		break;
-	case V4L2_CID_FRAMERATE:
-		meye.params.framerate = c->value;
-		break;
-	default:
-		mutex_unlock(&meye.lock);
-		return -EINVAL;
-	}
-	mutex_unlock(&meye.lock);
-
-	return 0;
-}
-
-static int vidioc_g_ctrl(struct file *file, void *fh, struct v4l2_control *c)
-{
-	mutex_lock(&meye.lock);
-	switch (c->id) {
-	case V4L2_CID_BRIGHTNESS:
-		c->value = meye.brightness >> 10;
-		break;
-	case V4L2_CID_HUE:
-		c->value = meye.hue >> 10;
-		break;
-	case V4L2_CID_CONTRAST:
-		c->value = meye.contrast >> 10;
-		break;
-	case V4L2_CID_SATURATION:
-		c->value = meye.colour >> 10;
-		break;
-	case V4L2_CID_AGC:
-		c->value = meye.params.agc;
-		break;
-	case V4L2_CID_SHARPNESS:
-	case V4L2_CID_MEYE_SHARPNESS:
-		c->value = meye.params.sharpness;
-		break;
-	case V4L2_CID_PICTURE:
-		c->value = meye.params.picture;
-		break;
-	case V4L2_CID_JPEGQUAL:
-		c->value = meye.params.quality;
-		break;
-	case V4L2_CID_FRAMERATE:
-		c->value = meye.params.framerate;
-		break;
-	default:
-		mutex_unlock(&meye.lock);
-		return -EINVAL;
-	}
-	mutex_unlock(&meye.lock);
-
-	return 0;
-}
-
-static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh,
-				struct v4l2_fmtdesc *f)
-{
-	if (f->index > 1)
-		return -EINVAL;
-
-	if (f->index == 0) {
-		/* standard YUV 422 capture */
-		f->flags = 0;
-		strcpy(f->description, "YUV422");
-		f->pixelformat = V4L2_PIX_FMT_YUYV;
-	} else {
-		/* compressed MJPEG capture */
-		f->flags = V4L2_FMT_FLAG_COMPRESSED;
-		strcpy(f->description, "MJPEG");
-		f->pixelformat = V4L2_PIX_FMT_MJPEG;
-	}
-
-	return 0;
-}
-
-static int vidioc_try_fmt_vid_cap(struct file *file, void *fh,
-				struct v4l2_format *f)
-{
-	if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_YUYV &&
-	    f->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG)
-		return -EINVAL;
-
-	if (f->fmt.pix.field != V4L2_FIELD_ANY &&
-	    f->fmt.pix.field != V4L2_FIELD_NONE)
-		return -EINVAL;
-
-	f->fmt.pix.field = V4L2_FIELD_NONE;
-
-	if (f->fmt.pix.width <= 320) {
-		f->fmt.pix.width = 320;
-		f->fmt.pix.height = 240;
-	} else {
-		f->fmt.pix.width = 640;
-		f->fmt.pix.height = 480;
-	}
-
-	f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
-	f->fmt.pix.sizeimage = f->fmt.pix.height *
-			       f->fmt.pix.bytesperline;
-	f->fmt.pix.colorspace = 0;
-	f->fmt.pix.priv = 0;
-
-	return 0;
-}
-
-static int vidioc_g_fmt_vid_cap(struct file *file, void *fh,
-				    struct v4l2_format *f)
-{
-	switch (meye.mchip_mode) {
-	case MCHIP_HIC_MODE_CONT_OUT:
-	default:
-		f->fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
-		break;
-	case MCHIP_HIC_MODE_CONT_COMP:
-		f->fmt.pix.pixelformat = V4L2_PIX_FMT_MJPEG;
-		break;
-	}
-
-	f->fmt.pix.field = V4L2_FIELD_NONE;
-	f->fmt.pix.width = mchip_hsize();
-	f->fmt.pix.height = mchip_vsize();
-	f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
-	f->fmt.pix.sizeimage = f->fmt.pix.height *
-			       f->fmt.pix.bytesperline;
-
-	return 0;
-}
-
-static int vidioc_s_fmt_vid_cap(struct file *file, void *fh,
-				    struct v4l2_format *f)
-{
-	if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_YUYV &&
-	    f->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG)
-		return -EINVAL;
-
-	if (f->fmt.pix.field != V4L2_FIELD_ANY &&
-	    f->fmt.pix.field != V4L2_FIELD_NONE)
-		return -EINVAL;
-
-	f->fmt.pix.field = V4L2_FIELD_NONE;
-	mutex_lock(&meye.lock);
-
-	if (f->fmt.pix.width <= 320) {
-		f->fmt.pix.width = 320;
-		f->fmt.pix.height = 240;
-		meye.params.subsample = 1;
-	} else {
-		f->fmt.pix.width = 640;
-		f->fmt.pix.height = 480;
-		meye.params.subsample = 0;
-	}
-
-	switch (f->fmt.pix.pixelformat) {
-	case V4L2_PIX_FMT_YUYV:
-		meye.mchip_mode = MCHIP_HIC_MODE_CONT_OUT;
-		break;
-	case V4L2_PIX_FMT_MJPEG:
-		meye.mchip_mode = MCHIP_HIC_MODE_CONT_COMP;
-		break;
-	}
-
-	mutex_unlock(&meye.lock);
-	f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
-	f->fmt.pix.sizeimage = f->fmt.pix.height *
-			       f->fmt.pix.bytesperline;
-	f->fmt.pix.colorspace = 0;
-	f->fmt.pix.priv = 0;
-
-	return 0;
-}
-
-static int vidioc_reqbufs(struct file *file, void *fh,
-				struct v4l2_requestbuffers *req)
-{
-	int i;
-
-	if (req->memory != V4L2_MEMORY_MMAP)
-		return -EINVAL;
-
-	if (meye.grab_fbuffer && req->count == gbuffers) {
-		/* already allocated, no modifications */
-		return 0;
-	}
-
-	mutex_lock(&meye.lock);
-	if (meye.grab_fbuffer) {
-		for (i = 0; i < gbuffers; i++)
-			if (meye.vma_use_count[i]) {
-				mutex_unlock(&meye.lock);
-				return -EINVAL;
-			}
-		rvfree(meye.grab_fbuffer, gbuffers * gbufsize);
-		meye.grab_fbuffer = NULL;
-	}
-
-	gbuffers = max(2, min((int)req->count, MEYE_MAX_BUFNBRS));
-	req->count = gbuffers;
-	meye.grab_fbuffer = rvmalloc(gbuffers * gbufsize);
-
-	if (!meye.grab_fbuffer) {
-		printk(KERN_ERR "meye: v4l framebuffer allocation"
-				" failed\n");
-		mutex_unlock(&meye.lock);
-		return -ENOMEM;
-	}
-
-	for (i = 0; i < gbuffers; i++)
-		meye.vma_use_count[i] = 0;
-
-	mutex_unlock(&meye.lock);
-
-	return 0;
-}
-
-static int vidioc_querybuf(struct file *file, void *fh, struct v4l2_buffer *buf)
-{
-	unsigned int index = buf->index;
-
-	if (index >= gbuffers)
-		return -EINVAL;
-
-	buf->bytesused = meye.grab_buffer[index].size;
-	buf->flags = V4L2_BUF_FLAG_MAPPED;
-
-	if (meye.grab_buffer[index].state == MEYE_BUF_USING)
-		buf->flags |= V4L2_BUF_FLAG_QUEUED;
-
-	if (meye.grab_buffer[index].state == MEYE_BUF_DONE)
-		buf->flags |= V4L2_BUF_FLAG_DONE;
-
-	buf->field = V4L2_FIELD_NONE;
-	buf->timestamp = meye.grab_buffer[index].timestamp;
-	buf->sequence = meye.grab_buffer[index].sequence;
-	buf->memory = V4L2_MEMORY_MMAP;
-	buf->m.offset = index * gbufsize;
-	buf->length = gbufsize;
-
-	return 0;
-}
-
-static int vidioc_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
-{
-	if (buf->memory != V4L2_MEMORY_MMAP)
-		return -EINVAL;
-
-	if (buf->index >= gbuffers)
-		return -EINVAL;
-
-	if (meye.grab_buffer[buf->index].state != MEYE_BUF_UNUSED)
-		return -EINVAL;
-
-	mutex_lock(&meye.lock);
-	buf->flags |= V4L2_BUF_FLAG_QUEUED;
-	buf->flags &= ~V4L2_BUF_FLAG_DONE;
-	meye.grab_buffer[buf->index].state = MEYE_BUF_USING;
-	kfifo_in_locked(&meye.grabq, (unsigned char *)&buf->index,
-			sizeof(int), &meye.grabq_lock);
-	mutex_unlock(&meye.lock);
-
-	return 0;
-}
-
-static int vidioc_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
-{
-	int reqnr;
-
-	if (buf->memory != V4L2_MEMORY_MMAP)
-		return -EINVAL;
-
-	mutex_lock(&meye.lock);
-
-	if (kfifo_len(&meye.doneq) == 0 && file->f_flags & O_NONBLOCK) {
-		mutex_unlock(&meye.lock);
-		return -EAGAIN;
-	}
-
-	if (wait_event_interruptible(meye.proc_list,
-				     kfifo_len(&meye.doneq) != 0) < 0) {
-		mutex_unlock(&meye.lock);
-		return -EINTR;
-	}
-
-	if (!kfifo_out_locked(&meye.doneq, (unsigned char *)&reqnr,
-		       sizeof(int), &meye.doneq_lock)) {
-		mutex_unlock(&meye.lock);
-		return -EBUSY;
-	}
-
-	if (meye.grab_buffer[reqnr].state != MEYE_BUF_DONE) {
-		mutex_unlock(&meye.lock);
-		return -EINVAL;
-	}
-
-	buf->index = reqnr;
-	buf->bytesused = meye.grab_buffer[reqnr].size;
-	buf->flags = V4L2_BUF_FLAG_MAPPED;
-	buf->field = V4L2_FIELD_NONE;
-	buf->timestamp = meye.grab_buffer[reqnr].timestamp;
-	buf->sequence = meye.grab_buffer[reqnr].sequence;
-	buf->memory = V4L2_MEMORY_MMAP;
-	buf->m.offset = reqnr * gbufsize;
-	buf->length = gbufsize;
-	meye.grab_buffer[reqnr].state = MEYE_BUF_UNUSED;
-	mutex_unlock(&meye.lock);
-
-	return 0;
-}
-
-static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
-{
-	mutex_lock(&meye.lock);
-
-	switch (meye.mchip_mode) {
-	case MCHIP_HIC_MODE_CONT_OUT:
-		mchip_continuous_start();
-		break;
-	case MCHIP_HIC_MODE_CONT_COMP:
-		mchip_cont_compression_start();
-		break;
-	default:
-		mutex_unlock(&meye.lock);
-		return -EINVAL;
-	}
-
-	mutex_unlock(&meye.lock);
-
-	return 0;
-}
-
-static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
-{
-	mutex_lock(&meye.lock);
-	mchip_hic_stop();
-	kfifo_reset(&meye.grabq);
-	kfifo_reset(&meye.doneq);
-
-	for (i = 0; i < MEYE_MAX_BUFNBRS; i++)
-		meye.grab_buffer[i].state = MEYE_BUF_UNUSED;
-
-	mutex_unlock(&meye.lock);
-	return 0;
-}
-
-static long vidioc_default(struct file *file, void *fh, bool valid_prio,
-						int cmd, void *arg)
-{
-	switch (cmd) {
-	case MEYEIOC_G_PARAMS:
-		return meyeioc_g_params((struct meye_params *) arg);
-
-	case MEYEIOC_S_PARAMS:
-		return meyeioc_s_params((struct meye_params *) arg);
-
-	case MEYEIOC_QBUF_CAPT:
-		return meyeioc_qbuf_capt((int *) arg);
-
-	case MEYEIOC_SYNC:
-		return meyeioc_sync(file, fh, (int *) arg);
-
-	case MEYEIOC_STILLCAPT:
-		return meyeioc_stillcapt();
-
-	case MEYEIOC_STILLJCAPT:
-		return meyeioc_stilljcapt((int *) arg);
-
-	default:
-		return -ENOTTY;
-	}
-
-}
-
-static unsigned int meye_poll(struct file *file, poll_table *wait)
-{
-	unsigned int res = 0;
-
-	mutex_lock(&meye.lock);
-	poll_wait(file, &meye.proc_list, wait);
-	if (kfifo_len(&meye.doneq))
-		res = POLLIN | POLLRDNORM;
-	mutex_unlock(&meye.lock);
-	return res;
-}
-
-static void meye_vm_open(struct vm_area_struct *vma)
-{
-	long idx = (long)vma->vm_private_data;
-	meye.vma_use_count[idx]++;
-}
-
-static void meye_vm_close(struct vm_area_struct *vma)
-{
-	long idx = (long)vma->vm_private_data;
-	meye.vma_use_count[idx]--;
-}
-
-static const struct vm_operations_struct meye_vm_ops = {
-	.open		= meye_vm_open,
-	.close		= meye_vm_close,
-};
-
-static int meye_mmap(struct file *file, struct vm_area_struct *vma)
-{
-	unsigned long start = vma->vm_start;
-	unsigned long size = vma->vm_end - vma->vm_start;
-	unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
-	unsigned long page, pos;
-
-	mutex_lock(&meye.lock);
-	if (size > gbuffers * gbufsize) {
-		mutex_unlock(&meye.lock);
-		return -EINVAL;
-	}
-	if (!meye.grab_fbuffer) {
-		int i;
-
-		/* lazy allocation */
-		meye.grab_fbuffer = rvmalloc(gbuffers*gbufsize);
-		if (!meye.grab_fbuffer) {
-			printk(KERN_ERR "meye: v4l framebuffer allocation failed\n");
-			mutex_unlock(&meye.lock);
-			return -ENOMEM;
-		}
-		for (i = 0; i < gbuffers; i++)
-			meye.vma_use_count[i] = 0;
-	}
-	pos = (unsigned long)meye.grab_fbuffer + offset;
-
-	while (size > 0) {
-		page = vmalloc_to_pfn((void *)pos);
-		if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {
-			mutex_unlock(&meye.lock);
-			return -EAGAIN;
-		}
-		start += PAGE_SIZE;
-		pos += PAGE_SIZE;
-		if (size > PAGE_SIZE)
-			size -= PAGE_SIZE;
-		else
-			size = 0;
-	}
-
-	vma->vm_ops = &meye_vm_ops;
-	vma->vm_flags &= ~VM_IO;	/* not I/O memory */
-	vma->vm_flags |= VM_RESERVED;	/* avoid to swap out this VMA */
-	vma->vm_private_data = (void *) (offset / gbufsize);
-	meye_vm_open(vma);
-
-	mutex_unlock(&meye.lock);
-	return 0;
-}
-
-static const struct v4l2_file_operations meye_fops = {
-	.owner		= THIS_MODULE,
-	.open		= meye_open,
-	.release	= meye_release,
-	.mmap		= meye_mmap,
-	.unlocked_ioctl	= video_ioctl2,
-	.poll		= meye_poll,
-};
-
-static const struct v4l2_ioctl_ops meye_ioctl_ops = {
-	.vidioc_querycap	= vidioc_querycap,
-	.vidioc_enum_input	= vidioc_enum_input,
-	.vidioc_g_input		= vidioc_g_input,
-	.vidioc_s_input		= vidioc_s_input,
-	.vidioc_queryctrl	= vidioc_queryctrl,
-	.vidioc_s_ctrl		= vidioc_s_ctrl,
-	.vidioc_g_ctrl		= vidioc_g_ctrl,
-	.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
-	.vidioc_try_fmt_vid_cap	= vidioc_try_fmt_vid_cap,
-	.vidioc_g_fmt_vid_cap	= vidioc_g_fmt_vid_cap,
-	.vidioc_s_fmt_vid_cap	= vidioc_s_fmt_vid_cap,
-	.vidioc_reqbufs		= vidioc_reqbufs,
-	.vidioc_querybuf	= vidioc_querybuf,
-	.vidioc_qbuf		= vidioc_qbuf,
-	.vidioc_dqbuf		= vidioc_dqbuf,
-	.vidioc_streamon	= vidioc_streamon,
-	.vidioc_streamoff	= vidioc_streamoff,
-	.vidioc_default		= vidioc_default,
-};
-
-static struct video_device meye_template = {
-	.name		= "meye",
-	.fops		= &meye_fops,
-	.ioctl_ops 	= &meye_ioctl_ops,
-	.release	= video_device_release,
-};
-
-#ifdef CONFIG_PM
-static int meye_suspend(struct pci_dev *pdev, pm_message_t state)
-{
-	pci_save_state(pdev);
-	meye.pm_mchip_mode = meye.mchip_mode;
-	mchip_hic_stop();
-	mchip_set(MCHIP_MM_INTA, 0x0);
-	return 0;
-}
-
-static int meye_resume(struct pci_dev *pdev)
-{
-	pci_restore_state(pdev);
-	pci_write_config_word(meye.mchip_dev, MCHIP_PCI_SOFTRESET_SET, 1);
-
-	mchip_delay(MCHIP_HIC_CMD, 0);
-	mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE);
-	msleep(1);
-	mchip_set(MCHIP_VRJ_SOFT_RESET, 1);
-	msleep(1);
-	mchip_set(MCHIP_MM_PCI_MODE, 5);
-	msleep(1);
-	mchip_set(MCHIP_MM_INTA, MCHIP_MM_INTA_HIC_1_MASK);
-
-	switch (meye.pm_mchip_mode) {
-	case MCHIP_HIC_MODE_CONT_OUT:
-		mchip_continuous_start();
-		break;
-	case MCHIP_HIC_MODE_CONT_COMP:
-		mchip_cont_compression_start();
-		break;
-	}
-	return 0;
-}
-#endif
-
-static int __devinit meye_probe(struct pci_dev *pcidev,
-				const struct pci_device_id *ent)
-{
-	struct v4l2_device *v4l2_dev = &meye.v4l2_dev;
-	int ret = -EBUSY;
-	unsigned long mchip_adr;
-
-	if (meye.mchip_dev != NULL) {
-		printk(KERN_ERR "meye: only one device allowed!\n");
-		goto outnotdev;
-	}
-
-	ret = v4l2_device_register(&pcidev->dev, v4l2_dev);
-	if (ret < 0) {
-		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
-		return ret;
-	}
-	ret = -ENOMEM;
-	meye.mchip_dev = pcidev;
-	meye.vdev = video_device_alloc();
-	if (!meye.vdev) {
-		v4l2_err(v4l2_dev, "video_device_alloc() failed!\n");
-		goto outnotdev;
-	}
-
-	meye.grab_temp = vmalloc(MCHIP_NB_PAGES_MJPEG * PAGE_SIZE);
-	if (!meye.grab_temp) {
-		v4l2_err(v4l2_dev, "grab buffer allocation failed\n");
-		goto outvmalloc;
-	}
-
-	spin_lock_init(&meye.grabq_lock);
-	if (kfifo_alloc(&meye.grabq, sizeof(int) * MEYE_MAX_BUFNBRS,
-				GFP_KERNEL)) {
-		v4l2_err(v4l2_dev, "fifo allocation failed\n");
-		goto outkfifoalloc1;
-	}
-	spin_lock_init(&meye.doneq_lock);
-	if (kfifo_alloc(&meye.doneq, sizeof(int) * MEYE_MAX_BUFNBRS,
-				GFP_KERNEL)) {
-		v4l2_err(v4l2_dev, "fifo allocation failed\n");
-		goto outkfifoalloc2;
-	}
-
-	memcpy(meye.vdev, &meye_template, sizeof(meye_template));
-	meye.vdev->v4l2_dev = &meye.v4l2_dev;
-
-	ret = -EIO;
-	if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
-		v4l2_err(v4l2_dev, "meye: unable to power on the camera\n");
-		v4l2_err(v4l2_dev, "meye: did you enable the camera in "
-				"sonypi using the module options ?\n");
-		goto outsonypienable;
-	}
-
-	if ((ret = pci_enable_device(meye.mchip_dev))) {
-		v4l2_err(v4l2_dev, "meye: pci_enable_device failed\n");
-		goto outenabledev;
-	}
-
-	mchip_adr = pci_resource_start(meye.mchip_dev,0);
-	if (!mchip_adr) {
-		v4l2_err(v4l2_dev, "meye: mchip has no device base address\n");
-		goto outregions;
-	}
-	if (!request_mem_region(pci_resource_start(meye.mchip_dev, 0),
-				pci_resource_len(meye.mchip_dev, 0),
-				"meye")) {
-		v4l2_err(v4l2_dev, "meye: request_mem_region failed\n");
-		goto outregions;
-	}
-	meye.mchip_mmregs = ioremap(mchip_adr, MCHIP_MM_REGS);
-	if (!meye.mchip_mmregs) {
-		v4l2_err(v4l2_dev, "meye: ioremap failed\n");
-		goto outremap;
-	}
-
-	meye.mchip_irq = pcidev->irq;
-	if (request_irq(meye.mchip_irq, meye_irq,
-			IRQF_DISABLED | IRQF_SHARED, "meye", meye_irq)) {
-		v4l2_err(v4l2_dev, "request_irq failed\n");
-		goto outreqirq;
-	}
-
-	pci_write_config_byte(meye.mchip_dev, PCI_CACHE_LINE_SIZE, 8);
-	pci_write_config_byte(meye.mchip_dev, PCI_LATENCY_TIMER, 64);
-
-	pci_set_master(meye.mchip_dev);
-
-	/* Ask the camera to perform a soft reset. */
-	pci_write_config_word(meye.mchip_dev, MCHIP_PCI_SOFTRESET_SET, 1);
-
-	mchip_delay(MCHIP_HIC_CMD, 0);
-	mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE);
-
-	msleep(1);
-	mchip_set(MCHIP_VRJ_SOFT_RESET, 1);
-
-	msleep(1);
-	mchip_set(MCHIP_MM_PCI_MODE, 5);
-
-	msleep(1);
-	mchip_set(MCHIP_MM_INTA, MCHIP_MM_INTA_HIC_1_MASK);
-
-	mutex_init(&meye.lock);
-	init_waitqueue_head(&meye.proc_list);
-	meye.brightness = 32 << 10;
-	meye.hue = 32 << 10;
-	meye.colour = 32 << 10;
-	meye.contrast = 32 << 10;
-	meye.params.subsample = 0;
-	meye.params.quality = 8;
-	meye.params.sharpness = 32;
-	meye.params.agc = 48;
-	meye.params.picture = 0;
-	meye.params.framerate = 0;
-
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, 32);
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE, 32);
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR, 32);
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST, 32);
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS, 32);
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE, 0);
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC, 48);
-
-	if (video_register_device(meye.vdev, VFL_TYPE_GRABBER,
-				  video_nr) < 0) {
-		v4l2_err(v4l2_dev, "video_register_device failed\n");
-		goto outvideoreg;
-	}
-
-	v4l2_info(v4l2_dev, "Motion Eye Camera Driver v%s.\n",
-	       MEYE_DRIVER_VERSION);
-	v4l2_info(v4l2_dev, "mchip KL5A72002 rev. %d, base %lx, irq %d\n",
-	       meye.mchip_dev->revision, mchip_adr, meye.mchip_irq);
-
-	return 0;
-
-outvideoreg:
-	free_irq(meye.mchip_irq, meye_irq);
-outreqirq:
-	iounmap(meye.mchip_mmregs);
-outremap:
-	release_mem_region(pci_resource_start(meye.mchip_dev, 0),
-			   pci_resource_len(meye.mchip_dev, 0));
-outregions:
-	pci_disable_device(meye.mchip_dev);
-outenabledev:
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
-outsonypienable:
-	kfifo_free(&meye.doneq);
-outkfifoalloc2:
-	kfifo_free(&meye.grabq);
-outkfifoalloc1:
-	vfree(meye.grab_temp);
-outvmalloc:
-	video_device_release(meye.vdev);
-outnotdev:
-	return ret;
-}
-
-static void __devexit meye_remove(struct pci_dev *pcidev)
-{
-	video_unregister_device(meye.vdev);
-
-	mchip_hic_stop();
-
-	mchip_dma_free();
-
-	/* disable interrupts */
-	mchip_set(MCHIP_MM_INTA, 0x0);
-
-	free_irq(meye.mchip_irq, meye_irq);
-
-	iounmap(meye.mchip_mmregs);
-
-	release_mem_region(pci_resource_start(meye.mchip_dev, 0),
-			   pci_resource_len(meye.mchip_dev, 0));
-
-	pci_disable_device(meye.mchip_dev);
-
-	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
-
-	kfifo_free(&meye.doneq);
-	kfifo_free(&meye.grabq);
-
-	vfree(meye.grab_temp);
-
-	if (meye.grab_fbuffer) {
-		rvfree(meye.grab_fbuffer, gbuffers*gbufsize);
-		meye.grab_fbuffer = NULL;
-	}
-
-	printk(KERN_INFO "meye: removed\n");
-}
-
-static struct pci_device_id meye_pci_tbl[] = {
-	{ PCI_VDEVICE(KAWASAKI, PCI_DEVICE_ID_MCHIP_KL5A72002), 0 },
-	{ }
-};
-
-MODULE_DEVICE_TABLE(pci, meye_pci_tbl);
-
-static struct pci_driver meye_driver = {
-	.name		= "meye",
-	.id_table	= meye_pci_tbl,
-	.probe		= meye_probe,
-	.remove		= __devexit_p(meye_remove),
-#ifdef CONFIG_PM
-	.suspend	= meye_suspend,
-	.resume		= meye_resume,
-#endif
-};
-
-static int __init meye_init(void)
-{
-	gbuffers = max(2, min((int)gbuffers, MEYE_MAX_BUFNBRS));
-	if (gbufsize < 0 || gbufsize > MEYE_MAX_BUFSIZE)
-		gbufsize = MEYE_MAX_BUFSIZE;
-	gbufsize = PAGE_ALIGN(gbufsize);
-	printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) "
-			 "for capture\n",
-			 gbuffers,
-			 gbufsize / 1024, gbuffers * gbufsize / 1024);
-	return pci_register_driver(&meye_driver);
-}
-
-static void __exit meye_exit(void)
-{
-	pci_unregister_driver(&meye_driver);
-}
-
-module_init(meye_init);
-module_exit(meye_exit);
diff --git a/drivers/media/video/meye.h b/drivers/media/video/meye.h
deleted file mode 100644
index 4bdeb03..0000000
--- a/drivers/media/video/meye.h
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Motion Eye video4linux driver for Sony Vaio PictureBook
- *
- * Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net>
- *
- * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
- *
- * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com>
- *
- * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras.
- *
- * Some parts borrowed from various video4linux drivers, especially
- * bttv-driver.c and zoran.c, see original files for credits.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _MEYE_PRIV_H_
-#define _MEYE_PRIV_H_
-
-#define MEYE_DRIVER_MAJORVERSION	 1
-#define MEYE_DRIVER_MINORVERSION	14
-
-#define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \
-			    __stringify(MEYE_DRIVER_MINORVERSION)
-
-#include <linux/types.h>
-#include <linux/pci.h>
-#include <linux/kfifo.h>
-
-/****************************************************************************/
-/* Motion JPEG chip registers                                               */
-/****************************************************************************/
-
-/* Motion JPEG chip PCI configuration registers */
-#define MCHIP_PCI_POWER_CSR		0x54
-#define MCHIP_PCI_MCORE_STATUS		0x60		/* see HIC_STATUS   */
-#define MCHIP_PCI_HOSTUSEREQ_SET	0x64
-#define MCHIP_PCI_HOSTUSEREQ_CLR	0x68
-#define MCHIP_PCI_LOWPOWER_SET		0x6c
-#define MCHIP_PCI_LOWPOWER_CLR		0x70
-#define MCHIP_PCI_SOFTRESET_SET		0x74
-
-/* Motion JPEG chip memory mapped registers */
-#define MCHIP_MM_REGS			0x200		/* 512 bytes        */
-#define MCHIP_REG_TIMEOUT		1000		/* reg access, ~us  */
-#define MCHIP_MCC_VRJ_TIMEOUT		1000		/* MCC & VRJ access */
-
-#define MCHIP_MM_PCI_MODE		0x00		/* PCI access mode */
-#define MCHIP_MM_PCI_MODE_RETRY		0x00000001	/* retry mode */
-#define MCHIP_MM_PCI_MODE_MASTER	0x00000002	/* master access */
-#define MCHIP_MM_PCI_MODE_READ_LINE	0x00000004	/* read line */
-
-#define MCHIP_MM_INTA			0x04		/* Int status/mask */
-#define MCHIP_MM_INTA_MCC		0x00000001	/* MCC interrupt */
-#define MCHIP_MM_INTA_VRJ		0x00000002	/* VRJ interrupt */
-#define MCHIP_MM_INTA_HIC_1		0x00000004	/* one frame done */
-#define MCHIP_MM_INTA_HIC_1_MASK	0x00000400	/* 1: enable */
-#define MCHIP_MM_INTA_HIC_END		0x00000008	/* all frames done */
-#define MCHIP_MM_INTA_HIC_END_MASK	0x00000800
-#define MCHIP_MM_INTA_JPEG		0x00000010	/* decompress. error */
-#define MCHIP_MM_INTA_JPEG_MASK		0x00001000
-#define MCHIP_MM_INTA_CAPTURE		0x00000020	/* capture end */
-#define MCHIP_MM_INTA_PCI_ERR		0x00000040	/* PCI error */
-#define MCHIP_MM_INTA_PCI_ERR_MASK	0x00004000
-
-#define MCHIP_MM_PT_ADDR		0x08		/* page table address*/
-							/* n*4kB */
-#define MCHIP_NB_PAGES			1024		/* pages for display */
-#define MCHIP_NB_PAGES_MJPEG		256		/* pages for mjpeg */
-
-#define MCHIP_MM_FIR(n)			(0x0c+(n)*4)	/* Frame info 0-3 */
-#define MCHIP_MM_FIR_RDY		0x00000001	/* frame ready */
-#define MCHIP_MM_FIR_FAILFR_MASK	0xf8000000	/* # of failed frames */
-#define MCHIP_MM_FIR_FAILFR_SHIFT	27
-
-	/* continuous comp/decomp mode */
-#define MCHIP_MM_FIR_C_ENDL_MASK	0x000007fe	/* end DW [10] */
-#define MCHIP_MM_FIR_C_ENDL_SHIFT	1
-#define MCHIP_MM_FIR_C_ENDP_MASK	0x0007f800	/* end page [8] */
-#define MCHIP_MM_FIR_C_ENDP_SHIFT	11
-#define MCHIP_MM_FIR_C_STARTP_MASK	0x07f80000	/* start page [8] */
-#define MCHIP_MM_FIR_C_STARTP_SHIFT	19
-
-	/* continuous picture output mode */
-#define MCHIP_MM_FIR_O_STARTP_MASK	0x7ffe0000	/* start page [10] */
-#define MCHIP_MM_FIR_O_STARTP_SHIFT	17
-
-#define MCHIP_MM_FIFO_DATA		0x1c		/* PCI TGT FIFO data */
-#define MCHIP_MM_FIFO_STATUS		0x20		/* PCI TGT FIFO stat */
-#define MCHIP_MM_FIFO_MASK		0x00000003
-#define MCHIP_MM_FIFO_WAIT_OR_READY	0x00000002      /* Bits common to WAIT & READY*/
-#define MCHIP_MM_FIFO_IDLE		0x0		/* HIC idle */
-#define MCHIP_MM_FIFO_IDLE1		0x1		/* idem ??? */
-#define	MCHIP_MM_FIFO_WAIT		0x2		/* wait request */
-#define MCHIP_MM_FIFO_READY		0x3		/* data ready */
-
-#define MCHIP_HIC_HOST_USEREQ		0x40		/* host uses MCORE */
-
-#define MCHIP_HIC_TP_BUSY		0x44		/* taking picture */
-
-#define MCHIP_HIC_PIC_SAVED		0x48		/* pic in SDRAM */
-
-#define MCHIP_HIC_LOWPOWER		0x4c		/* clock stopped */
-
-#define MCHIP_HIC_CTL			0x50		/* HIC control */
-#define MCHIP_HIC_CTL_SOFT_RESET	0x00000001	/* MCORE reset */
-#define MCHIP_HIC_CTL_MCORE_RDY		0x00000002	/* MCORE ready */
-
-#define MCHIP_HIC_CMD			0x54		/* HIC command */
-#define MCHIP_HIC_CMD_BITS		0x00000003      /* cmd width=[1:0]*/
-#define MCHIP_HIC_CMD_NOOP		0x0
-#define MCHIP_HIC_CMD_START		0x1
-#define MCHIP_HIC_CMD_STOP		0x2
-
-#define MCHIP_HIC_MODE			0x58
-#define MCHIP_HIC_MODE_NOOP		0x0
-#define MCHIP_HIC_MODE_STILL_CAP	0x1		/* still pic capt */
-#define MCHIP_HIC_MODE_DISPLAY		0x2		/* display */
-#define MCHIP_HIC_MODE_STILL_COMP	0x3		/* still pic comp. */
-#define MCHIP_HIC_MODE_STILL_DECOMP	0x4		/* still pic decomp. */
-#define MCHIP_HIC_MODE_CONT_COMP	0x5		/* cont capt+comp */
-#define MCHIP_HIC_MODE_CONT_DECOMP	0x6		/* cont decomp+disp */
-#define MCHIP_HIC_MODE_STILL_OUT	0x7		/* still pic output */
-#define MCHIP_HIC_MODE_CONT_OUT		0x8		/* cont output */
-
-#define MCHIP_HIC_STATUS		0x5c
-#define MCHIP_HIC_STATUS_MCC_RDY	0x00000001	/* MCC reg acc ok */
-#define MCHIP_HIC_STATUS_VRJ_RDY	0x00000002	/* VRJ reg acc ok */
-#define MCHIP_HIC_STATUS_IDLE           0x00000003
-#define MCHIP_HIC_STATUS_CAPDIS		0x00000004	/* cap/disp in prog */
-#define MCHIP_HIC_STATUS_COMPDEC	0x00000008	/* (de)comp in prog */
-#define MCHIP_HIC_STATUS_BUSY		0x00000010	/* HIC busy */
-
-#define MCHIP_HIC_S_RATE		0x60		/* MJPEG # frames */
-
-#define MCHIP_HIC_PCI_VFMT		0x64		/* video format */
-#define MCHIP_HIC_PCI_VFMT_YVYU		0x00000001	/* 0: V Y' U Y */
-							/* 1: Y' V Y U */
-
-#define MCHIP_MCC_CMD			0x80		/* MCC commands */
-#define MCHIP_MCC_CMD_INITIAL		0x0		/* idle ? */
-#define MCHIP_MCC_CMD_IIC_START_SET	0x1
-#define MCHIP_MCC_CMD_IIC_END_SET	0x2
-#define MCHIP_MCC_CMD_FM_WRITE		0x3		/* frame memory */
-#define MCHIP_MCC_CMD_FM_READ		0x4
-#define MCHIP_MCC_CMD_FM_STOP		0x5
-#define MCHIP_MCC_CMD_CAPTURE		0x6
-#define MCHIP_MCC_CMD_DISPLAY		0x7
-#define MCHIP_MCC_CMD_END_DISP		0x8
-#define MCHIP_MCC_CMD_STILL_COMP	0x9
-#define MCHIP_MCC_CMD_STILL_DECOMP	0xa
-#define MCHIP_MCC_CMD_STILL_OUTPUT	0xb
-#define MCHIP_MCC_CMD_CONT_OUTPUT	0xc
-#define MCHIP_MCC_CMD_CONT_COMP		0xd
-#define MCHIP_MCC_CMD_CONT_DECOMP	0xe
-#define MCHIP_MCC_CMD_RESET		0xf		/* MCC reset */
-
-#define MCHIP_MCC_IIC_WR		0x84
-
-#define MCHIP_MCC_MCC_WR		0x88
-
-#define MCHIP_MCC_MCC_RD		0x8c
-
-#define MCHIP_MCC_STATUS		0x90
-#define MCHIP_MCC_STATUS_CAPT		0x00000001	/* capturing */
-#define MCHIP_MCC_STATUS_DISP		0x00000002	/* displaying */
-#define MCHIP_MCC_STATUS_COMP		0x00000004	/* compressing */
-#define MCHIP_MCC_STATUS_DECOMP		0x00000008	/* decompressing */
-#define MCHIP_MCC_STATUS_MCC_WR		0x00000010	/* register ready */
-#define MCHIP_MCC_STATUS_MCC_RD		0x00000020	/* register ready */
-#define MCHIP_MCC_STATUS_IIC_WR		0x00000040	/* register ready */
-#define MCHIP_MCC_STATUS_OUTPUT		0x00000080	/* output in prog */
-
-#define MCHIP_MCC_SIG_POLARITY		0x94
-#define MCHIP_MCC_SIG_POL_VS_H		0x00000001	/* VS active-high */
-#define MCHIP_MCC_SIG_POL_HS_H		0x00000002	/* HS active-high */
-#define MCHIP_MCC_SIG_POL_DOE_H		0x00000004	/* DOE active-high */
-
-#define MCHIP_MCC_IRQ			0x98
-#define MCHIP_MCC_IRQ_CAPDIS_STRT	0x00000001	/* cap/disp started */
-#define MCHIP_MCC_IRQ_CAPDIS_STRT_MASK	0x00000010
-#define MCHIP_MCC_IRQ_CAPDIS_END	0x00000002	/* cap/disp ended */
-#define MCHIP_MCC_IRQ_CAPDIS_END_MASK	0x00000020
-#define MCHIP_MCC_IRQ_COMPDEC_STRT	0x00000004	/* (de)comp started */
-#define MCHIP_MCC_IRQ_COMPDEC_STRT_MASK	0x00000040
-#define MCHIP_MCC_IRQ_COMPDEC_END	0x00000008	/* (de)comp ended */
-#define MCHIP_MCC_IRQ_COMPDEC_END_MASK	0x00000080
-
-#define MCHIP_MCC_HSTART		0x9c		/* video in */
-#define MCHIP_MCC_VSTART		0xa0
-#define MCHIP_MCC_HCOUNT		0xa4
-#define MCHIP_MCC_VCOUNT		0xa8
-#define MCHIP_MCC_R_XBASE		0xac		/* capt/disp */
-#define MCHIP_MCC_R_YBASE		0xb0
-#define MCHIP_MCC_R_XRANGE		0xb4
-#define MCHIP_MCC_R_YRANGE		0xb8
-#define MCHIP_MCC_B_XBASE		0xbc		/* comp/decomp */
-#define MCHIP_MCC_B_YBASE		0xc0
-#define MCHIP_MCC_B_XRANGE		0xc4
-#define MCHIP_MCC_B_YRANGE		0xc8
-
-#define MCHIP_MCC_R_SAMPLING		0xcc		/* 1: 1:4 */
-
-#define MCHIP_VRJ_CMD			0x100		/* VRJ commands */
-
-/* VRJ registers (see table 12.2.4) */
-#define MCHIP_VRJ_COMPRESSED_DATA	0x1b0
-#define MCHIP_VRJ_PIXEL_DATA		0x1b8
-
-#define MCHIP_VRJ_BUS_MODE		0x100
-#define MCHIP_VRJ_SIGNAL_ACTIVE_LEVEL	0x108
-#define MCHIP_VRJ_PDAT_USE		0x110
-#define MCHIP_VRJ_MODE_SPECIFY		0x118
-#define MCHIP_VRJ_LIMIT_COMPRESSED_LO	0x120
-#define MCHIP_VRJ_LIMIT_COMPRESSED_HI	0x124
-#define MCHIP_VRJ_COMP_DATA_FORMAT	0x128
-#define MCHIP_VRJ_TABLE_DATA		0x140
-#define MCHIP_VRJ_RESTART_INTERVAL	0x148
-#define MCHIP_VRJ_NUM_LINES		0x150
-#define MCHIP_VRJ_NUM_PIXELS		0x158
-#define MCHIP_VRJ_NUM_COMPONENTS	0x160
-#define MCHIP_VRJ_SOF1			0x168
-#define MCHIP_VRJ_SOF2			0x170
-#define MCHIP_VRJ_SOF3			0x178
-#define MCHIP_VRJ_SOF4			0x180
-#define MCHIP_VRJ_SOS			0x188
-#define MCHIP_VRJ_SOFT_RESET		0x190
-
-#define MCHIP_VRJ_STATUS		0x1c0
-#define MCHIP_VRJ_STATUS_BUSY		0x00001
-#define MCHIP_VRJ_STATUS_COMP_ACCESS	0x00002
-#define MCHIP_VRJ_STATUS_PIXEL_ACCESS	0x00004
-#define MCHIP_VRJ_STATUS_ERROR		0x00008
-
-#define MCHIP_VRJ_IRQ_FLAG		0x1c8
-#define MCHIP_VRJ_ERROR_REPORT		0x1d8
-
-#define MCHIP_VRJ_START_COMMAND		0x1a0
-
-/****************************************************************************/
-/* Driver definitions.                                                      */
-/****************************************************************************/
-
-/* Sony Programmable I/O Controller for accessing the camera commands */
-#include <linux/sony-laptop.h>
-
-/* private API definitions */
-#include <linux/meye.h>
-#include <linux/mutex.h>
-
-
-/* Enable jpg software correction */
-#define MEYE_JPEG_CORRECTION	1
-
-/* Maximum size of a buffer */
-#define MEYE_MAX_BUFSIZE	614400	/* 640 * 480 * 2 */
-
-/* Maximum number of buffers */
-#define MEYE_MAX_BUFNBRS	32
-
-/* State of a buffer */
-#define MEYE_BUF_UNUSED	0	/* not used */
-#define MEYE_BUF_USING	1	/* currently grabbing / playing */
-#define MEYE_BUF_DONE	2	/* done */
-
-/* grab buffer */
-struct meye_grab_buffer {
-	int state;			/* state of buffer */
-	unsigned long size;		/* size of jpg frame */
-	struct timeval timestamp;	/* timestamp */
-	unsigned long sequence;		/* sequence number */
-};
-
-/* size of kfifos containings buffer indices */
-#define MEYE_QUEUE_SIZE	MEYE_MAX_BUFNBRS
-
-/* Motion Eye device structure */
-struct meye {
-	struct v4l2_device v4l2_dev;	/* Main v4l2_device struct */
-	struct pci_dev *mchip_dev;	/* pci device */
-	u8 mchip_irq;			/* irq */
-	u8 mchip_mode;			/* actual mchip mode: HIC_MODE... */
-	u8 mchip_fnum;			/* current mchip frame number */
-	unsigned char __iomem *mchip_mmregs;/* mchip: memory mapped registers */
-	u8 *mchip_ptable[MCHIP_NB_PAGES];/* mchip: ptable */
-	void *mchip_ptable_toc;		/* mchip: ptable toc */
-	dma_addr_t mchip_dmahandle;	/* mchip: dma handle to ptable toc */
-	unsigned char *grab_fbuffer;	/* capture framebuffer */
-	unsigned char *grab_temp;	/* temporary buffer */
-					/* list of buffers */
-	struct meye_grab_buffer grab_buffer[MEYE_MAX_BUFNBRS];
-	int vma_use_count[MEYE_MAX_BUFNBRS]; /* mmap count */
-	struct mutex lock;		/* mutex for open/mmap... */
-	struct kfifo grabq;		/* queue for buffers to be grabbed */
-	spinlock_t grabq_lock;		/* lock protecting the queue */
-	struct kfifo doneq;		/* queue for grabbed buffers */
-	spinlock_t doneq_lock;		/* lock protecting the queue */
-	wait_queue_head_t proc_list;	/* wait queue */
-	struct video_device *vdev;	/* video device parameters */
-	u16 brightness;
-	u16 hue;
-	u16 contrast;
-	u16 colour;
-	struct meye_params params;	/* additional parameters */
-	unsigned long in_use;		/* set to 1 if the device is in use */
-#ifdef CONFIG_PM
-	u8 pm_mchip_mode;		/* old mchip mode */
-#endif
-};
-
-#endif
diff --git a/drivers/media/video/sta2x11_vip.c b/drivers/media/video/sta2x11_vip.c
deleted file mode 100644
index 4c10205..0000000
--- a/drivers/media/video/sta2x11_vip.c
+++ /dev/null
@@ -1,1550 +0,0 @@
-/*
- * This is the driver for the STA2x11 Video Input Port.
- *
- * Copyright (C) 2010       WindRiver Systems, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * The full GNU General Public License is included in this distribution in
- * the file called "COPYING".
- *
- * Author: Andreas Kies <andreas.kies@windriver.com>
- *		Vlad Lungu <vlad.lungu@windriver.com>
- *
- */
-
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/vmalloc.h>
-
-#include <linux/videodev2.h>
-
-#include <linux/kmod.h>
-
-#include <linux/pci.h>
-#include <linux/interrupt.h>
-#include <linux/mutex.h>
-#include <linux/io.h>
-#include <linux/gpio.h>
-#include <linux/i2c.h>
-#include <linux/delay.h>
-#include <media/v4l2-common.h>
-#include <media/v4l2-device.h>
-#include <media/v4l2-ioctl.h>
-#include <media/videobuf-dma-contig.h>
-
-#include "sta2x11_vip.h"
-
-#define DRV_NAME "sta2x11_vip"
-#define DRV_VERSION "1.3"
-
-#ifndef PCI_DEVICE_ID_STMICRO_VIP
-#define PCI_DEVICE_ID_STMICRO_VIP 0xCC0D
-#endif
-
-#define MAX_FRAMES 4
-
-/*Register offsets*/
-#define DVP_CTL		0x00
-#define DVP_TFO		0x04
-#define DVP_TFS		0x08
-#define DVP_BFO		0x0C
-#define DVP_BFS		0x10
-#define DVP_VTP         0x14
-#define DVP_VBP         0x18
-#define DVP_VMP		0x1C
-#define DVP_ITM		0x98
-#define DVP_ITS		0x9C
-#define DVP_STA		0xA0
-#define DVP_HLFLN	0xA8
-#define DVP_RGB		0xC0
-#define DVP_PKZ		0xF0
-
-/*Register fields*/
-#define DVP_CTL_ENA	0x00000001
-#define DVP_CTL_RST	0x80000000
-#define DVP_CTL_DIS	(~0x00040001)
-
-#define DVP_IT_VSB	0x00000008
-#define DVP_IT_VST	0x00000010
-#define DVP_IT_FIFO	0x00000020
-
-#define DVP_HLFLN_SD	0x00000001
-
-#define REG_WRITE(vip, reg, value) iowrite32((value), (vip->iomem)+(reg))
-#define REG_READ(vip, reg) ioread32((vip->iomem)+(reg))
-
-#define SAVE_COUNT 8
-#define AUX_COUNT 3
-#define IRQ_COUNT 1
-
-/**
- * struct sta2x11_vip - All internal data for one instance of device
- * @v4l2_dev: device registered in v4l layer
- * @video_dev: properties of our device
- * @pdev: PCI device
- * @adapter: contains I2C adapter information
- * @register_save_area: All relevant register are saved here during suspend
- * @decoder: contains information about video DAC
- * @format: pixel format, fixed UYVY
- * @std: video standard (e.g. PAL/NTSC)
- * @input: input line for video signal ( 0 or 1 )
- * @users: Number of open of device ( max. 1 )
- * @disabled: Device is in power down state
- * @mutex: ensures exclusive opening of device
- * @slock: for excluse acces of registers
- * @vb_vidq: queue maintained by videobuf layer
- * @capture: linked list of capture buffer
- * @active: struct videobuf_buffer currently beingg filled
- * @started: device is ready to capture frame
- * @closing: device will be shut down
- * @tcount: Number of top frames
- * @bcount: Number of bottom frames
- * @overflow: Number of FIFO overflows
- * @mem_spare: small buffer of unused frame
- * @dma_spare: dma addres of mem_spare
- * @iomem: hardware base address
- * @config: I2C and gpio config from platform
- *
- * All non-local data is accessed via this structure.
- */
-
-struct sta2x11_vip {
-	struct v4l2_device v4l2_dev;
-	struct video_device *video_dev;
-	struct pci_dev *pdev;
-	struct i2c_adapter *adapter;
-	unsigned int register_save_area[IRQ_COUNT + SAVE_COUNT + AUX_COUNT];
-	struct v4l2_subdev *decoder;
-	struct v4l2_pix_format format;
-	v4l2_std_id std;
-	unsigned int input;
-	int users;
-	int disabled;
-	struct mutex mutex;	/* exclusive access during open */
-	spinlock_t slock;	/* spin lock for hardware and queue access */
-	struct videobuf_queue vb_vidq;
-	struct list_head capture;
-	struct videobuf_buffer *active;
-	int started, closing, tcount, bcount;
-	int overflow;
-	void *mem_spare;
-	dma_addr_t dma_spare;
-	void *iomem;
-	struct vip_config *config;
-};
-
-static const unsigned int registers_to_save[AUX_COUNT] = {
-	DVP_HLFLN, DVP_RGB, DVP_PKZ
-};
-
-static struct v4l2_pix_format formats_50[] = {
-	{			/*PAL interlaced */
-	 .width = 720,
-	 .height = 576,
-	 .pixelformat = V4L2_PIX_FMT_UYVY,
-	 .field = V4L2_FIELD_INTERLACED,
-	 .bytesperline = 720 * 2,
-	 .sizeimage = 720 * 2 * 576,
-	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
-	{			/*PAL top */
-	 .width = 720,
-	 .height = 288,
-	 .pixelformat = V4L2_PIX_FMT_UYVY,
-	 .field = V4L2_FIELD_TOP,
-	 .bytesperline = 720 * 2,
-	 .sizeimage = 720 * 2 * 288,
-	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
-	{			/*PAL bottom */
-	 .width = 720,
-	 .height = 288,
-	 .pixelformat = V4L2_PIX_FMT_UYVY,
-	 .field = V4L2_FIELD_BOTTOM,
-	 .bytesperline = 720 * 2,
-	 .sizeimage = 720 * 2 * 288,
-	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
-
-};
-
-static struct v4l2_pix_format formats_60[] = {
-	{			/*NTSC interlaced */
-	 .width = 720,
-	 .height = 480,
-	 .pixelformat = V4L2_PIX_FMT_UYVY,
-	 .field = V4L2_FIELD_INTERLACED,
-	 .bytesperline = 720 * 2,
-	 .sizeimage = 720 * 2 * 480,
-	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
-	{			/*NTSC top */
-	 .width = 720,
-	 .height = 240,
-	 .pixelformat = V4L2_PIX_FMT_UYVY,
-	 .field = V4L2_FIELD_TOP,
-	 .bytesperline = 720 * 2,
-	 .sizeimage = 720 * 2 * 240,
-	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
-	{			/*NTSC bottom */
-	 .width = 720,
-	 .height = 240,
-	 .pixelformat = V4L2_PIX_FMT_UYVY,
-	 .field = V4L2_FIELD_BOTTOM,
-	 .bytesperline = 720 * 2,
-	 .sizeimage = 720 * 2 * 240,
-	 .colorspace = V4L2_COLORSPACE_SMPTE170M},
-};
-
-/**
- * buf_setup - Get size and number of video buffer
- * @vq: queue in videobuf
- * @count: Number of buffers (1..MAX_FRAMES).
- *		0 use default value.
- * @size:  size of buffer in bytes
- *
- * returns size and number of buffers
- * a preset value of 0 returns the default number.
- * return value: 0, always succesfull.
- */
-static int buf_setup(struct videobuf_queue *vq, unsigned int *count,
-		     unsigned int *size)
-{
-	struct sta2x11_vip *vip = vq->priv_data;
-
-	*size = vip->format.width * vip->format.height * 2;
-	if (0 == *count || MAX_FRAMES < *count)
-		*count = MAX_FRAMES;
-	return 0;
-};
-
-/**
- * buf_prepare - prepare buffer for usage
- * @vq: queue in videobuf layer
- * @vb: buffer to be prepared
- * @field: type of video data (interlaced/non-interlaced)
- *
- * Allocate or realloc buffer
- * return value: 0, successful.
- *
- * -EINVAL, supplied buffer is too small.
- *
- *  other, buffer could not be locked.
- */
-static int buf_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
-		       enum v4l2_field field)
-{
-	struct sta2x11_vip *vip = vq->priv_data;
-	int ret;
-
-	vb->size = vip->format.width * vip->format.height * 2;
-	if ((0 != vb->baddr) && (vb->bsize < vb->size))
-		return -EINVAL;
-	vb->width = vip->format.width;
-	vb->height = vip->format.height;
-	vb->field = field;
-
-	if (VIDEOBUF_NEEDS_INIT == vb->state) {
-		ret = videobuf_iolock(vq, vb, NULL);
-		if (ret)
-			goto fail;
-	}
-	vb->state = VIDEOBUF_PREPARED;
-	return 0;
-fail:
-	videobuf_dma_contig_free(vq, vb);
-	vb->state = VIDEOBUF_NEEDS_INIT;
-	return ret;
-}
-
-/**
- * buf_queu - queue buffer for filling
- * @vq: queue in videobuf layer
- * @vb: buffer to be queued
- *
- * if capturing is already running, the buffer will be queued. Otherwise
- * capture is started and the buffer is used directly.
- */
-static void buf_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
-{
-	struct sta2x11_vip *vip = vq->priv_data;
-	u32 dma;
-
-	vb->state = VIDEOBUF_QUEUED;
-
-	if (vip->active) {
-		list_add_tail(&vb->queue, &vip->capture);
-		return;
-	}
-
-	vip->started = 1;
-	vip->tcount = 0;
-	vip->bcount = 0;
-	vip->active = vb;
-	vb->state = VIDEOBUF_ACTIVE;
-
-	dma = videobuf_to_dma_contig(vb);
-
-	REG_WRITE(vip, DVP_TFO, (0 << 16) | (0));
-	/* despite of interlace mode, upper and lower frames start at zero */
-	REG_WRITE(vip, DVP_BFO, (0 << 16) | (0));
-
-	switch (vip->format.field) {
-	case V4L2_FIELD_INTERLACED:
-		REG_WRITE(vip, DVP_TFS,
-			  ((vip->format.height / 2 - 1) << 16) |
-			  (2 * vip->format.width - 1));
-		REG_WRITE(vip, DVP_BFS, ((vip->format.height / 2 - 1) << 16) |
-			  (2 * vip->format.width - 1));
-		REG_WRITE(vip, DVP_VTP, dma);
-		REG_WRITE(vip, DVP_VBP, dma + vip->format.width * 2);
-		REG_WRITE(vip, DVP_VMP, 4 * vip->format.width);
-		break;
-	case V4L2_FIELD_TOP:
-		REG_WRITE(vip, DVP_TFS,
-			  ((vip->format.height - 1) << 16) |
-			  (2 * vip->format.width - 1));
-		REG_WRITE(vip, DVP_BFS, ((0) << 16) |
-			  (2 * vip->format.width - 1));
-		REG_WRITE(vip, DVP_VTP, dma);
-		REG_WRITE(vip, DVP_VBP, dma);
-		REG_WRITE(vip, DVP_VMP, 2 * vip->format.width);
-		break;
-	case V4L2_FIELD_BOTTOM:
-		REG_WRITE(vip, DVP_TFS, ((0) << 16) |
-			  (2 * vip->format.width - 1));
-		REG_WRITE(vip, DVP_BFS,
-			  ((vip->format.height) << 16) |
-			  (2 * vip->format.width - 1));
-		REG_WRITE(vip, DVP_VTP, dma);
-		REG_WRITE(vip, DVP_VBP, dma);
-		REG_WRITE(vip, DVP_VMP, 2 * vip->format.width);
-		break;
-
-	default:
-		pr_warning("VIP: unknown field format\n");
-		return;
-	}
-
-	REG_WRITE(vip, DVP_CTL, DVP_CTL_ENA);
-}
-
-/**
- * buff_release - release buffer
- * @vq: queue in videobuf layer
- * @vb: buffer to be released
- *
- * release buffer in videobuf layer
- */
-static void buf_release(struct videobuf_queue *vq, struct videobuf_buffer *vb)
-{
-
-	videobuf_dma_contig_free(vq, vb);
-	vb->state = VIDEOBUF_NEEDS_INIT;
-}
-
-static struct videobuf_queue_ops vip_qops = {
-	.buf_setup = buf_setup,
-	.buf_prepare = buf_prepare,
-	.buf_queue = buf_queue,
-	.buf_release = buf_release,
-};
-
-/**
- * vip_open - open video device
- * @file: descriptor of device
- *
- * open device, make sure it is only opened once.
- * return value: 0, no error.
- *
- * -EBUSY, device is already opened
- *
- * -ENOMEM, no memory for auxiliary DMA buffer
- */
-static int vip_open(struct file *file)
-{
-	struct video_device *dev = video_devdata(file);
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	mutex_lock(&vip->mutex);
-	vip->users++;
-
-	if (vip->users > 1) {
-		vip->users--;
-		mutex_unlock(&vip->mutex);
-		return -EBUSY;
-	}
-
-	file->private_data = dev;
-	vip->overflow = 0;
-	vip->started = 0;
-	vip->closing = 0;
-	vip->active = NULL;
-
-	INIT_LIST_HEAD(&vip->capture);
-	vip->mem_spare = dma_alloc_coherent(&vip->pdev->dev, 64,
-					    &vip->dma_spare, GFP_KERNEL);
-	if (!vip->mem_spare) {
-		vip->users--;
-		mutex_unlock(&vip->mutex);
-		return -ENOMEM;
-	}
-
-	mutex_unlock(&vip->mutex);
-	videobuf_queue_dma_contig_init_cached(&vip->vb_vidq,
-					      &vip_qops,
-					      &vip->pdev->dev,
-					      &vip->slock,
-					      V4L2_BUF_TYPE_VIDEO_CAPTURE,
-					      V4L2_FIELD_INTERLACED,
-					      sizeof(struct videobuf_buffer),
-					      vip, NULL);
-	REG_READ(vip, DVP_ITS);
-	REG_WRITE(vip, DVP_HLFLN, DVP_HLFLN_SD);
-	REG_WRITE(vip, DVP_ITM, DVP_IT_VSB | DVP_IT_VST);
-	REG_WRITE(vip, DVP_CTL, DVP_CTL_RST);
-	REG_WRITE(vip, DVP_CTL, 0);
-	REG_READ(vip, DVP_ITS);
-	return 0;
-}
-
-/**
- * vip_close - close video device
- * @file: descriptor of device
- *
- * close video device, wait until all pending operations are finished
- * ( maximum FRAME_MAX buffers pending )
- * Turn off interrupts.
- *
- * return value: 0, always succesful.
- */
-static int vip_close(struct file *file)
-{
-	struct video_device *dev = video_devdata(file);
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	vip->closing = 1;
-	if (vip->active)
-		videobuf_waiton(&vip->vb_vidq, vip->active, 0, 0);
-	spin_lock_irq(&vip->slock);
-
-	REG_WRITE(vip, DVP_ITM, 0);
-	REG_WRITE(vip, DVP_CTL, DVP_CTL_RST);
-	REG_WRITE(vip, DVP_CTL, 0);
-	REG_READ(vip, DVP_ITS);
-
-	vip->started = 0;
-	vip->active = NULL;
-
-	spin_unlock_irq(&vip->slock);
-
-	videobuf_stop(&vip->vb_vidq);
-	videobuf_mmap_free(&vip->vb_vidq);
-
-	dma_free_coherent(&vip->pdev->dev, 64, vip->mem_spare, vip->dma_spare);
-	file->private_data = NULL;
-	mutex_lock(&vip->mutex);
-	vip->users--;
-	mutex_unlock(&vip->mutex);
-	return 0;
-}
-
-/**
- * vip_read - read from video input
- * @file: descriptor of device
- * @data: user buffer
- * @count: number of bytes to be read
- * @ppos: position within stream
- *
- * read video data from video device.
- * handling is done in generic videobuf layer
- * return value: provided by videobuf layer
- */
-static ssize_t vip_read(struct file *file, char __user *data,
-			size_t count, loff_t *ppos)
-{
-	struct video_device *dev = file->private_data;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return videobuf_read_stream(&vip->vb_vidq, data, count, ppos, 0,
-				    file->f_flags & O_NONBLOCK);
-}
-
-/**
- * vip_mmap - map user buffer
- * @file: descriptor of device
- * @vma: user buffer
- *
- * map user space buffer into kernel mode, including DMA address.
- * handling is done in generic videobuf layer.
- * return value: provided by videobuf layer
- */
-static int vip_mmap(struct file *file, struct vm_area_struct *vma)
-{
-	struct video_device *dev = file->private_data;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return videobuf_mmap_mapper(&vip->vb_vidq, vma);
-}
-
-/**
- * vip_poll - poll for event
- * @file: descriptor of device
- * @wait: contains events to be waited for
- *
- * wait for event related to video device.
- * handling is done in generic videobuf layer.
- * return value: provided by videobuf layer
- */
-static unsigned int vip_poll(struct file *file, struct poll_table_struct *wait)
-{
-	struct video_device *dev = file->private_data;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return videobuf_poll_stream(file, &vip->vb_vidq, wait);
-}
-
-/**
- * vidioc_querycap - return capabilities of device
- * @file: descriptor of device (not used)
- * @priv: points to current videodevice
- * @cap: contains return values
- *
- * the capabilities of the device are returned
- *
- * return value: 0, no error.
- */
-static int vidioc_querycap(struct file *file, void *priv,
-			   struct v4l2_capability *cap)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	memset(cap, 0, sizeof(struct v4l2_capability));
-	strcpy(cap->driver, DRV_NAME);
-	strcpy(cap->card, DRV_NAME);
-	cap->version = 0;
-	snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s",
-		 pci_name(vip->pdev));
-	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
-	    V4L2_CAP_STREAMING;
-
-	return 0;
-}
-
-/**
- * vidioc_s_std - set video standard
- * @file: descriptor of device (not used)
- * @priv: points to current videodevice
- * @std: contains standard to be set
- *
- * the video standard is set
- *
- * return value: 0, no error.
- *
- * -EIO, no input signal detected
- *
- * other, returned from video DAC.
- */
-static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *std)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-	v4l2_std_id oldstd = vip->std, newstd;
-	int status;
-
-	if (V4L2_STD_ALL == *std) {
-		v4l2_subdev_call(vip->decoder, core, s_std, *std);
-		ssleep(2);
-		v4l2_subdev_call(vip->decoder, video, querystd, &newstd);
-		v4l2_subdev_call(vip->decoder, video, g_input_status, &status);
-		if (status & V4L2_IN_ST_NO_SIGNAL)
-			return -EIO;
-		*std = vip->std = newstd;
-		if (oldstd != *std) {
-			if (V4L2_STD_525_60 & (*std))
-				vip->format = formats_60[0];
-			else
-				vip->format = formats_50[0];
-		}
-		return 0;
-	}
-
-	if (oldstd != *std) {
-		if (V4L2_STD_525_60 & (*std))
-			vip->format = formats_60[0];
-		else
-			vip->format = formats_50[0];
-	}
-
-	return v4l2_subdev_call(vip->decoder, core, s_std, *std);
-}
-
-/**
- * vidioc_g_std - get video standard
- * @file: descriptor of device (not used)
- * @priv: points to current videodevice
- * @std: contains return values
- *
- * the current video standard is returned
- *
- * return value: 0, no error.
- */
-static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *std)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	*std = vip->std;
-	return 0;
-}
-
-/**
- * vidioc_querystd - get possible video standards
- * @file: descriptor of device (not used)
- * @priv: points to current videodevice
- * @std: contains return values
- *
- * all possible video standards are returned
- *
- * return value: delivered by video DAC routine.
- */
-static int vidioc_querystd(struct file *file, void *priv, v4l2_std_id *std)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return v4l2_subdev_call(vip->decoder, video, querystd, std);
-
-}
-
-/**
- * vidioc_queryctl - get possible control settings
- * @file: descriptor of device (not used)
- * @priv: points to current videodevice
- * @ctrl: contains return values
- *
- * return possible values for a control
- * return value: delivered by video DAC routine.
- */
-static int vidioc_queryctrl(struct file *file, void *priv,
-			    struct v4l2_queryctrl *ctrl)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return v4l2_subdev_call(vip->decoder, core, queryctrl, ctrl);
-}
-
-/**
- * vidioc_g_ctl - get control value
- * @file: descriptor of device (not used)
- * @priv: points to current videodevice
- * @ctrl: contains return values
- *
- * return setting for a control value
- * return value: delivered by video DAC routine.
- */
-static int vidioc_g_ctrl(struct file *file, void *priv,
-			 struct v4l2_control *ctrl)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return v4l2_subdev_call(vip->decoder, core, g_ctrl, ctrl);
-}
-
-/**
- * vidioc_s_ctl - set control value
- * @file: descriptor of device (not used)
- * @priv: points to current videodevice
- * @ctrl: contains value to be set
- *
- * set value for a specific control
- * return value: delivered by video DAC routine.
- */
-static int vidioc_s_ctrl(struct file *file, void *priv,
-			 struct v4l2_control *ctrl)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return v4l2_subdev_call(vip->decoder, core, s_ctrl, ctrl);
-}
-
-/**
- * vidioc_enum_input - return name of input line
- * @file: descriptor of device (not used)
- * @priv: points to current videodevice
- * @inp: contains return values
- *
- * the user friendly name of the input line is returned
- *
- * return value: 0, no error.
- *
- * -EINVAL, input line number out of range
- */
-static int vidioc_enum_input(struct file *file, void *priv,
-			     struct v4l2_input *inp)
-{
-	if (inp->index > 1)
-		return -EINVAL;
-
-	inp->type = V4L2_INPUT_TYPE_CAMERA;
-	inp->std = V4L2_STD_ALL;
-	sprintf(inp->name, "Camera %u", inp->index);
-
-	return 0;
-}
-
-/**
- * vidioc_s_input - set input line
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @i: new input line number
- *
- * the current active input line is set
- *
- * return value: 0, no error.
- *
- * -EINVAL, line number out of range
- */
-static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-	int ret;
-
-	if (i > 1)
-		return -EINVAL;
-	ret = v4l2_subdev_call(vip->decoder, video, s_routing, i, 0, 0);
-
-	if (!ret)
-		vip->input = i;
-
-	return 0;
-}
-
-/**
- * vidioc_g_input - return input line
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @i: returned input line number
- *
- * the current active input line is returned
- *
- * return value: always 0.
- */
-static int vidioc_g_input(struct file *file, void *priv, unsigned int *i)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	*i = vip->input;
-	return 0;
-}
-
-/**
- * vidioc_enum_fmt_vid_cap - return video capture format
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @f: returned format information
- *
- * returns name and format of video capture
- * Only UYVY is supported by hardware.
- *
- * return value: always 0.
- */
-static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
-				   struct v4l2_fmtdesc *f)
-{
-
-	if (f->index != 0)
-		return -EINVAL;
-
-	strcpy(f->description, "4:2:2, packed, UYVY");
-	f->pixelformat = V4L2_PIX_FMT_UYVY;
-	f->flags = 0;
-	return 0;
-}
-
-/**
- * vidioc_try_fmt_vid_cap - set video capture format
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @f: new format
- *
- * new video format is set which includes width and
- * field type. width is fixed to 720, no scaling.
- * Only UYVY is supported by this hardware.
- * the minimum height is 200, the maximum is 576 (PAL)
- *
- * return value: 0, no error
- *
- * -EINVAL, pixel or field format not supported
- *
- */
-static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
-				  struct v4l2_format *f)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-	int interlace_lim;
-
-	if (V4L2_PIX_FMT_UYVY != f->fmt.pix.pixelformat)
-		return -EINVAL;
-
-	if (V4L2_STD_525_60 & vip->std)
-		interlace_lim = 240;
-	else
-		interlace_lim = 288;
-
-	switch (f->fmt.pix.field) {
-	case V4L2_FIELD_ANY:
-		if (interlace_lim < f->fmt.pix.height)
-			f->fmt.pix.field = V4L2_FIELD_INTERLACED;
-		else
-			f->fmt.pix.field = V4L2_FIELD_BOTTOM;
-		break;
-	case V4L2_FIELD_TOP:
-	case V4L2_FIELD_BOTTOM:
-		if (interlace_lim < f->fmt.pix.height)
-			f->fmt.pix.height = interlace_lim;
-		break;
-	case V4L2_FIELD_INTERLACED:
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	f->fmt.pix.height &= ~1;
-	if (2 * interlace_lim < f->fmt.pix.height)
-		f->fmt.pix.height = 2 * interlace_lim;
-	if (200 > f->fmt.pix.height)
-		f->fmt.pix.height = 200;
-	f->fmt.pix.width = 720;
-	f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
-	f->fmt.pix.sizeimage = f->fmt.pix.width * 2 * f->fmt.pix.height;
-	f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-	f->fmt.pix.priv = 0;
-	return 0;
-}
-
-/**
- * vidioc_s_fmt_vid_cap - set current video format parameters
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @f: returned format information
- *
- * set new capture format
- * return value: 0, no error
- *
- * other, delivered by video DAC routine.
- */
-static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
-				struct v4l2_format *f)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-	int ret;
-
-	ret = vidioc_try_fmt_vid_cap(file, priv, f);
-	if (ret)
-		return ret;
-
-	memcpy(&vip->format, &f->fmt.pix, sizeof(struct v4l2_pix_format));
-	return 0;
-}
-
-/**
- * vidioc_g_fmt_vid_cap - get current video format parameters
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @f: contains format information
- *
- * returns current video format parameters
- *
- * return value: 0, always successful
- */
-static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
-				struct v4l2_format *f)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	memcpy(&f->fmt.pix, &vip->format, sizeof(struct v4l2_pix_format));
-	return 0;
-}
-
-/**
- * vidioc_reqfs - request buffer
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @p: video buffer
- *
- * Handling is done in generic videobuf layer.
- */
-static int vidioc_reqbufs(struct file *file, void *priv,
-			  struct v4l2_requestbuffers *p)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return videobuf_reqbufs(&vip->vb_vidq, p);
-}
-
-/**
- * vidioc_querybuf - query buffer
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @p: video buffer
- *
- * query buffer state.
- * Handling is done in generic videobuf layer.
- */
-static int vidioc_querybuf(struct file *file, void *priv, struct v4l2_buffer *p)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return videobuf_querybuf(&vip->vb_vidq, p);
-}
-
-/**
- * vidioc_qbuf - queue a buffer
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @p: video buffer
- *
- * Handling is done in generic videobuf layer.
- */
-static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *p)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return videobuf_qbuf(&vip->vb_vidq, p);
-}
-
-/**
- * vidioc_dqbuf - dequeue a buffer
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @p: video buffer
- *
- * Handling is done in generic videobuf layer.
- */
-static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return videobuf_dqbuf(&vip->vb_vidq, p, file->f_flags & O_NONBLOCK);
-}
-
-/**
- * vidioc_streamon - turn on streaming
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @type: type of capture
- *
- * turn on streaming.
- * Handling is done in generic videobuf layer.
- */
-static int vidioc_streamon(struct file *file, void *priv,
-			   enum v4l2_buf_type type)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return videobuf_streamon(&vip->vb_vidq);
-}
-
-/**
- * vidioc_streamoff - turn off streaming
- * @file: descriptor of device ( not used)
- * @priv: points to current videodevice
- * @type: type of capture
- *
- * turn off streaming.
- * Handling is done in generic videobuf layer.
- */
-static int vidioc_streamoff(struct file *file, void *priv,
-			    enum v4l2_buf_type type)
-{
-	struct video_device *dev = priv;
-	struct sta2x11_vip *vip = video_get_drvdata(dev);
-
-	return videobuf_streamoff(&vip->vb_vidq);
-}
-
-static const struct v4l2_file_operations vip_fops = {
-	.owner = THIS_MODULE,
-	.open = vip_open,
-	.release = vip_close,
-	.ioctl = video_ioctl2,
-	.read = vip_read,
-	.mmap = vip_mmap,
-	.poll = vip_poll
-};
-
-static const struct v4l2_ioctl_ops vip_ioctl_ops = {
-	.vidioc_querycap = vidioc_querycap,
-	.vidioc_s_std = vidioc_s_std,
-	.vidioc_g_std = vidioc_g_std,
-	.vidioc_querystd = vidioc_querystd,
-	.vidioc_queryctrl = vidioc_queryctrl,
-	.vidioc_g_ctrl = vidioc_g_ctrl,
-	.vidioc_s_ctrl = vidioc_s_ctrl,
-	.vidioc_enum_input = vidioc_enum_input,
-	.vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
-	.vidioc_s_input = vidioc_s_input,
-	.vidioc_g_input = vidioc_g_input,
-	.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
-	.vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
-	.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
-	.vidioc_reqbufs = vidioc_reqbufs,
-	.vidioc_querybuf = vidioc_querybuf,
-	.vidioc_qbuf = vidioc_qbuf,
-	.vidioc_dqbuf = vidioc_dqbuf,
-	.vidioc_streamon = vidioc_streamon,
-	.vidioc_streamoff = vidioc_streamoff,
-};
-
-static struct video_device video_dev_template = {
-	.name = DRV_NAME,
-	.release = video_device_release,
-	.fops = &vip_fops,
-	.ioctl_ops = &vip_ioctl_ops,
-	.tvnorms = V4L2_STD_ALL,
-};
-
-/**
- * vip_irq - interrupt routine
- * @irq: Number of interrupt ( not used, correct number is assumed )
- * @vip: local data structure containing all information
- *
- * check for both frame interrupts set ( top and bottom ).
- * check FIFO overflow, but limit number of log messages after open.
- * signal a complete buffer if done.
- * dequeue a new buffer if available.
- * disable VIP if no buffer available.
- *
- * return value: IRQ_NONE, interrupt was not generated by VIP
- *
- * IRQ_HANDLED, interrupt done.
- */
-static irqreturn_t vip_irq(int irq, struct sta2x11_vip *vip)
-{
-	u32 status, dma;
-	unsigned long flags;
-	struct videobuf_buffer *vb;
-
-	status = REG_READ(vip, DVP_ITS);
-
-	if (!status) {
-		pr_debug("VIP: irq ignored\n");
-		return IRQ_NONE;
-	}
-
-	if (!vip->started)
-		return IRQ_HANDLED;
-
-	if (status & DVP_IT_VSB)
-		vip->bcount++;
-
-	if (status & DVP_IT_VST)
-		vip->tcount++;
-
-	if ((DVP_IT_VSB | DVP_IT_VST) == (status & (DVP_IT_VST | DVP_IT_VSB))) {
-		/* this is bad, we are too slow, hope the condition is gone
-		 * on the next frame */
-		pr_info("VIP: both irqs\n");
-		return IRQ_HANDLED;
-	}
-
-	if (status & DVP_IT_FIFO) {
-		if (5 > vip->overflow++)
-			pr_info("VIP: fifo overflow\n");
-	}
-
-	if (2 > vip->tcount)
-		return IRQ_HANDLED;
-
-	if (status & DVP_IT_VSB)
-		return IRQ_HANDLED;
-
-	spin_lock_irqsave(&vip->slock, flags);
-
-	REG_WRITE(vip, DVP_CTL, REG_READ(vip, DVP_CTL) & ~DVP_CTL_ENA);
-	if (vip->active) {
-		do_gettimeofday(&vip->active->ts);
-		vip->active->field_count++;
-		vip->active->state = VIDEOBUF_DONE;
-		wake_up(&vip->active->done);
-		vip->active = NULL;
-	}
-	if (!vip->closing) {
-		if (list_empty(&vip->capture))
-			goto done;
-
-		vb = list_first_entry(&vip->capture, struct videobuf_buffer,
-				      queue);
-		if (NULL == vb) {
-			pr_info("VIP: no buffer\n");
-			goto done;
-		}
-		vb->state = VIDEOBUF_ACTIVE;
-		list_del(&vb->queue);
-		vip->active = vb;
-		dma = videobuf_to_dma_contig(vb);
-		switch (vip->format.field) {
-		case V4L2_FIELD_INTERLACED:
-			REG_WRITE(vip, DVP_VTP, dma);
-			REG_WRITE(vip, DVP_VBP, dma + vip->format.width * 2);
-			break;
-		case V4L2_FIELD_TOP:
-		case V4L2_FIELD_BOTTOM:
-			REG_WRITE(vip, DVP_VTP, dma);
-			REG_WRITE(vip, DVP_VBP, dma);
-			break;
-		default:
-			pr_warning("VIP: unknown field format\n");
-			goto done;
-			break;
-		}
-		REG_WRITE(vip, DVP_CTL, REG_READ(vip, DVP_CTL) | DVP_CTL_ENA);
-	}
-done:
-	spin_unlock_irqrestore(&vip->slock, flags);
-	return IRQ_HANDLED;
-}
-
-/**
- * vip_gpio_reserve - reserve gpio pin
- * @dev: device
- * @pin: GPIO pin number
- * @dir: direction, input or output
- * @name: GPIO pin name
- *
- */
-static int vip_gpio_reserve(struct device *dev, int pin, int dir,
-			    const char *name)
-{
-	int ret;
-
-	if (pin == -1)
-		return 0;
-
-	ret = gpio_request(pin, name);
-	if (ret) {
-		dev_err(dev, "Failed to allocate pin %d (%s)\n", pin, name);
-		return ret;
-	}
-
-	ret = gpio_direction_output(pin, dir);
-	if (ret) {
-		dev_err(dev, "Failed to set direction for pin %d (%s)\n",
-			pin, name);
-		gpio_free(pin);
-		return ret;
-	}
-
-	ret = gpio_export(pin, false);
-	if (ret) {
-		dev_err(dev, "Failed to export pin %d (%s)\n", pin, name);
-		gpio_free(pin);
-		return ret;
-	}
-
-	return 0;
-}
-
-/**
- * vip_gpio_release - release gpio pin
- * @dev: device
- * @pin: GPIO pin number
- * @name: GPIO pin name
- *
- */
-static void vip_gpio_release(struct device *dev, int pin, const char *name)
-{
-	if (pin != -1) {
-		dev_dbg(dev, "releasing pin %d (%s)\n",	pin, name);
-		gpio_unexport(pin);
-		gpio_free(pin);
-	}
-}
-
-/**
- * sta2x11_vip_init_one - init one instance of video device
- * @pdev: PCI device
- * @ent: (not used)
- *
- * allocate reset pins for DAC.
- * Reset video DAC, this is done via reset line.
- * allocate memory for managing device
- * request interrupt
- * map IO region
- * register device
- * find and initialize video DAC
- *
- * return value: 0, no error
- *
- * -ENOMEM, no memory
- *
- * -ENODEV, device could not be detected or registered
- */
-static int __devinit sta2x11_vip_init_one(struct pci_dev *pdev,
-					  const struct pci_device_id *ent)
-{
-	int ret;
-	struct sta2x11_vip *vip;
-	struct vip_config *config;
-
-	ret = pci_enable_device(pdev);
-	if (ret)
-		return ret;
-
-	config = dev_get_platdata(&pdev->dev);
-	if (!config) {
-		dev_info(&pdev->dev, "VIP slot disabled\n");
-		ret = -EINVAL;
-		goto disable;
-	}
-
-	ret = vip_gpio_reserve(&pdev->dev, config->pwr_pin, 0,
-			       config->pwr_name);
-	if (ret)
-		goto disable;
-
-	if (config->reset_pin >= 0) {
-		ret = vip_gpio_reserve(&pdev->dev, config->reset_pin, 0,
-				       config->reset_name);
-		if (ret) {
-			vip_gpio_release(&pdev->dev, config->pwr_pin,
-					 config->pwr_name);
-			goto disable;
-		}
-	}
-
-	if (config->pwr_pin != -1) {
-		/* Datasheet says 5ms between PWR and RST */
-		usleep_range(5000, 25000);
-		ret = gpio_direction_output(config->pwr_pin, 1);
-	}
-
-	if (config->reset_pin != -1) {
-		/* Datasheet says 5ms between PWR and RST */
-		usleep_range(5000, 25000);
-		ret = gpio_direction_output(config->reset_pin, 1);
-	}
-	usleep_range(5000, 25000);
-
-	vip = kzalloc(sizeof(struct sta2x11_vip), GFP_KERNEL);
-	if (!vip) {
-		ret = -ENOMEM;
-		goto release_gpios;
-	}
-
-	vip->pdev = pdev;
-	vip->std = V4L2_STD_PAL;
-	vip->format = formats_50[0];
-	vip->config = config;
-
-	if (v4l2_device_register(&pdev->dev, &vip->v4l2_dev))
-		goto free_mem;
-
-	dev_dbg(&pdev->dev, "BAR #0 at 0x%lx 0x%lx irq %d\n",
-		(unsigned long)pci_resource_start(pdev, 0),
-		(unsigned long)pci_resource_len(pdev, 0), pdev->irq);
-
-	pci_set_master(pdev);
-
-	ret = pci_request_regions(pdev, DRV_NAME);
-	if (ret)
-		goto unreg;
-
-	vip->iomem = pci_iomap(pdev, 0, 0x100);
-	if (!vip->iomem) {
-		ret = -ENOMEM; /* FIXME */
-		goto release;
-	}
-
-	pci_enable_msi(pdev);
-
-	INIT_LIST_HEAD(&vip->capture);
-	spin_lock_init(&vip->slock);
-	mutex_init(&vip->mutex);
-	vip->started = 0;
-	vip->disabled = 0;
-
-	ret = request_irq(pdev->irq,
-			  (irq_handler_t) vip_irq,
-			  IRQF_SHARED, DRV_NAME, vip);
-	if (ret) {
-		dev_err(&pdev->dev, "request_irq failed\n");
-		ret = -ENODEV;
-		goto unmap;
-	}
-
-	vip->video_dev = video_device_alloc();
-	if (!vip->video_dev) {
-		ret = -ENOMEM;
-		goto release_irq;
-	}
-
-	*(vip->video_dev) = video_dev_template;
-	video_set_drvdata(vip->video_dev, vip);
-
-	ret = video_register_device(vip->video_dev, VFL_TYPE_GRABBER, -1);
-	if (ret)
-		goto vrelease;
-
-	vip->adapter = i2c_get_adapter(vip->config->i2c_id);
-	if (!vip->adapter) {
-		ret = -ENODEV;
-		dev_err(&pdev->dev, "no I2C adapter found\n");
-		goto vunreg;
-	}
-
-	vip->decoder = v4l2_i2c_new_subdev(&vip->v4l2_dev, vip->adapter,
-					   "adv7180", vip->config->i2c_addr,
-					   NULL);
-	if (!vip->decoder) {
-		ret = -ENODEV;
-		dev_err(&pdev->dev, "no decoder found\n");
-		goto vunreg;
-	}
-
-	i2c_put_adapter(vip->adapter);
-
-	v4l2_subdev_call(vip->decoder, core, init, 0);
-
-	pr_info("STA2X11 Video Input Port (VIP) loaded\n");
-	return 0;
-
-vunreg:
-	video_set_drvdata(vip->video_dev, NULL);
-vrelease:
-	if (video_is_registered(vip->video_dev))
-		video_unregister_device(vip->video_dev);
-	else
-		video_device_release(vip->video_dev);
-release_irq:
-	free_irq(pdev->irq, vip);
-	pci_disable_msi(pdev);
-unmap:
-	pci_iounmap(pdev, vip->iomem);
-	mutex_destroy(&vip->mutex);
-release:
-	pci_release_regions(pdev);
-unreg:
-	v4l2_device_unregister(&vip->v4l2_dev);
-free_mem:
-	kfree(vip);
-release_gpios:
-	vip_gpio_release(&pdev->dev, config->reset_pin, config->reset_name);
-	vip_gpio_release(&pdev->dev, config->pwr_pin, config->pwr_name);
-disable:
-	/*
-	 * do not call pci_disable_device on sta2x11 because it break all
-	 * other Bus masters on this EP
-	 */
-	return ret;
-}
-
-/**
- * sta2x11_vip_remove_one - release device
- * @pdev: PCI device
- *
- * Undo everything done in .._init_one
- *
- * unregister video device
- * free interrupt
- * unmap ioadresses
- * free memory
- * free GPIO pins
- */
-static void __devexit sta2x11_vip_remove_one(struct pci_dev *pdev)
-{
-	struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev);
-	struct sta2x11_vip *vip =
-	    container_of(v4l2_dev, struct sta2x11_vip, v4l2_dev);
-
-	video_set_drvdata(vip->video_dev, NULL);
-	video_unregister_device(vip->video_dev);
-	/*do not call video_device_release() here, is already done */
-	free_irq(pdev->irq, vip);
-	pci_disable_msi(pdev);
-	pci_iounmap(pdev, vip->iomem);
-	pci_release_regions(pdev);
-
-	v4l2_device_unregister(&vip->v4l2_dev);
-	mutex_destroy(&vip->mutex);
-
-	vip_gpio_release(&pdev->dev, vip->config->pwr_pin,
-			 vip->config->pwr_name);
-	vip_gpio_release(&pdev->dev, vip->config->reset_pin,
-			 vip->config->reset_name);
-
-	kfree(vip);
-	/*
-	 * do not call pci_disable_device on sta2x11 because it break all
-	 * other Bus masters on this EP
-	 */
-}
-
-#ifdef CONFIG_PM
-
-/**
- * sta2x11_vip_suspend - set device into power save mode
- * @pdev: PCI device
- * @state: new state of device
- *
- * all relevant registers are saved and an attempt to set a new state is made.
- *
- * return value: 0 always indicate success,
- * even if device could not be disabled. (workaround for hardware problem)
- *
- * reurn value : 0, always succesful, even if hardware does not not support
- * power down mode.
- */
-static int sta2x11_vip_suspend(struct pci_dev *pdev, pm_message_t state)
-{
-	struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev);
-	struct sta2x11_vip *vip =
-	    container_of(v4l2_dev, struct sta2x11_vip, v4l2_dev);
-	unsigned long flags;
-	int i;
-
-	spin_lock_irqsave(&vip->slock, flags);
-	vip->register_save_area[0] = REG_READ(vip, DVP_CTL);
-	REG_WRITE(vip, DVP_CTL, vip->register_save_area[0] & DVP_CTL_DIS);
-	vip->register_save_area[SAVE_COUNT] = REG_READ(vip, DVP_ITM);
-	REG_WRITE(vip, DVP_ITM, 0);
-	for (i = 1; i < SAVE_COUNT; i++)
-		vip->register_save_area[i] = REG_READ(vip, 4 * i);
-	for (i = 0; i < AUX_COUNT; i++)
-		vip->register_save_area[SAVE_COUNT + IRQ_COUNT + i] =
-		    REG_READ(vip, registers_to_save[i]);
-	spin_unlock_irqrestore(&vip->slock, flags);
-	/* save pci state */
-	pci_save_state(pdev);
-	if (pci_set_power_state(pdev, pci_choose_state(pdev, state))) {
-		/*
-		 * do not call pci_disable_device on sta2x11 because it
-		 * break all other Bus masters on this EP
-		 */
-		vip->disabled = 1;
-	}
-
-	pr_info("VIP: suspend\n");
-	return 0;
-}
-
-/**
- * sta2x11_vip_resume - resume device operation
- * @pdev : PCI device
- *
- * re-enable device, set PCI state to powered and restore registers.
- * resume normal device operation afterwards.
- *
- * return value: 0, no error.
- *
- * other, could not set device to power on state.
- */
-static int sta2x11_vip_resume(struct pci_dev *pdev)
-{
-	struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev);
-	struct sta2x11_vip *vip =
-	    container_of(v4l2_dev, struct sta2x11_vip, v4l2_dev);
-	unsigned long flags;
-	int ret, i;
-
-	pr_info("VIP: resume\n");
-	/* restore pci state */
-	if (vip->disabled) {
-		ret = pci_enable_device(pdev);
-		if (ret) {
-			pr_warning("VIP: Can't enable device.\n");
-			return ret;
-		}
-		vip->disabled = 0;
-	}
-	ret = pci_set_power_state(pdev, PCI_D0);
-	if (ret) {
-		/*
-		 * do not call pci_disable_device on sta2x11 because it
-		 * break all other Bus masters on this EP
-		 */
-		pr_warning("VIP: Can't enable device.\n");
-		vip->disabled = 1;
-		return ret;
-	}
-
-	pci_restore_state(pdev);
-
-	spin_lock_irqsave(&vip->slock, flags);
-	for (i = 1; i < SAVE_COUNT; i++)
-		REG_WRITE(vip, 4 * i, vip->register_save_area[i]);
-	for (i = 0; i < AUX_COUNT; i++)
-		REG_WRITE(vip, registers_to_save[i],
-			  vip->register_save_area[SAVE_COUNT + IRQ_COUNT + i]);
-	REG_WRITE(vip, DVP_CTL, vip->register_save_area[0]);
-	REG_WRITE(vip, DVP_ITM, vip->register_save_area[SAVE_COUNT]);
-	spin_unlock_irqrestore(&vip->slock, flags);
-	return 0;
-}
-
-#endif
-
-static DEFINE_PCI_DEVICE_TABLE(sta2x11_vip_pci_tbl) = {
-	{PCI_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_VIP)},
-	{0,}
-};
-
-static struct pci_driver sta2x11_vip_driver = {
-	.name = DRV_NAME,
-	.probe = sta2x11_vip_init_one,
-	.remove = __devexit_p(sta2x11_vip_remove_one),
-	.id_table = sta2x11_vip_pci_tbl,
-#ifdef CONFIG_PM
-	.suspend = sta2x11_vip_suspend,
-	.resume = sta2x11_vip_resume,
-#endif
-};
-
-static int __init sta2x11_vip_init_module(void)
-{
-	return pci_register_driver(&sta2x11_vip_driver);
-}
-
-static void __exit sta2x11_vip_exit_module(void)
-{
-	pci_unregister_driver(&sta2x11_vip_driver);
-}
-
-#ifdef MODULE
-module_init(sta2x11_vip_init_module);
-module_exit(sta2x11_vip_exit_module);
-#else
-late_initcall_sync(sta2x11_vip_init_module);
-#endif
-
-MODULE_DESCRIPTION("STA2X11 Video Input Port driver");
-MODULE_AUTHOR("Wind River");
-MODULE_LICENSE("GPL v2");
-MODULE_SUPPORTED_DEVICE("sta2x11 video input");
-MODULE_VERSION(DRV_VERSION);
-MODULE_DEVICE_TABLE(pci, sta2x11_vip_pci_tbl);
diff --git a/drivers/media/video/sta2x11_vip.h b/drivers/media/video/sta2x11_vip.h
deleted file mode 100644
index 4f81a13..0000000
--- a/drivers/media/video/sta2x11_vip.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2011 Wind River Systems, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author:  Anders Wallin <anders.wallin@windriver.com>
- *
- */
-
-#ifndef __STA2X11_VIP_H
-#define __STA2X11_VIP_H
-
-/**
- * struct vip_config - video input configuration data
- * @pwr_name: ADV powerdown name
- * @pwr_pin: ADV powerdown pin
- * @reset_name: ADV reset name
- * @reset_pin: ADV reset pin
- */
-struct vip_config {
-	const char *pwr_name;
-	int pwr_pin;
-	const char *reset_name;
-	int reset_pin;
-	int i2c_id;
-	int i2c_addr;
-};
-
-#endif /* __STA2X11_VIP_H */
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/
  2012-08-14 20:55 [PATCH 00/12] media tree reorganization part 2 (second version) Mauro Carvalho Chehab
  2012-08-14 20:55 ` [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir Mauro Carvalho Chehab
  2012-08-14 20:55 ` =?true?q?=5BPATCH=2006/12=5D=20=5Bmedia=5D=20move=20the=20remaining=20PCI=20devices=20to=20drivers/media/pci?= Mauro Carvalho Chehab
@ 2012-08-14 20:55 ` Mauro Carvalho Chehab
  2012-08-14 20:55 ` [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver Mauro Carvalho Chehab
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-14 20:55 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

We should keep just the I2C drivers under drivers/media/video, and
then rename it to drivers/media/i2c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/Kconfig           |    1 +
 drivers/media/Makefile          |    8 +-
 drivers/media/parport/Kconfig   |   47 ++
 drivers/media/parport/Makefile  |    4 +
 drivers/media/parport/bw-qcam.c | 1113 +++++++++++++++++++++++++++++++++++++
 drivers/media/parport/c-qcam.c  |  883 ++++++++++++++++++++++++++++++
 drivers/media/parport/pms.c     | 1152 +++++++++++++++++++++++++++++++++++++++
 drivers/media/parport/w9966.c   |  981 +++++++++++++++++++++++++++++++++
 drivers/media/video/Kconfig     |   61 ---
 drivers/media/video/Makefile    |    4 -
 drivers/media/video/bw-qcam.c   | 1113 -------------------------------------
 drivers/media/video/c-qcam.c    |  883 ------------------------------
 drivers/media/video/pms.c       | 1152 ---------------------------------------
 drivers/media/video/w9966.c     |  981 ---------------------------------
 14 files changed, 4185 insertions(+), 4198 deletions(-)
 create mode 100644 drivers/media/parport/Kconfig
 create mode 100644 drivers/media/parport/Makefile
 create mode 100644 drivers/media/parport/bw-qcam.c
 create mode 100644 drivers/media/parport/c-qcam.c
 create mode 100644 drivers/media/parport/pms.c
 create mode 100644 drivers/media/parport/w9966.c
 delete mode 100644 drivers/media/video/bw-qcam.c
 delete mode 100644 drivers/media/video/c-qcam.c
 delete mode 100644 drivers/media/video/pms.c
 delete mode 100644 drivers/media/video/w9966.c

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 7970c24..c6d8658 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -164,6 +164,7 @@ source "drivers/media/dvb-core/Kconfig"
 source "drivers/media/pci/Kconfig"
 source "drivers/media/usb/Kconfig"
 source "drivers/media/mmc/Kconfig"
+source "drivers/media/parport/Kconfig"
 
 comment "Supported FireWire (IEEE 1394) Adapters"
 	depends on DVB_CORE && FIREWIRE
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index 3265a9a..360c44d 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -8,8 +8,8 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
   obj-$(CONFIG_MEDIA_SUPPORT) += media.o
 endif
 
-obj-y += v4l2-core/ tuners/ common/ rc/ video/
+obj-y += tuners/ common/ rc/ video/
+obj-y += pci/ usb/ mmc/ firewire/ parport/
 
-obj-$(CONFIG_VIDEO_DEV) += radio/
-obj-$(CONFIG_DVB_CORE)  += dvb-core/ pci/ dvb-frontends/ usb/ mmc/
-obj-$(CONFIG_DVB_FIREDTV) += firewire/
+obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
+obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/
diff --git a/drivers/media/parport/Kconfig b/drivers/media/parport/Kconfig
new file mode 100644
index 0000000..48138fe
--- /dev/null
+++ b/drivers/media/parport/Kconfig
@@ -0,0 +1,47 @@
+menu "V4L ISA and parallel port devices"
+	visible if (ISA || PARPORT) && MEDIA_CAMERA_SUPPORT
+
+config VIDEO_BWQCAM
+	tristate "Quickcam BW Video For Linux"
+	depends on PARPORT && VIDEO_V4L2
+	help
+	  Say Y have if you the black and white version of the QuickCam
+	  camera. See the next option for the color version.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called bw-qcam.
+
+config VIDEO_CQCAM
+	tristate "QuickCam Colour Video For Linux"
+	depends on PARPORT && VIDEO_V4L2
+	help
+	  This is the video4linux driver for the colour version of the
+	  Connectix QuickCam.  If you have one of these cameras, say Y here,
+	  otherwise say N.  This driver does not work with the original
+	  monochrome QuickCam, QuickCam VC or QuickClip.  It is also available
+	  as a module (c-qcam).
+	  Read <file:Documentation/video4linux/CQcam.txt> for more information.
+
+config VIDEO_PMS
+	tristate "Mediavision Pro Movie Studio Video For Linux"
+	depends on ISA && VIDEO_V4L2
+	help
+	  Say Y if you have the ISA Mediavision Pro Movie Studio
+	  capture card.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called pms.
+
+config VIDEO_W9966
+	tristate "W9966CF Webcam (FlyCam Supra and others) Video For Linux"
+	depends on PARPORT_1284 && PARPORT && VIDEO_V4L2
+	help
+	  Video4linux driver for Winbond's w9966 based Webcams.
+	  Currently tested with the LifeView FlyCam Supra.
+	  If you have one of these cameras, say Y here
+	  otherwise say N.
+	  This driver is also available as a module (w9966).
+
+	  Check out <file:Documentation/video4linux/w9966.txt> for more
+	  information.
+endmenu
diff --git a/drivers/media/parport/Makefile b/drivers/media/parport/Makefile
new file mode 100644
index 0000000..4eea06d
--- /dev/null
+++ b/drivers/media/parport/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
+obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
+obj-$(CONFIG_VIDEO_W9966) += w9966.o
+obj-$(CONFIG_VIDEO_PMS) += pms.o
diff --git a/drivers/media/parport/bw-qcam.c b/drivers/media/parport/bw-qcam.c
new file mode 100644
index 0000000..5b75a64
--- /dev/null
+++ b/drivers/media/parport/bw-qcam.c
@@ -0,0 +1,1113 @@
+/*
+ *    QuickCam Driver For Video4Linux.
+ *
+ *	Video4Linux conversion work by Alan Cox.
+ *	Parport compatibility by Phil Blundell.
+ *	Busy loop avoidance by Mark Cooke.
+ *
+ *    Module parameters:
+ *
+ *	maxpoll=<1 - 5000>
+ *
+ *	  When polling the QuickCam for a response, busy-wait for a
+ *	  maximum of this many loops. The default of 250 gives little
+ *	  impact on interactive response.
+ *
+ *	  NOTE: If this parameter is set too high, the processor
+ *		will busy wait until this loop times out, and then
+ *		slowly poll for a further 5 seconds before failing
+ *		the transaction. You have been warned.
+ *
+ *	yieldlines=<1 - 250>
+ *
+ *	  When acquiring a frame from the camera, the data gathering
+ *	  loop will yield back to the scheduler after completing
+ *	  this many lines. The default of 4 provides a trade-off
+ *	  between increased frame acquisition time and impact on
+ *	  interactive response.
+ */
+
+/* qcam-lib.c -- Library for programming with the Connectix QuickCam.
+ * See the included documentation for usage instructions and details
+ * of the protocol involved. */
+
+
+/* Version 0.5, August 4, 1996 */
+/* Version 0.7, August 27, 1996 */
+/* Version 0.9, November 17, 1996 */
+
+
+/******************************************************************
+
+Copyright (C) 1996 by Scott Laird
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL SCOTT LAIRD BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/fs.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/mm.h>
+#include <linux/parport.h>
+#include <linux/sched.h>
+#include <linux/videodev2.h>
+#include <linux/mutex.h>
+#include <asm/uaccess.h>
+#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
+#include <media/v4l2-device.h>
+#include <media/v4l2-fh.h>
+#include <media/v4l2-ctrls.h>
+#include <media/v4l2-event.h>
+
+/* One from column A... */
+#define QC_NOTSET 0
+#define QC_UNIDIR 1
+#define QC_BIDIR  2
+#define QC_SERIAL 3
+
+/* ... and one from column B */
+#define QC_ANY          0x00
+#define QC_FORCE_UNIDIR 0x10
+#define QC_FORCE_BIDIR  0x20
+#define QC_FORCE_SERIAL 0x30
+/* in the port_mode member */
+
+#define QC_MODE_MASK    0x07
+#define QC_FORCE_MASK   0x70
+
+#define MAX_HEIGHT 243
+#define MAX_WIDTH 336
+
+/* Bit fields for status flags */
+#define QC_PARAM_CHANGE	0x01 /* Camera status change has occurred */
+
+struct qcam {
+	struct v4l2_device v4l2_dev;
+	struct video_device vdev;
+	struct v4l2_ctrl_handler hdl;
+	struct pardevice *pdev;
+	struct parport *pport;
+	struct mutex lock;
+	int width, height;
+	int bpp;
+	int mode;
+	int contrast, brightness, whitebal;
+	int port_mode;
+	int transfer_scale;
+	int top, left;
+	int status;
+	unsigned int saved_bits;
+	unsigned long in_use;
+};
+
+static unsigned int maxpoll = 250;   /* Maximum busy-loop count for qcam I/O */
+static unsigned int yieldlines = 4;  /* Yield after this many during capture */
+static int video_nr = -1;
+static unsigned int force_init;		/* Whether to probe aggressively */
+
+module_param(maxpoll, int, 0);
+module_param(yieldlines, int, 0);
+module_param(video_nr, int, 0);
+
+/* Set force_init=1 to avoid detection by polling status register and
+ * immediately attempt to initialize qcam */
+module_param(force_init, int, 0);
+
+#define MAX_CAMS 4
+static struct qcam *qcams[MAX_CAMS];
+static unsigned int num_cams;
+
+static inline int read_lpstatus(struct qcam *q)
+{
+	return parport_read_status(q->pport);
+}
+
+static inline int read_lpdata(struct qcam *q)
+{
+	return parport_read_data(q->pport);
+}
+
+static inline void write_lpdata(struct qcam *q, int d)
+{
+	parport_write_data(q->pport, d);
+}
+
+static void write_lpcontrol(struct qcam *q, int d)
+{
+	if (d & 0x20) {
+		/* Set bidirectional mode to reverse (data in) */
+		parport_data_reverse(q->pport);
+	} else {
+		/* Set bidirectional mode to forward (data out) */
+		parport_data_forward(q->pport);
+	}
+
+	/* Now issue the regular port command, but strip out the
+	 * direction flag */
+	d &= ~0x20;
+	parport_write_control(q->pport, d);
+}
+
+
+/* qc_waithand busy-waits for a handshake signal from the QuickCam.
+ * Almost all communication with the camera requires handshaking. */
+
+static int qc_waithand(struct qcam *q, int val)
+{
+	int status;
+	int runs = 0;
+
+	if (val) {
+		while (!((status = read_lpstatus(q)) & 8)) {
+			/* 1000 is enough spins on the I/O for all normal
+			   cases, at that point we start to poll slowly
+			   until the camera wakes up. However, we are
+			   busy blocked until the camera responds, so
+			   setting it lower is much better for interactive
+			   response. */
+
+			if (runs++ > maxpoll)
+				msleep_interruptible(5);
+			if (runs > (maxpoll + 1000)) /* 5 seconds */
+				return -1;
+		}
+	} else {
+		while (((status = read_lpstatus(q)) & 8)) {
+			/* 1000 is enough spins on the I/O for all normal
+			   cases, at that point we start to poll slowly
+			   until the camera wakes up. However, we are
+			   busy blocked until the camera responds, so
+			   setting it lower is much better for interactive
+			   response. */
+
+			if (runs++ > maxpoll)
+				msleep_interruptible(5);
+			if (runs++ > (maxpoll + 1000)) /* 5 seconds */
+				return -1;
+		}
+	}
+
+	return status;
+}
+
+/* Waithand2 is used when the qcam is in bidirectional mode, and the
+ * handshaking signal is CamRdy2 (bit 0 of data reg) instead of CamRdy1
+ * (bit 3 of status register).  It also returns the last value read,
+ * since this data is useful. */
+
+static unsigned int qc_waithand2(struct qcam *q, int val)
+{
+	unsigned int status;
+	int runs = 0;
+
+	do {
+		status = read_lpdata(q);
+		/* 1000 is enough spins on the I/O for all normal
+		   cases, at that point we start to poll slowly
+		   until the camera wakes up. However, we are
+		   busy blocked until the camera responds, so
+		   setting it lower is much better for interactive
+		   response. */
+
+		if (runs++ > maxpoll)
+			msleep_interruptible(5);
+		if (runs++ > (maxpoll + 1000)) /* 5 seconds */
+			return 0;
+	} while ((status & 1) != val);
+
+	return status;
+}
+
+/* qc_command is probably a bit of a misnomer -- it's used to send
+ * bytes *to* the camera.  Generally, these bytes are either commands
+ * or arguments to commands, so the name fits, but it still bugs me a
+ * bit.  See the documentation for a list of commands. */
+
+static int qc_command(struct qcam *q, int command)
+{
+	int n1, n2;
+	int cmd;
+
+	write_lpdata(q, command);
+	write_lpcontrol(q, 6);
+
+	n1 = qc_waithand(q, 1);
+
+	write_lpcontrol(q, 0xe);
+	n2 = qc_waithand(q, 0);
+
+	cmd = (n1 & 0xf0) | ((n2 & 0xf0) >> 4);
+	return cmd;
+}
+
+static int qc_readparam(struct qcam *q)
+{
+	int n1, n2;
+	int cmd;
+
+	write_lpcontrol(q, 6);
+	n1 = qc_waithand(q, 1);
+
+	write_lpcontrol(q, 0xe);
+	n2 = qc_waithand(q, 0);
+
+	cmd = (n1 & 0xf0) | ((n2 & 0xf0) >> 4);
+	return cmd;
+}
+
+
+/* Try to detect a QuickCam.  It appears to flash the upper 4 bits of
+   the status register at 5-10 Hz.  This is only used in the autoprobe
+   code.  Be aware that this isn't the way Connectix detects the
+   camera (they send a reset and try to handshake), but this should be
+   almost completely safe, while their method screws up my printer if
+   I plug it in before the camera. */
+
+static int qc_detect(struct qcam *q)
+{
+	int reg, lastreg;
+	int count = 0;
+	int i;
+
+	if (force_init)
+		return 1;
+
+	lastreg = reg = read_lpstatus(q) & 0xf0;
+
+	for (i = 0; i < 500; i++) {
+		reg = read_lpstatus(q) & 0xf0;
+		if (reg != lastreg)
+			count++;
+		lastreg = reg;
+		mdelay(2);
+	}
+
+
+#if 0
+	/* Force camera detection during testing. Sometimes the camera
+	   won't be flashing these bits. Possibly unloading the module
+	   in the middle of a grab? Or some timeout condition?
+	   I've seen this parameter as low as 19 on my 450Mhz box - mpc */
+	printk(KERN_DEBUG "Debugging: QCam detection counter <30-200 counts as detected>: %d\n", count);
+	return 1;
+#endif
+
+	/* Be (even more) liberal in what you accept...  */
+
+	if (count > 20 && count < 400) {
+		return 1;	/* found */
+	} else {
+		printk(KERN_ERR "No Quickcam found on port %s\n",
+				q->pport->name);
+		printk(KERN_DEBUG "Quickcam detection counter: %u\n", count);
+		return 0;	/* not found */
+	}
+}
+
+/* Decide which scan mode to use.  There's no real requirement that
+ * the scanmode match the resolution in q->height and q-> width -- the
+ * camera takes the picture at the resolution specified in the
+ * "scanmode" and then returns the image at the resolution specified
+ * with the resolution commands.  If the scan is bigger than the
+ * requested resolution, the upper-left hand corner of the scan is
+ * returned.  If the scan is smaller, then the rest of the image
+ * returned contains garbage. */
+
+static int qc_setscanmode(struct qcam *q)
+{
+	int old_mode = q->mode;
+
+	switch (q->transfer_scale) {
+	case 1:
+		q->mode = 0;
+		break;
+	case 2:
+		q->mode = 4;
+		break;
+	case 4:
+		q->mode = 8;
+		break;
+	}
+
+	switch (q->bpp) {
+	case 4:
+		break;
+	case 6:
+		q->mode += 2;
+		break;
+	}
+
+	switch (q->port_mode & QC_MODE_MASK) {
+	case QC_BIDIR:
+		q->mode += 1;
+		break;
+	case QC_NOTSET:
+	case QC_UNIDIR:
+		break;
+	}
+
+	if (q->mode != old_mode)
+		q->status |= QC_PARAM_CHANGE;
+
+	return 0;
+}
+
+
+/* Reset the QuickCam.  This uses the same sequence the Windows
+ * QuickPic program uses.  Someone with a bi-directional port should
+ * check that bi-directional mode is detected right, and then
+ * implement bi-directional mode in qc_readbyte(). */
+
+static void qc_reset(struct qcam *q)
+{
+	switch (q->port_mode & QC_FORCE_MASK) {
+	case QC_FORCE_UNIDIR:
+		q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_UNIDIR;
+		break;
+
+	case QC_FORCE_BIDIR:
+		q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_BIDIR;
+		break;
+
+	case QC_ANY:
+		write_lpcontrol(q, 0x20);
+		write_lpdata(q, 0x75);
+
+		if (read_lpdata(q) != 0x75)
+			q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_BIDIR;
+		else
+			q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_UNIDIR;
+		break;
+	}
+
+	write_lpcontrol(q, 0xb);
+	udelay(250);
+	write_lpcontrol(q, 0xe);
+	qc_setscanmode(q);		/* in case port_mode changed */
+}
+
+
+
+/* Reset the QuickCam and program for brightness, contrast,
+ * white-balance, and resolution. */
+
+static void qc_set(struct qcam *q)
+{
+	int val;
+	int val2;
+
+	qc_reset(q);
+
+	/* Set the brightness.  Yes, this is repetitive, but it works.
+	 * Shorter versions seem to fail subtly.  Feel free to try :-). */
+	/* I think the problem was in qc_command, not here -- bls */
+
+	qc_command(q, 0xb);
+	qc_command(q, q->brightness);
+
+	val = q->height / q->transfer_scale;
+	qc_command(q, 0x11);
+	qc_command(q, val);
+	if ((q->port_mode & QC_MODE_MASK) == QC_UNIDIR && q->bpp == 6) {
+		/* The normal "transfers per line" calculation doesn't seem to work
+		   as expected here (and yet it works fine in qc_scan).  No idea
+		   why this case is the odd man out.  Fortunately, Laird's original
+		   working version gives me a good way to guess at working values.
+		   -- bls */
+		val = q->width;
+		val2 = q->transfer_scale * 4;
+	} else {
+		val = q->width * q->bpp;
+		val2 = (((q->port_mode & QC_MODE_MASK) == QC_BIDIR) ? 24 : 8) *
+			q->transfer_scale;
+	}
+	val = DIV_ROUND_UP(val, val2);
+	qc_command(q, 0x13);
+	qc_command(q, val);
+
+	/* Setting top and left -- bls */
+	qc_command(q, 0xd);
+	qc_command(q, q->top);
+	qc_command(q, 0xf);
+	qc_command(q, q->left / 2);
+
+	qc_command(q, 0x19);
+	qc_command(q, q->contrast);
+	qc_command(q, 0x1f);
+	qc_command(q, q->whitebal);
+
+	/* Clear flag that we must update the grabbing parameters on the camera
+	   before we grab the next frame */
+	q->status &= (~QC_PARAM_CHANGE);
+}
+
+/* Qc_readbytes reads some bytes from the QC and puts them in
+   the supplied buffer.  It returns the number of bytes read,
+   or -1 on error. */
+
+static inline int qc_readbytes(struct qcam *q, char buffer[])
+{
+	int ret = 1;
+	unsigned int hi, lo;
+	unsigned int hi2, lo2;
+	static int state;
+
+	if (buffer == NULL) {
+		state = 0;
+		return 0;
+	}
+
+	switch (q->port_mode & QC_MODE_MASK) {
+	case QC_BIDIR:		/* Bi-directional Port */
+		write_lpcontrol(q, 0x26);
+		lo = (qc_waithand2(q, 1) >> 1);
+		hi = (read_lpstatus(q) >> 3) & 0x1f;
+		write_lpcontrol(q, 0x2e);
+		lo2 = (qc_waithand2(q, 0) >> 1);
+		hi2 = (read_lpstatus(q) >> 3) & 0x1f;
+		switch (q->bpp) {
+		case 4:
+			buffer[0] = lo & 0xf;
+			buffer[1] = ((lo & 0x70) >> 4) | ((hi & 1) << 3);
+			buffer[2] = (hi & 0x1e) >> 1;
+			buffer[3] = lo2 & 0xf;
+			buffer[4] = ((lo2 & 0x70) >> 4) | ((hi2 & 1) << 3);
+			buffer[5] = (hi2 & 0x1e) >> 1;
+			ret = 6;
+			break;
+		case 6:
+			buffer[0] = lo & 0x3f;
+			buffer[1] = ((lo & 0x40) >> 6) | (hi << 1);
+			buffer[2] = lo2 & 0x3f;
+			buffer[3] = ((lo2 & 0x40) >> 6) | (hi2 << 1);
+			ret = 4;
+			break;
+		}
+		break;
+
+	case QC_UNIDIR:	/* Unidirectional Port */
+		write_lpcontrol(q, 6);
+		lo = (qc_waithand(q, 1) & 0xf0) >> 4;
+		write_lpcontrol(q, 0xe);
+		hi = (qc_waithand(q, 0) & 0xf0) >> 4;
+
+		switch (q->bpp) {
+		case 4:
+			buffer[0] = lo;
+			buffer[1] = hi;
+			ret = 2;
+			break;
+		case 6:
+			switch (state) {
+			case 0:
+				buffer[0] = (lo << 2) | ((hi & 0xc) >> 2);
+				q->saved_bits = (hi & 3) << 4;
+				state = 1;
+				ret = 1;
+				break;
+			case 1:
+				buffer[0] = lo | q->saved_bits;
+				q->saved_bits = hi << 2;
+				state = 2;
+				ret = 1;
+				break;
+			case 2:
+				buffer[0] = ((lo & 0xc) >> 2) | q->saved_bits;
+				buffer[1] = ((lo & 3) << 4) | hi;
+				state = 0;
+				ret = 2;
+				break;
+			}
+			break;
+		}
+		break;
+	}
+	return ret;
+}
+
+/* requests a scan from the camera.  It sends the correct instructions
+ * to the camera and then reads back the correct number of bytes.  In
+ * previous versions of this routine the return structure contained
+ * the raw output from the camera, and there was a 'qc_convertscan'
+ * function that converted that to a useful format.  In version 0.3 I
+ * rolled qc_convertscan into qc_scan and now I only return the
+ * converted scan.  The format is just an one-dimensional array of
+ * characters, one for each pixel, with 0=black up to n=white, where
+ * n=2^(bit depth)-1.  Ask me for more details if you don't understand
+ * this. */
+
+static long qc_capture(struct qcam *q, char __user *buf, unsigned long len)
+{
+	int i, j, k, yield;
+	int bytes;
+	int linestotrans, transperline;
+	int divisor;
+	int pixels_per_line;
+	int pixels_read = 0;
+	int got = 0;
+	char buffer[6];
+	int  shift = 8 - q->bpp;
+	char invert;
+
+	if (q->mode == -1)
+		return -ENXIO;
+
+	qc_command(q, 0x7);
+	qc_command(q, q->mode);
+
+	if ((q->port_mode & QC_MODE_MASK) == QC_BIDIR) {
+		write_lpcontrol(q, 0x2e);	/* turn port around */
+		write_lpcontrol(q, 0x26);
+		qc_waithand(q, 1);
+		write_lpcontrol(q, 0x2e);
+		qc_waithand(q, 0);
+	}
+
+	/* strange -- should be 15:63 below, but 4bpp is odd */
+	invert = (q->bpp == 4) ? 16 : 63;
+
+	linestotrans = q->height / q->transfer_scale;
+	pixels_per_line = q->width / q->transfer_scale;
+	transperline = q->width * q->bpp;
+	divisor = (((q->port_mode & QC_MODE_MASK) == QC_BIDIR) ? 24 : 8) *
+		q->transfer_scale;
+	transperline = DIV_ROUND_UP(transperline, divisor);
+
+	for (i = 0, yield = yieldlines; i < linestotrans; i++) {
+		for (pixels_read = j = 0; j < transperline; j++) {
+			bytes = qc_readbytes(q, buffer);
+			for (k = 0; k < bytes && (pixels_read + k) < pixels_per_line; k++) {
+				int o;
+				if (buffer[k] == 0 && invert == 16) {
+					/* 4bpp is odd (again) -- inverter is 16, not 15, but output
+					   must be 0-15 -- bls */
+					buffer[k] = 16;
+				}
+				o = i * pixels_per_line + pixels_read + k;
+				if (o < len) {
+					u8 ch = invert - buffer[k];
+					got++;
+					put_user(ch << shift, buf + o);
+				}
+			}
+			pixels_read += bytes;
+		}
+		qc_readbytes(q, NULL);	/* reset state machine */
+
+		/* Grabbing an entire frame from the quickcam is a lengthy
+		   process. We don't (usually) want to busy-block the
+		   processor for the entire frame. yieldlines is a module
+		   parameter. If we yield every line, the minimum frame
+		   time will be 240 / 200 = 1.2 seconds. The compile-time
+		   default is to yield every 4 lines. */
+		if (i >= yield) {
+			msleep_interruptible(5);
+			yield = i + yieldlines;
+		}
+	}
+
+	if ((q->port_mode & QC_MODE_MASK) == QC_BIDIR) {
+		write_lpcontrol(q, 2);
+		write_lpcontrol(q, 6);
+		udelay(3);
+		write_lpcontrol(q, 0xe);
+	}
+	if (got < len)
+		return got;
+	return len;
+}
+
+/*
+ *	Video4linux interfacing
+ */
+
+static int qcam_querycap(struct file *file, void  *priv,
+					struct v4l2_capability *vcap)
+{
+	struct qcam *qcam = video_drvdata(file);
+
+	strlcpy(vcap->driver, qcam->v4l2_dev.name, sizeof(vcap->driver));
+	strlcpy(vcap->card, "Connectix B&W Quickcam", sizeof(vcap->card));
+	strlcpy(vcap->bus_info, qcam->pport->name, sizeof(vcap->bus_info));
+	vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
+	vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS;
+	return 0;
+}
+
+static int qcam_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
+{
+	if (vin->index > 0)
+		return -EINVAL;
+	strlcpy(vin->name, "Camera", sizeof(vin->name));
+	vin->type = V4L2_INPUT_TYPE_CAMERA;
+	vin->audioset = 0;
+	vin->tuner = 0;
+	vin->std = 0;
+	vin->status = 0;
+	return 0;
+}
+
+static int qcam_g_input(struct file *file, void *fh, unsigned int *inp)
+{
+	*inp = 0;
+	return 0;
+}
+
+static int qcam_s_input(struct file *file, void *fh, unsigned int inp)
+{
+	return (inp > 0) ? -EINVAL : 0;
+}
+
+static int qcam_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct qcam *qcam = video_drvdata(file);
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+
+	pix->width = qcam->width / qcam->transfer_scale;
+	pix->height = qcam->height / qcam->transfer_scale;
+	pix->pixelformat = (qcam->bpp == 4) ? V4L2_PIX_FMT_Y4 : V4L2_PIX_FMT_Y6;
+	pix->field = V4L2_FIELD_NONE;
+	pix->bytesperline = pix->width;
+	pix->sizeimage = pix->width * pix->height;
+	/* Just a guess */
+	pix->colorspace = V4L2_COLORSPACE_SRGB;
+	return 0;
+}
+
+static int qcam_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+
+	if (pix->height <= 60 || pix->width <= 80) {
+		pix->height = 60;
+		pix->width = 80;
+	} else if (pix->height <= 120 || pix->width <= 160) {
+		pix->height = 120;
+		pix->width = 160;
+	} else {
+		pix->height = 240;
+		pix->width = 320;
+	}
+	if (pix->pixelformat != V4L2_PIX_FMT_Y4 &&
+	    pix->pixelformat != V4L2_PIX_FMT_Y6)
+		pix->pixelformat = V4L2_PIX_FMT_Y4;
+	pix->field = V4L2_FIELD_NONE;
+	pix->bytesperline = pix->width;
+	pix->sizeimage = pix->width * pix->height;
+	/* Just a guess */
+	pix->colorspace = V4L2_COLORSPACE_SRGB;
+	return 0;
+}
+
+static int qcam_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct qcam *qcam = video_drvdata(file);
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+	int ret = qcam_try_fmt_vid_cap(file, fh, fmt);
+
+	if (ret)
+		return ret;
+	qcam->width = 320;
+	qcam->height = 240;
+	if (pix->height == 60)
+		qcam->transfer_scale = 4;
+	else if (pix->height == 120)
+		qcam->transfer_scale = 2;
+	else
+		qcam->transfer_scale = 1;
+	if (pix->pixelformat == V4L2_PIX_FMT_Y6)
+		qcam->bpp = 6;
+	else
+		qcam->bpp = 4;
+
+	mutex_lock(&qcam->lock);
+	qc_setscanmode(qcam);
+	/* We must update the camera before we grab. We could
+	   just have changed the grab size */
+	qcam->status |= QC_PARAM_CHANGE;
+	mutex_unlock(&qcam->lock);
+	return 0;
+}
+
+static int qcam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt)
+{
+	static struct v4l2_fmtdesc formats[] = {
+		{ 0, 0, 0,
+		  "4-Bit Monochrome", V4L2_PIX_FMT_Y4,
+		  { 0, 0, 0, 0 }
+		},
+		{ 1, 0, 0,
+		  "6-Bit Monochrome", V4L2_PIX_FMT_Y6,
+		  { 0, 0, 0, 0 }
+		},
+	};
+	enum v4l2_buf_type type = fmt->type;
+
+	if (fmt->index > 1)
+		return -EINVAL;
+
+	*fmt = formats[fmt->index];
+	fmt->type = type;
+	return 0;
+}
+
+static int qcam_enum_framesizes(struct file *file, void *fh,
+					 struct v4l2_frmsizeenum *fsize)
+{
+	static const struct v4l2_frmsize_discrete sizes[] = {
+		{  80,  60 },
+		{ 160, 120 },
+		{ 320, 240 },
+	};
+
+	if (fsize->index > 2)
+		return -EINVAL;
+	if (fsize->pixel_format != V4L2_PIX_FMT_Y4 &&
+	    fsize->pixel_format != V4L2_PIX_FMT_Y6)
+		return -EINVAL;
+	fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+	fsize->discrete = sizes[fsize->index];
+	return 0;
+}
+
+static ssize_t qcam_read(struct file *file, char __user *buf,
+		size_t count, loff_t *ppos)
+{
+	struct qcam *qcam = video_drvdata(file);
+	int len;
+	parport_claim_or_block(qcam->pdev);
+
+	mutex_lock(&qcam->lock);
+
+	qc_reset(qcam);
+
+	/* Update the camera parameters if we need to */
+	if (qcam->status & QC_PARAM_CHANGE)
+		qc_set(qcam);
+
+	len = qc_capture(qcam, buf, count);
+
+	mutex_unlock(&qcam->lock);
+
+	parport_release(qcam->pdev);
+	return len;
+}
+
+static unsigned int qcam_poll(struct file *filp, poll_table *wait)
+{
+	return v4l2_ctrl_poll(filp, wait) | POLLIN | POLLRDNORM;
+}
+
+static int qcam_s_ctrl(struct v4l2_ctrl *ctrl)
+{
+	struct qcam *qcam =
+		container_of(ctrl->handler, struct qcam, hdl);
+	int ret = 0;
+
+	mutex_lock(&qcam->lock);
+	switch (ctrl->id) {
+	case V4L2_CID_BRIGHTNESS:
+		qcam->brightness = ctrl->val;
+		break;
+	case V4L2_CID_CONTRAST:
+		qcam->contrast = ctrl->val;
+		break;
+	case V4L2_CID_GAMMA:
+		qcam->whitebal = ctrl->val;
+		break;
+	default:
+		ret = -EINVAL;
+		break;
+	}
+	if (ret == 0) {
+		qc_setscanmode(qcam);
+		qcam->status |= QC_PARAM_CHANGE;
+	}
+	mutex_unlock(&qcam->lock);
+	return ret;
+}
+
+static const struct v4l2_file_operations qcam_fops = {
+	.owner		= THIS_MODULE,
+	.open		= v4l2_fh_open,
+	.release	= v4l2_fh_release,
+	.poll		= qcam_poll,
+	.unlocked_ioctl = video_ioctl2,
+	.read		= qcam_read,
+};
+
+static const struct v4l2_ioctl_ops qcam_ioctl_ops = {
+	.vidioc_querycap    		    = qcam_querycap,
+	.vidioc_g_input      		    = qcam_g_input,
+	.vidioc_s_input      		    = qcam_s_input,
+	.vidioc_enum_input   		    = qcam_enum_input,
+	.vidioc_enum_fmt_vid_cap 	    = qcam_enum_fmt_vid_cap,
+	.vidioc_enum_framesizes		    = qcam_enum_framesizes,
+	.vidioc_g_fmt_vid_cap 		    = qcam_g_fmt_vid_cap,
+	.vidioc_s_fmt_vid_cap  		    = qcam_s_fmt_vid_cap,
+	.vidioc_try_fmt_vid_cap  	    = qcam_try_fmt_vid_cap,
+	.vidioc_log_status		    = v4l2_ctrl_log_status,
+	.vidioc_subscribe_event		    = v4l2_ctrl_subscribe_event,
+	.vidioc_unsubscribe_event	    = v4l2_event_unsubscribe,
+};
+
+static const struct v4l2_ctrl_ops qcam_ctrl_ops = {
+	.s_ctrl = qcam_s_ctrl,
+};
+
+/* Initialize the QuickCam driver control structure.  This is where
+ * defaults are set for people who don't have a config file.*/
+
+static struct qcam *qcam_init(struct parport *port)
+{
+	struct qcam *qcam;
+	struct v4l2_device *v4l2_dev;
+
+	qcam = kzalloc(sizeof(struct qcam), GFP_KERNEL);
+	if (qcam == NULL)
+		return NULL;
+
+	v4l2_dev = &qcam->v4l2_dev;
+	snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "bw-qcam%d", num_cams);
+
+	if (v4l2_device_register(port->dev, v4l2_dev) < 0) {
+		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
+		kfree(qcam);
+		return NULL;
+	}
+
+	v4l2_ctrl_handler_init(&qcam->hdl, 3);
+	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
+			  V4L2_CID_BRIGHTNESS, 0, 255, 1, 180);
+	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
+			  V4L2_CID_CONTRAST, 0, 255, 1, 192);
+	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
+			  V4L2_CID_GAMMA, 0, 255, 1, 105);
+	if (qcam->hdl.error) {
+		v4l2_err(v4l2_dev, "couldn't register controls\n");
+		v4l2_ctrl_handler_free(&qcam->hdl);
+		kfree(qcam);
+		return NULL;
+	}
+	qcam->pport = port;
+	qcam->pdev = parport_register_device(port, v4l2_dev->name, NULL, NULL,
+			NULL, 0, NULL);
+	if (qcam->pdev == NULL) {
+		v4l2_err(v4l2_dev, "couldn't register for %s.\n", port->name);
+		v4l2_ctrl_handler_free(&qcam->hdl);
+		kfree(qcam);
+		return NULL;
+	}
+
+	strlcpy(qcam->vdev.name, "Connectix QuickCam", sizeof(qcam->vdev.name));
+	qcam->vdev.v4l2_dev = v4l2_dev;
+	qcam->vdev.ctrl_handler = &qcam->hdl;
+	qcam->vdev.fops = &qcam_fops;
+	qcam->vdev.ioctl_ops = &qcam_ioctl_ops;
+	set_bit(V4L2_FL_USE_FH_PRIO, &qcam->vdev.flags);
+	qcam->vdev.release = video_device_release_empty;
+	video_set_drvdata(&qcam->vdev, qcam);
+
+	mutex_init(&qcam->lock);
+
+	qcam->port_mode = (QC_ANY | QC_NOTSET);
+	qcam->width = 320;
+	qcam->height = 240;
+	qcam->bpp = 4;
+	qcam->transfer_scale = 2;
+	qcam->contrast = 192;
+	qcam->brightness = 180;
+	qcam->whitebal = 105;
+	qcam->top = 1;
+	qcam->left = 14;
+	qcam->mode = -1;
+	qcam->status = QC_PARAM_CHANGE;
+	return qcam;
+}
+
+static int qc_calibrate(struct qcam *q)
+{
+	/*
+	 *	Bugfix by Hanno Mueller hmueller@kabel.de, Mai 21 96
+	 *	The white balance is an individual value for each
+	 *	quickcam.
+	 */
+
+	int value;
+	int count = 0;
+
+	qc_command(q, 27);	/* AutoAdjustOffset */
+	qc_command(q, 0);	/* Dummy Parameter, ignored by the camera */
+
+	/* GetOffset (33) will read 255 until autocalibration */
+	/* is finished. After that, a value of 1-254 will be */
+	/* returned. */
+
+	do {
+		qc_command(q, 33);
+		value = qc_readparam(q);
+		mdelay(1);
+		schedule();
+		count++;
+	} while (value == 0xff && count < 2048);
+
+	q->whitebal = value;
+	return value;
+}
+
+static int init_bwqcam(struct parport *port)
+{
+	struct qcam *qcam;
+
+	if (num_cams == MAX_CAMS) {
+		printk(KERN_ERR "Too many Quickcams (max %d)\n", MAX_CAMS);
+		return -ENOSPC;
+	}
+
+	qcam = qcam_init(port);
+	if (qcam == NULL)
+		return -ENODEV;
+
+	parport_claim_or_block(qcam->pdev);
+
+	qc_reset(qcam);
+
+	if (qc_detect(qcam) == 0) {
+		parport_release(qcam->pdev);
+		parport_unregister_device(qcam->pdev);
+		kfree(qcam);
+		return -ENODEV;
+	}
+	qc_calibrate(qcam);
+	v4l2_ctrl_handler_setup(&qcam->hdl);
+
+	parport_release(qcam->pdev);
+
+	v4l2_info(&qcam->v4l2_dev, "Connectix Quickcam on %s\n", qcam->pport->name);
+
+	if (video_register_device(&qcam->vdev, VFL_TYPE_GRABBER, video_nr) < 0) {
+		parport_unregister_device(qcam->pdev);
+		kfree(qcam);
+		return -ENODEV;
+	}
+
+	qcams[num_cams++] = qcam;
+
+	return 0;
+}
+
+static void close_bwqcam(struct qcam *qcam)
+{
+	video_unregister_device(&qcam->vdev);
+	v4l2_ctrl_handler_free(&qcam->hdl);
+	parport_unregister_device(qcam->pdev);
+	kfree(qcam);
+}
+
+/* The parport parameter controls which parports will be scanned.
+ * Scanning all parports causes some printers to print a garbage page.
+ *       -- March 14, 1999  Billy Donahue <billy@escape.com> */
+#ifdef MODULE
+static char *parport[MAX_CAMS] = { NULL, };
+module_param_array(parport, charp, NULL, 0);
+#endif
+
+static int accept_bwqcam(struct parport *port)
+{
+#ifdef MODULE
+	int n;
+
+	if (parport[0] && strncmp(parport[0], "auto", 4) != 0) {
+		/* user gave parport parameters */
+		for (n = 0; n < MAX_CAMS && parport[n]; n++) {
+			char *ep;
+			unsigned long r;
+			r = simple_strtoul(parport[n], &ep, 0);
+			if (ep == parport[n]) {
+				printk(KERN_ERR
+					"bw-qcam: bad port specifier \"%s\"\n",
+					parport[n]);
+				continue;
+			}
+			if (r == port->number)
+				return 1;
+		}
+		return 0;
+	}
+#endif
+	return 1;
+}
+
+static void bwqcam_attach(struct parport *port)
+{
+	if (accept_bwqcam(port))
+		init_bwqcam(port);
+}
+
+static void bwqcam_detach(struct parport *port)
+{
+	int i;
+	for (i = 0; i < num_cams; i++) {
+		struct qcam *qcam = qcams[i];
+		if (qcam && qcam->pdev->port == port) {
+			qcams[i] = NULL;
+			close_bwqcam(qcam);
+		}
+	}
+}
+
+static struct parport_driver bwqcam_driver = {
+	.name	= "bw-qcam",
+	.attach	= bwqcam_attach,
+	.detach	= bwqcam_detach,
+};
+
+static void __exit exit_bw_qcams(void)
+{
+	parport_unregister_driver(&bwqcam_driver);
+}
+
+static int __init init_bw_qcams(void)
+{
+#ifdef MODULE
+	/* Do some sanity checks on the module parameters. */
+	if (maxpoll > 5000) {
+		printk(KERN_INFO "Connectix Quickcam max-poll was above 5000. Using 5000.\n");
+		maxpoll = 5000;
+	}
+
+	if (yieldlines < 1) {
+		printk(KERN_INFO "Connectix Quickcam yieldlines was less than 1. Using 1.\n");
+		yieldlines = 1;
+	}
+#endif
+	return parport_register_driver(&bwqcam_driver);
+}
+
+module_init(init_bw_qcams);
+module_exit(exit_bw_qcams);
+
+MODULE_LICENSE("GPL");
+MODULE_VERSION("0.0.3");
diff --git a/drivers/media/parport/c-qcam.c b/drivers/media/parport/c-qcam.c
new file mode 100644
index 0000000..ec51e1f
--- /dev/null
+++ b/drivers/media/parport/c-qcam.c
@@ -0,0 +1,883 @@
+/*
+ *	Video4Linux Colour QuickCam driver
+ *	Copyright 1997-2000 Philip Blundell <philb@gnu.org>
+ *
+ *    Module parameters:
+ *
+ *	parport=auto      -- probe all parports (default)
+ *	parport=0         -- parport0 becomes qcam1
+ *	parport=2,0,1     -- parports 2,0,1 are tried in that order
+ *
+ *	probe=0		  -- do no probing, assume camera is present
+ *	probe=1		  -- use IEEE-1284 autoprobe data only (default)
+ *	probe=2		  -- probe aggressively for cameras
+ *
+ *	force_rgb=1       -- force data format to RGB (default is BGR)
+ *
+ * The parport parameter controls which parports will be scanned.
+ * Scanning all parports causes some printers to print a garbage page.
+ *       -- March 14, 1999  Billy Donahue <billy@escape.com>
+ *
+ * Fixed data format to BGR, added force_rgb parameter. Added missing
+ * parport_unregister_driver() on module removal.
+ *       -- May 28, 2000  Claudio Matsuoka <claudio@conectiva.com>
+ */
+
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/mm.h>
+#include <linux/parport.h>
+#include <linux/sched.h>
+#include <linux/mutex.h>
+#include <linux/jiffies.h>
+#include <linux/videodev2.h>
+#include <asm/uaccess.h>
+#include <media/v4l2-device.h>
+#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
+#include <media/v4l2-fh.h>
+#include <media/v4l2-ctrls.h>
+#include <media/v4l2-event.h>
+
+struct qcam {
+	struct v4l2_device v4l2_dev;
+	struct video_device vdev;
+	struct v4l2_ctrl_handler hdl;
+	struct pardevice *pdev;
+	struct parport *pport;
+	int width, height;
+	int ccd_width, ccd_height;
+	int mode;
+	int contrast, brightness, whitebal;
+	int top, left;
+	unsigned int bidirectional;
+	struct mutex lock;
+};
+
+/* cameras maximum */
+#define MAX_CAMS 4
+
+/* The three possible QuickCam modes */
+#define QC_MILLIONS	0x18
+#define QC_BILLIONS	0x10
+#define QC_THOUSANDS	0x08	/* with VIDEC compression (not supported) */
+
+/* The three possible decimations */
+#define QC_DECIMATION_1		0
+#define QC_DECIMATION_2		2
+#define QC_DECIMATION_4		4
+
+#define BANNER "Colour QuickCam for Video4Linux v0.06"
+
+static int parport[MAX_CAMS] = { [1 ... MAX_CAMS-1] = -1 };
+static int probe = 2;
+static bool force_rgb;
+static int video_nr = -1;
+
+/* FIXME: parport=auto would never have worked, surely? --RR */
+MODULE_PARM_DESC(parport, "parport=<auto|n[,n]...> for port detection method\n"
+			  "probe=<0|1|2> for camera detection method\n"
+			  "force_rgb=<0|1> for RGB data format (default BGR)");
+module_param_array(parport, int, NULL, 0);
+module_param(probe, int, 0);
+module_param(force_rgb, bool, 0);
+module_param(video_nr, int, 0);
+
+static struct qcam *qcams[MAX_CAMS];
+static unsigned int num_cams;
+
+static inline void qcam_set_ack(struct qcam *qcam, unsigned int i)
+{
+	/* note: the QC specs refer to the PCAck pin by voltage, not
+	   software level.  PC ports have builtin inverters. */
+	parport_frob_control(qcam->pport, 8, i ? 8 : 0);
+}
+
+static inline unsigned int qcam_ready1(struct qcam *qcam)
+{
+	return (parport_read_status(qcam->pport) & 0x8) ? 1 : 0;
+}
+
+static inline unsigned int qcam_ready2(struct qcam *qcam)
+{
+	return (parport_read_data(qcam->pport) & 0x1) ? 1 : 0;
+}
+
+static unsigned int qcam_await_ready1(struct qcam *qcam, int value)
+{
+	struct v4l2_device *v4l2_dev = &qcam->v4l2_dev;
+	unsigned long oldjiffies = jiffies;
+	unsigned int i;
+
+	for (oldjiffies = jiffies;
+	     time_before(jiffies, oldjiffies + msecs_to_jiffies(40));)
+		if (qcam_ready1(qcam) == value)
+			return 0;
+
+	/* If the camera didn't respond within 1/25 second, poll slowly
+	   for a while. */
+	for (i = 0; i < 50; i++) {
+		if (qcam_ready1(qcam) == value)
+			return 0;
+		msleep_interruptible(100);
+	}
+
+	/* Probably somebody pulled the plug out.  Not much we can do. */
+	v4l2_err(v4l2_dev, "ready1 timeout (%d) %x %x\n", value,
+	       parport_read_status(qcam->pport),
+	       parport_read_control(qcam->pport));
+	return 1;
+}
+
+static unsigned int qcam_await_ready2(struct qcam *qcam, int value)
+{
+	struct v4l2_device *v4l2_dev = &qcam->v4l2_dev;
+	unsigned long oldjiffies = jiffies;
+	unsigned int i;
+
+	for (oldjiffies = jiffies;
+	     time_before(jiffies, oldjiffies + msecs_to_jiffies(40));)
+		if (qcam_ready2(qcam) == value)
+			return 0;
+
+	/* If the camera didn't respond within 1/25 second, poll slowly
+	   for a while. */
+	for (i = 0; i < 50; i++) {
+		if (qcam_ready2(qcam) == value)
+			return 0;
+		msleep_interruptible(100);
+	}
+
+	/* Probably somebody pulled the plug out.  Not much we can do. */
+	v4l2_err(v4l2_dev, "ready2 timeout (%d) %x %x %x\n", value,
+	       parport_read_status(qcam->pport),
+	       parport_read_control(qcam->pport),
+	       parport_read_data(qcam->pport));
+	return 1;
+}
+
+static int qcam_read_data(struct qcam *qcam)
+{
+	unsigned int idata;
+
+	qcam_set_ack(qcam, 0);
+	if (qcam_await_ready1(qcam, 1))
+		return -1;
+	idata = parport_read_status(qcam->pport) & 0xf0;
+	qcam_set_ack(qcam, 1);
+	if (qcam_await_ready1(qcam, 0))
+		return -1;
+	idata |= parport_read_status(qcam->pport) >> 4;
+	return idata;
+}
+
+static int qcam_write_data(struct qcam *qcam, unsigned int data)
+{
+	struct v4l2_device *v4l2_dev = &qcam->v4l2_dev;
+	unsigned int idata;
+
+	parport_write_data(qcam->pport, data);
+	idata = qcam_read_data(qcam);
+	if (data != idata) {
+		v4l2_warn(v4l2_dev, "sent %x but received %x\n", data,
+		       idata);
+		return 1;
+	}
+	return 0;
+}
+
+static inline int qcam_set(struct qcam *qcam, unsigned int cmd, unsigned int data)
+{
+	if (qcam_write_data(qcam, cmd))
+		return -1;
+	if (qcam_write_data(qcam, data))
+		return -1;
+	return 0;
+}
+
+static inline int qcam_get(struct qcam *qcam, unsigned int cmd)
+{
+	if (qcam_write_data(qcam, cmd))
+		return -1;
+	return qcam_read_data(qcam);
+}
+
+static int qc_detect(struct qcam *qcam)
+{
+	unsigned int stat, ostat, i, count = 0;
+
+	/* The probe routine below is not very reliable.  The IEEE-1284
+	   probe takes precedence. */
+	/* XXX Currently parport provides no way to distinguish between
+	   "the IEEE probe was not done" and "the probe was done, but
+	   no device was found".  Fix this one day. */
+	if (qcam->pport->probe_info[0].class == PARPORT_CLASS_MEDIA
+	    && qcam->pport->probe_info[0].model
+	    && !strcmp(qcam->pdev->port->probe_info[0].model,
+		       "Color QuickCam 2.0")) {
+		printk(KERN_DEBUG "QuickCam: Found by IEEE1284 probe.\n");
+		return 1;
+	}
+
+	if (probe < 2)
+		return 0;
+
+	parport_write_control(qcam->pport, 0xc);
+
+	/* look for a heartbeat */
+	ostat = stat = parport_read_status(qcam->pport);
+	for (i = 0; i < 250; i++) {
+		mdelay(1);
+		stat = parport_read_status(qcam->pport);
+		if (ostat != stat) {
+			if (++count >= 3)
+				return 1;
+			ostat = stat;
+		}
+	}
+
+	/* Reset the camera and try again */
+	parport_write_control(qcam->pport, 0xc);
+	parport_write_control(qcam->pport, 0x8);
+	mdelay(1);
+	parport_write_control(qcam->pport, 0xc);
+	mdelay(1);
+	count = 0;
+
+	ostat = stat = parport_read_status(qcam->pport);
+	for (i = 0; i < 250; i++) {
+		mdelay(1);
+		stat = parport_read_status(qcam->pport);
+		if (ostat != stat) {
+			if (++count >= 3)
+				return 1;
+			ostat = stat;
+		}
+	}
+
+	/* no (or flatline) camera, give up */
+	return 0;
+}
+
+static void qc_reset(struct qcam *qcam)
+{
+	parport_write_control(qcam->pport, 0xc);
+	parport_write_control(qcam->pport, 0x8);
+	mdelay(1);
+	parport_write_control(qcam->pport, 0xc);
+	mdelay(1);
+}
+
+/* Reset the QuickCam and program for brightness, contrast,
+ * white-balance, and resolution. */
+
+static void qc_setup(struct qcam *qcam)
+{
+	qc_reset(qcam);
+
+	/* Set the brightness. */
+	qcam_set(qcam, 11, qcam->brightness);
+
+	/* Set the height and width.  These refer to the actual
+	   CCD area *before* applying the selected decimation.  */
+	qcam_set(qcam, 17, qcam->ccd_height);
+	qcam_set(qcam, 19, qcam->ccd_width / 2);
+
+	/* Set top and left.  */
+	qcam_set(qcam, 0xd, qcam->top);
+	qcam_set(qcam, 0xf, qcam->left);
+
+	/* Set contrast and white balance.  */
+	qcam_set(qcam, 0x19, qcam->contrast);
+	qcam_set(qcam, 0x1f, qcam->whitebal);
+
+	/* Set the speed.  */
+	qcam_set(qcam, 45, 2);
+}
+
+/* Read some bytes from the camera and put them in the buffer.
+   nbytes should be a multiple of 3, because bidirectional mode gives
+   us three bytes at a time.  */
+
+static unsigned int qcam_read_bytes(struct qcam *qcam, unsigned char *buf, unsigned int nbytes)
+{
+	unsigned int bytes = 0;
+
+	qcam_set_ack(qcam, 0);
+	if (qcam->bidirectional) {
+		/* It's a bidirectional port */
+		while (bytes < nbytes) {
+			unsigned int lo1, hi1, lo2, hi2;
+			unsigned char r, g, b;
+
+			if (qcam_await_ready2(qcam, 1))
+				return bytes;
+			lo1 = parport_read_data(qcam->pport) >> 1;
+			hi1 = ((parport_read_status(qcam->pport) >> 3) & 0x1f) ^ 0x10;
+			qcam_set_ack(qcam, 1);
+			if (qcam_await_ready2(qcam, 0))
+				return bytes;
+			lo2 = parport_read_data(qcam->pport) >> 1;
+			hi2 = ((parport_read_status(qcam->pport) >> 3) & 0x1f) ^ 0x10;
+			qcam_set_ack(qcam, 0);
+			r = lo1 | ((hi1 & 1) << 7);
+			g = ((hi1 & 0x1e) << 3) | ((hi2 & 0x1e) >> 1);
+			b = lo2 | ((hi2 & 1) << 7);
+			if (force_rgb) {
+				buf[bytes++] = r;
+				buf[bytes++] = g;
+				buf[bytes++] = b;
+			} else {
+				buf[bytes++] = b;
+				buf[bytes++] = g;
+				buf[bytes++] = r;
+			}
+		}
+	} else {
+		/* It's a unidirectional port */
+		int i = 0, n = bytes;
+		unsigned char rgb[3];
+
+		while (bytes < nbytes) {
+			unsigned int hi, lo;
+
+			if (qcam_await_ready1(qcam, 1))
+				return bytes;
+			hi = (parport_read_status(qcam->pport) & 0xf0);
+			qcam_set_ack(qcam, 1);
+			if (qcam_await_ready1(qcam, 0))
+				return bytes;
+			lo = (parport_read_status(qcam->pport) & 0xf0);
+			qcam_set_ack(qcam, 0);
+			/* flip some bits */
+			rgb[(i = bytes++ % 3)] = (hi | (lo >> 4)) ^ 0x88;
+			if (i >= 2) {
+get_fragment:
+				if (force_rgb) {
+					buf[n++] = rgb[0];
+					buf[n++] = rgb[1];
+					buf[n++] = rgb[2];
+				} else {
+					buf[n++] = rgb[2];
+					buf[n++] = rgb[1];
+					buf[n++] = rgb[0];
+				}
+			}
+		}
+		if (i) {
+			i = 0;
+			goto get_fragment;
+		}
+	}
+	return bytes;
+}
+
+#define BUFSZ	150
+
+static long qc_capture(struct qcam *qcam, char __user *buf, unsigned long len)
+{
+	struct v4l2_device *v4l2_dev = &qcam->v4l2_dev;
+	unsigned lines, pixelsperline;
+	unsigned int is_bi_dir = qcam->bidirectional;
+	size_t wantlen, outptr = 0;
+	char tmpbuf[BUFSZ];
+
+	if (!access_ok(VERIFY_WRITE, buf, len))
+		return -EFAULT;
+
+	/* Wait for camera to become ready */
+	for (;;) {
+		int i = qcam_get(qcam, 41);
+
+		if (i == -1) {
+			qc_setup(qcam);
+			return -EIO;
+		}
+		if ((i & 0x80) == 0)
+			break;
+		schedule();
+	}
+
+	if (qcam_set(qcam, 7, (qcam->mode | (is_bi_dir ? 1 : 0)) + 1))
+		return -EIO;
+
+	lines = qcam->height;
+	pixelsperline = qcam->width;
+
+	if (is_bi_dir) {
+		/* Turn the port around */
+		parport_data_reverse(qcam->pport);
+		mdelay(3);
+		qcam_set_ack(qcam, 0);
+		if (qcam_await_ready1(qcam, 1)) {
+			qc_setup(qcam);
+			return -EIO;
+		}
+		qcam_set_ack(qcam, 1);
+		if (qcam_await_ready1(qcam, 0)) {
+			qc_setup(qcam);
+			return -EIO;
+		}
+	}
+
+	wantlen = lines * pixelsperline * 24 / 8;
+
+	while (wantlen) {
+		size_t t, s;
+
+		s = (wantlen > BUFSZ) ? BUFSZ : wantlen;
+		t = qcam_read_bytes(qcam, tmpbuf, s);
+		if (outptr < len) {
+			size_t sz = len - outptr;
+
+			if (sz > t)
+				sz = t;
+			if (__copy_to_user(buf + outptr, tmpbuf, sz))
+				break;
+			outptr += sz;
+		}
+		wantlen -= t;
+		if (t < s)
+			break;
+		cond_resched();
+	}
+
+	len = outptr;
+
+	if (wantlen) {
+		v4l2_err(v4l2_dev, "short read.\n");
+		if (is_bi_dir)
+			parport_data_forward(qcam->pport);
+		qc_setup(qcam);
+		return len;
+	}
+
+	if (is_bi_dir) {
+		int l;
+
+		do {
+			l = qcam_read_bytes(qcam, tmpbuf, 3);
+			cond_resched();
+		} while (l && (tmpbuf[0] == 0x7e || tmpbuf[1] == 0x7e || tmpbuf[2] == 0x7e));
+		if (force_rgb) {
+			if (tmpbuf[0] != 0xe || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xf)
+				v4l2_err(v4l2_dev, "bad EOF\n");
+		} else {
+			if (tmpbuf[0] != 0xf || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xe)
+				v4l2_err(v4l2_dev, "bad EOF\n");
+		}
+		qcam_set_ack(qcam, 0);
+		if (qcam_await_ready1(qcam, 1)) {
+			v4l2_err(v4l2_dev, "no ack after EOF\n");
+			parport_data_forward(qcam->pport);
+			qc_setup(qcam);
+			return len;
+		}
+		parport_data_forward(qcam->pport);
+		mdelay(3);
+		qcam_set_ack(qcam, 1);
+		if (qcam_await_ready1(qcam, 0)) {
+			v4l2_err(v4l2_dev, "no ack to port turnaround\n");
+			qc_setup(qcam);
+			return len;
+		}
+	} else {
+		int l;
+
+		do {
+			l = qcam_read_bytes(qcam, tmpbuf, 1);
+			cond_resched();
+		} while (l && tmpbuf[0] == 0x7e);
+		l = qcam_read_bytes(qcam, tmpbuf + 1, 2);
+		if (force_rgb) {
+			if (tmpbuf[0] != 0xe || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xf)
+				v4l2_err(v4l2_dev, "bad EOF\n");
+		} else {
+			if (tmpbuf[0] != 0xf || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xe)
+				v4l2_err(v4l2_dev, "bad EOF\n");
+		}
+	}
+
+	qcam_write_data(qcam, 0);
+	return len;
+}
+
+/*
+ *	Video4linux interfacing
+ */
+
+static int qcam_querycap(struct file *file, void  *priv,
+					struct v4l2_capability *vcap)
+{
+	struct qcam *qcam = video_drvdata(file);
+
+	strlcpy(vcap->driver, qcam->v4l2_dev.name, sizeof(vcap->driver));
+	strlcpy(vcap->card, "Color Quickcam", sizeof(vcap->card));
+	strlcpy(vcap->bus_info, "parport", sizeof(vcap->bus_info));
+	vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
+	vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS;
+	return 0;
+}
+
+static int qcam_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
+{
+	if (vin->index > 0)
+		return -EINVAL;
+	strlcpy(vin->name, "Camera", sizeof(vin->name));
+	vin->type = V4L2_INPUT_TYPE_CAMERA;
+	vin->audioset = 0;
+	vin->tuner = 0;
+	vin->std = 0;
+	vin->status = 0;
+	return 0;
+}
+
+static int qcam_g_input(struct file *file, void *fh, unsigned int *inp)
+{
+	*inp = 0;
+	return 0;
+}
+
+static int qcam_s_input(struct file *file, void *fh, unsigned int inp)
+{
+	return (inp > 0) ? -EINVAL : 0;
+}
+
+static int qcam_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct qcam *qcam = video_drvdata(file);
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+
+	pix->width = qcam->width;
+	pix->height = qcam->height;
+	pix->pixelformat = V4L2_PIX_FMT_RGB24;
+	pix->field = V4L2_FIELD_NONE;
+	pix->bytesperline = 3 * qcam->width;
+	pix->sizeimage = 3 * qcam->width * qcam->height;
+	/* Just a guess */
+	pix->colorspace = V4L2_COLORSPACE_SRGB;
+	return 0;
+}
+
+static int qcam_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+
+	if (pix->height < 60 || pix->width < 80) {
+		pix->height = 60;
+		pix->width = 80;
+	} else if (pix->height < 120 || pix->width < 160) {
+		pix->height = 120;
+		pix->width = 160;
+	} else {
+		pix->height = 240;
+		pix->width = 320;
+	}
+	pix->pixelformat = V4L2_PIX_FMT_RGB24;
+	pix->field = V4L2_FIELD_NONE;
+	pix->bytesperline = 3 * pix->width;
+	pix->sizeimage = 3 * pix->width * pix->height;
+	/* Just a guess */
+	pix->colorspace = V4L2_COLORSPACE_SRGB;
+	return 0;
+}
+
+static int qcam_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct qcam *qcam = video_drvdata(file);
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+	int ret = qcam_try_fmt_vid_cap(file, fh, fmt);
+
+	if (ret)
+		return ret;
+	switch (pix->height) {
+	case 60:
+		qcam->mode = QC_DECIMATION_4;
+		break;
+	case 120:
+		qcam->mode = QC_DECIMATION_2;
+		break;
+	default:
+		qcam->mode = QC_DECIMATION_1;
+		break;
+	}
+
+	mutex_lock(&qcam->lock);
+	qcam->mode |= QC_MILLIONS;
+	qcam->height = pix->height;
+	qcam->width = pix->width;
+	parport_claim_or_block(qcam->pdev);
+	qc_setup(qcam);
+	parport_release(qcam->pdev);
+	mutex_unlock(&qcam->lock);
+	return 0;
+}
+
+static int qcam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt)
+{
+	static struct v4l2_fmtdesc formats[] = {
+		{ 0, 0, 0,
+		  "RGB 8:8:8", V4L2_PIX_FMT_RGB24,
+		  { 0, 0, 0, 0 }
+		},
+	};
+	enum v4l2_buf_type type = fmt->type;
+
+	if (fmt->index > 0)
+		return -EINVAL;
+
+	*fmt = formats[fmt->index];
+	fmt->type = type;
+	return 0;
+}
+
+static ssize_t qcam_read(struct file *file, char __user *buf,
+			 size_t count, loff_t *ppos)
+{
+	struct qcam *qcam = video_drvdata(file);
+	int len;
+
+	mutex_lock(&qcam->lock);
+	parport_claim_or_block(qcam->pdev);
+	/* Probably should have a semaphore against multiple users */
+	len = qc_capture(qcam, buf, count);
+	parport_release(qcam->pdev);
+	mutex_unlock(&qcam->lock);
+	return len;
+}
+
+static int qcam_s_ctrl(struct v4l2_ctrl *ctrl)
+{
+	struct qcam *qcam =
+		container_of(ctrl->handler, struct qcam, hdl);
+	int ret = 0;
+
+	mutex_lock(&qcam->lock);
+	switch (ctrl->id) {
+	case V4L2_CID_BRIGHTNESS:
+		qcam->brightness = ctrl->val;
+		break;
+	case V4L2_CID_CONTRAST:
+		qcam->contrast = ctrl->val;
+		break;
+	case V4L2_CID_GAMMA:
+		qcam->whitebal = ctrl->val;
+		break;
+	default:
+		ret = -EINVAL;
+		break;
+	}
+	if (ret == 0) {
+		parport_claim_or_block(qcam->pdev);
+		qc_setup(qcam);
+		parport_release(qcam->pdev);
+	}
+	mutex_unlock(&qcam->lock);
+	return ret;
+}
+
+static const struct v4l2_file_operations qcam_fops = {
+	.owner		= THIS_MODULE,
+	.open		= v4l2_fh_open,
+	.release	= v4l2_fh_release,
+	.poll		= v4l2_ctrl_poll,
+	.unlocked_ioctl	= video_ioctl2,
+	.read		= qcam_read,
+};
+
+static const struct v4l2_ioctl_ops qcam_ioctl_ops = {
+	.vidioc_querycap    		    = qcam_querycap,
+	.vidioc_g_input      		    = qcam_g_input,
+	.vidioc_s_input      		    = qcam_s_input,
+	.vidioc_enum_input   		    = qcam_enum_input,
+	.vidioc_enum_fmt_vid_cap	    = qcam_enum_fmt_vid_cap,
+	.vidioc_g_fmt_vid_cap 		    = qcam_g_fmt_vid_cap,
+	.vidioc_s_fmt_vid_cap  		    = qcam_s_fmt_vid_cap,
+	.vidioc_try_fmt_vid_cap  	    = qcam_try_fmt_vid_cap,
+	.vidioc_log_status		    = v4l2_ctrl_log_status,
+	.vidioc_subscribe_event		    = v4l2_ctrl_subscribe_event,
+	.vidioc_unsubscribe_event	    = v4l2_event_unsubscribe,
+};
+
+static const struct v4l2_ctrl_ops qcam_ctrl_ops = {
+	.s_ctrl = qcam_s_ctrl,
+};
+
+/* Initialize the QuickCam driver control structure. */
+
+static struct qcam *qcam_init(struct parport *port)
+{
+	struct qcam *qcam;
+	struct v4l2_device *v4l2_dev;
+
+	qcam = kzalloc(sizeof(*qcam), GFP_KERNEL);
+	if (qcam == NULL)
+		return NULL;
+
+	v4l2_dev = &qcam->v4l2_dev;
+	strlcpy(v4l2_dev->name, "c-qcam", sizeof(v4l2_dev->name));
+
+	if (v4l2_device_register(NULL, v4l2_dev) < 0) {
+		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
+		kfree(qcam);
+		return NULL;
+	}
+
+	v4l2_ctrl_handler_init(&qcam->hdl, 3);
+	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
+			  V4L2_CID_BRIGHTNESS, 0, 255, 1, 240);
+	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
+			  V4L2_CID_CONTRAST, 0, 255, 1, 192);
+	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
+			  V4L2_CID_GAMMA, 0, 255, 1, 128);
+	if (qcam->hdl.error) {
+		v4l2_err(v4l2_dev, "couldn't register controls\n");
+		v4l2_ctrl_handler_free(&qcam->hdl);
+		kfree(qcam);
+		return NULL;
+	}
+
+	qcam->pport = port;
+	qcam->pdev = parport_register_device(port, "c-qcam", NULL, NULL,
+					  NULL, 0, NULL);
+
+	qcam->bidirectional = (qcam->pport->modes & PARPORT_MODE_TRISTATE) ? 1 : 0;
+
+	if (qcam->pdev == NULL) {
+		v4l2_err(v4l2_dev, "couldn't register for %s.\n", port->name);
+		v4l2_ctrl_handler_free(&qcam->hdl);
+		kfree(qcam);
+		return NULL;
+	}
+
+	strlcpy(qcam->vdev.name, "Colour QuickCam", sizeof(qcam->vdev.name));
+	qcam->vdev.v4l2_dev = v4l2_dev;
+	qcam->vdev.fops = &qcam_fops;
+	qcam->vdev.ioctl_ops = &qcam_ioctl_ops;
+	qcam->vdev.release = video_device_release_empty;
+	qcam->vdev.ctrl_handler = &qcam->hdl;
+	set_bit(V4L2_FL_USE_FH_PRIO, &qcam->vdev.flags);
+	video_set_drvdata(&qcam->vdev, qcam);
+
+	mutex_init(&qcam->lock);
+	qcam->width = qcam->ccd_width = 320;
+	qcam->height = qcam->ccd_height = 240;
+	qcam->mode = QC_MILLIONS | QC_DECIMATION_1;
+	qcam->contrast = 192;
+	qcam->brightness = 240;
+	qcam->whitebal = 128;
+	qcam->top = 1;
+	qcam->left = 14;
+	return qcam;
+}
+
+static int init_cqcam(struct parport *port)
+{
+	struct qcam *qcam;
+	struct v4l2_device *v4l2_dev;
+
+	if (parport[0] != -1) {
+		/* The user gave specific instructions */
+		int i, found = 0;
+
+		for (i = 0; i < MAX_CAMS && parport[i] != -1; i++) {
+			if (parport[0] == port->number)
+				found = 1;
+		}
+		if (!found)
+			return -ENODEV;
+	}
+
+	if (num_cams == MAX_CAMS)
+		return -ENOSPC;
+
+	qcam = qcam_init(port);
+	if (qcam == NULL)
+		return -ENODEV;
+
+	v4l2_dev = &qcam->v4l2_dev;
+
+	parport_claim_or_block(qcam->pdev);
+
+	qc_reset(qcam);
+
+	if (probe && qc_detect(qcam) == 0) {
+		parport_release(qcam->pdev);
+		parport_unregister_device(qcam->pdev);
+		kfree(qcam);
+		return -ENODEV;
+	}
+
+	qc_setup(qcam);
+
+	parport_release(qcam->pdev);
+
+	if (video_register_device(&qcam->vdev, VFL_TYPE_GRABBER, video_nr) < 0) {
+		v4l2_err(v4l2_dev, "Unable to register Colour QuickCam on %s\n",
+		       qcam->pport->name);
+		parport_unregister_device(qcam->pdev);
+		kfree(qcam);
+		return -ENODEV;
+	}
+
+	v4l2_info(v4l2_dev, "%s: Colour QuickCam found on %s\n",
+	       video_device_node_name(&qcam->vdev), qcam->pport->name);
+
+	qcams[num_cams++] = qcam;
+
+	return 0;
+}
+
+static void close_cqcam(struct qcam *qcam)
+{
+	video_unregister_device(&qcam->vdev);
+	v4l2_ctrl_handler_free(&qcam->hdl);
+	parport_unregister_device(qcam->pdev);
+	kfree(qcam);
+}
+
+static void cq_attach(struct parport *port)
+{
+	init_cqcam(port);
+}
+
+static void cq_detach(struct parport *port)
+{
+	/* Write this some day. */
+}
+
+static struct parport_driver cqcam_driver = {
+	.name = "cqcam",
+	.attach = cq_attach,
+	.detach = cq_detach,
+};
+
+static int __init cqcam_init(void)
+{
+	printk(KERN_INFO BANNER "\n");
+
+	return parport_register_driver(&cqcam_driver);
+}
+
+static void __exit cqcam_cleanup(void)
+{
+	unsigned int i;
+
+	for (i = 0; i < num_cams; i++)
+		close_cqcam(qcams[i]);
+
+	parport_unregister_driver(&cqcam_driver);
+}
+
+MODULE_AUTHOR("Philip Blundell <philb@gnu.org>");
+MODULE_DESCRIPTION(BANNER);
+MODULE_LICENSE("GPL");
+MODULE_VERSION("0.0.4");
+
+module_init(cqcam_init);
+module_exit(cqcam_cleanup);
diff --git a/drivers/media/parport/pms.c b/drivers/media/parport/pms.c
new file mode 100644
index 0000000..77f9c92
--- /dev/null
+++ b/drivers/media/parport/pms.c
@@ -0,0 +1,1152 @@
+/*
+ *	Media Vision Pro Movie Studio
+ *			or
+ *	"all you need is an I2C bus some RAM and a prayer"
+ *
+ *	This draws heavily on code
+ *
+ *	(c) Wolfgang Koehler,  wolf@first.gmd.de, Dec. 1994
+ *	Kiefernring 15
+ *	14478 Potsdam, Germany
+ *
+ *	Most of this code is directly derived from his userspace driver.
+ *	His driver works so send any reports to alan@lxorguk.ukuu.org.uk
+ *	unless the userspace driver also doesn't work for you...
+ *
+ *      Changes:
+ *	25-11-2009 	Hans Verkuil <hverkuil@xs4all.nl>
+ * 			- converted to version 2 of the V4L API.
+ *      08/07/2003      Daniele Bellucci <bellucda@tiscali.it>
+ *                      - pms_capture: report back -EFAULT
+ */
+
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/fs.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/ioport.h>
+#include <linux/init.h>
+#include <linux/mutex.h>
+#include <linux/uaccess.h>
+#include <linux/isa.h>
+#include <asm/io.h>
+
+#include <linux/videodev2.h>
+#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
+#include <media/v4l2-ctrls.h>
+#include <media/v4l2-fh.h>
+#include <media/v4l2-event.h>
+#include <media/v4l2-device.h>
+
+MODULE_LICENSE("GPL");
+MODULE_VERSION("0.0.5");
+
+#define MOTOROLA	1
+#define PHILIPS2	2               /* SAA7191 */
+#define PHILIPS1	3
+#define MVVMEMORYWIDTH	0x40		/* 512 bytes */
+
+struct i2c_info {
+	u8 slave;
+	u8 sub;
+	u8 data;
+	u8 hits;
+};
+
+struct pms {
+	struct v4l2_device v4l2_dev;
+	struct video_device vdev;
+	struct v4l2_ctrl_handler hdl;
+	int height;
+	int width;
+	int depth;
+	int input;
+	struct mutex lock;
+	int i2c_count;
+	struct i2c_info i2cinfo[64];
+
+	int decoder;
+	int standard;	/* 0 - auto 1 - ntsc 2 - pal 3 - secam */
+	v4l2_std_id std;
+	int io;
+	int data;
+	void __iomem *mem;
+};
+
+/*
+ *	I/O ports and Shared Memory
+ */
+
+static int io_port = 0x250;
+module_param(io_port, int, 0);
+
+static int mem_base = 0xc8000;
+module_param(mem_base, int, 0);
+
+static int video_nr = -1;
+module_param(video_nr, int, 0);
+
+
+static inline void mvv_write(struct pms *dev, u8 index, u8 value)
+{
+	outw(index | (value << 8), dev->io);
+}
+
+static inline u8 mvv_read(struct pms *dev, u8 index)
+{
+	outb(index, dev->io);
+	return inb(dev->data);
+}
+
+static int pms_i2c_stat(struct pms *dev, u8 slave)
+{
+	int counter = 0;
+	int i;
+
+	outb(0x28, dev->io);
+
+	while ((inb(dev->data) & 0x01) == 0)
+		if (counter++ == 256)
+			break;
+
+	while ((inb(dev->data) & 0x01) != 0)
+		if (counter++ == 256)
+			break;
+
+	outb(slave, dev->io);
+
+	counter = 0;
+	while ((inb(dev->data) & 0x01) == 0)
+		if (counter++ == 256)
+			break;
+
+	while ((inb(dev->data) & 0x01) != 0)
+		if (counter++ == 256)
+			break;
+
+	for (i = 0; i < 12; i++) {
+		char st = inb(dev->data);
+
+		if ((st & 2) != 0)
+			return -1;
+		if ((st & 1) == 0)
+			break;
+	}
+	outb(0x29, dev->io);
+	return inb(dev->data);
+}
+
+static int pms_i2c_write(struct pms *dev, u16 slave, u16 sub, u16 data)
+{
+	int skip = 0;
+	int count;
+	int i;
+
+	for (i = 0; i < dev->i2c_count; i++) {
+		if ((dev->i2cinfo[i].slave == slave) &&
+		    (dev->i2cinfo[i].sub == sub)) {
+			if (dev->i2cinfo[i].data == data)
+				skip = 1;
+			dev->i2cinfo[i].data = data;
+			i = dev->i2c_count + 1;
+		}
+	}
+
+	if (i == dev->i2c_count && dev->i2c_count < 64) {
+		dev->i2cinfo[dev->i2c_count].slave = slave;
+		dev->i2cinfo[dev->i2c_count].sub = sub;
+		dev->i2cinfo[dev->i2c_count].data = data;
+		dev->i2c_count++;
+	}
+
+	if (skip)
+		return 0;
+
+	mvv_write(dev, 0x29, sub);
+	mvv_write(dev, 0x2A, data);
+	mvv_write(dev, 0x28, slave);
+
+	outb(0x28, dev->io);
+
+	count = 0;
+	while ((inb(dev->data) & 1) == 0)
+		if (count > 255)
+			break;
+	while ((inb(dev->data) & 1) != 0)
+		if (count > 255)
+			break;
+
+	count = inb(dev->data);
+
+	if (count & 2)
+		return -1;
+	return count;
+}
+
+static int pms_i2c_read(struct pms *dev, int slave, int sub)
+{
+	int i;
+
+	for (i = 0; i < dev->i2c_count; i++) {
+		if (dev->i2cinfo[i].slave == slave && dev->i2cinfo[i].sub == sub)
+			return dev->i2cinfo[i].data;
+	}
+	return 0;
+}
+
+
+static void pms_i2c_andor(struct pms *dev, int slave, int sub, int and, int or)
+{
+	u8 tmp;
+
+	tmp = pms_i2c_read(dev, slave, sub);
+	tmp = (tmp & and) | or;
+	pms_i2c_write(dev, slave, sub, tmp);
+}
+
+/*
+ *	Control functions
+ */
+
+
+static void pms_videosource(struct pms *dev, short source)
+{
+	switch (dev->decoder) {
+	case MOTOROLA:
+		break;
+	case PHILIPS2:
+		pms_i2c_andor(dev, 0x8a, 0x06, 0x7f, source ? 0x80 : 0);
+		break;
+	case PHILIPS1:
+		break;
+	}
+	mvv_write(dev, 0x2E, 0x31);
+	/* Was: mvv_write(dev, 0x2E, source ? 0x31 : 0x30);
+	   But could not make this work correctly. Only Composite input
+	   worked for me. */
+}
+
+static void pms_hue(struct pms *dev, short hue)
+{
+	switch (dev->decoder) {
+	case MOTOROLA:
+		pms_i2c_write(dev, 0x8a, 0x00, hue);
+		break;
+	case PHILIPS2:
+		pms_i2c_write(dev, 0x8a, 0x07, hue);
+		break;
+	case PHILIPS1:
+		pms_i2c_write(dev, 0x42, 0x07, hue);
+		break;
+	}
+}
+
+static void pms_saturation(struct pms *dev, short sat)
+{
+	switch (dev->decoder) {
+	case MOTOROLA:
+		pms_i2c_write(dev, 0x8a, 0x00, sat);
+		break;
+	case PHILIPS1:
+		pms_i2c_write(dev, 0x42, 0x12, sat);
+		break;
+	}
+}
+
+
+static void pms_contrast(struct pms *dev, short contrast)
+{
+	switch (dev->decoder) {
+	case MOTOROLA:
+		pms_i2c_write(dev, 0x8a, 0x00, contrast);
+		break;
+	case PHILIPS1:
+		pms_i2c_write(dev, 0x42, 0x13, contrast);
+		break;
+	}
+}
+
+static void pms_brightness(struct pms *dev, short brightness)
+{
+	switch (dev->decoder) {
+	case MOTOROLA:
+		pms_i2c_write(dev, 0x8a, 0x00, brightness);
+		pms_i2c_write(dev, 0x8a, 0x00, brightness);
+		pms_i2c_write(dev, 0x8a, 0x00, brightness);
+		break;
+	case PHILIPS1:
+		pms_i2c_write(dev, 0x42, 0x19, brightness);
+		break;
+	}
+}
+
+
+static void pms_format(struct pms *dev, short format)
+{
+	int target;
+
+	dev->standard = format;
+
+	if (dev->decoder == PHILIPS1)
+		target = 0x42;
+	else if (dev->decoder == PHILIPS2)
+		target = 0x8a;
+	else
+		return;
+
+	switch (format) {
+	case 0:	/* Auto */
+		pms_i2c_andor(dev, target, 0x0d, 0xfe, 0x00);
+		pms_i2c_andor(dev, target, 0x0f, 0x3f, 0x80);
+		break;
+	case 1: /* NTSC */
+		pms_i2c_andor(dev, target, 0x0d, 0xfe, 0x00);
+		pms_i2c_andor(dev, target, 0x0f, 0x3f, 0x40);
+		break;
+	case 2: /* PAL */
+		pms_i2c_andor(dev, target, 0x0d, 0xfe, 0x00);
+		pms_i2c_andor(dev, target, 0x0f, 0x3f, 0x00);
+		break;
+	case 3:	/* SECAM */
+		pms_i2c_andor(dev, target, 0x0d, 0xfe, 0x01);
+		pms_i2c_andor(dev, target, 0x0f, 0x3f, 0x00);
+		break;
+	}
+}
+
+#ifdef FOR_FUTURE_EXPANSION
+
+/*
+ *	These features of the PMS card are not currently exposes. They
+ *	could become a private v4l ioctl for PMSCONFIG or somesuch if
+ *	people need it. We also don't yet use the PMS interrupt.
+ */
+
+static void pms_hstart(struct pms *dev, short start)
+{
+	switch (dev->decoder) {
+	case PHILIPS1:
+		pms_i2c_write(dev, 0x8a, 0x05, start);
+		pms_i2c_write(dev, 0x8a, 0x18, start);
+		break;
+	case PHILIPS2:
+		pms_i2c_write(dev, 0x42, 0x05, start);
+		pms_i2c_write(dev, 0x42, 0x18, start);
+		break;
+	}
+}
+
+/*
+ *	Bandpass filters
+ */
+
+static void pms_bandpass(struct pms *dev, short pass)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0x8a, 0x06, 0xcf, (pass & 0x03) << 4);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x06, 0xcf, (pass & 0x03) << 4);
+}
+
+static void pms_antisnow(struct pms *dev, short snow)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0x8a, 0x06, 0xf3, (snow & 0x03) << 2);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x06, 0xf3, (snow & 0x03) << 2);
+}
+
+static void pms_sharpness(struct pms *dev, short sharp)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0x8a, 0x06, 0xfc, sharp & 0x03);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x06, 0xfc, sharp & 0x03);
+}
+
+static void pms_chromaagc(struct pms *dev, short agc)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0x8a, 0x0c, 0x9f, (agc & 0x03) << 5);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x0c, 0x9f, (agc & 0x03) << 5);
+}
+
+static void pms_vertnoise(struct pms *dev, short noise)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0x8a, 0x10, 0xfc, noise & 3);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x10, 0xfc, noise & 3);
+}
+
+static void pms_forcecolour(struct pms *dev, short colour)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0x8a, 0x0c, 0x7f, (colour & 1) << 7);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x0c, 0x7, (colour & 1) << 7);
+}
+
+static void pms_antigamma(struct pms *dev, short gamma)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0xb8, 0x00, 0x7f, (gamma & 1) << 7);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x20, 0x7, (gamma & 1) << 7);
+}
+
+static void pms_prefilter(struct pms *dev, short filter)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0x8a, 0x06, 0xbf, (filter & 1) << 6);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x06, 0xbf, (filter & 1) << 6);
+}
+
+static void pms_hfilter(struct pms *dev, short filter)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0xb8, 0x04, 0x1f, (filter & 7) << 5);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x24, 0x1f, (filter & 7) << 5);
+}
+
+static void pms_vfilter(struct pms *dev, short filter)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0xb8, 0x08, 0x9f, (filter & 3) << 5);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x28, 0x9f, (filter & 3) << 5);
+}
+
+static void pms_killcolour(struct pms *dev, short colour)
+{
+	if (dev->decoder == PHILIPS2) {
+		pms_i2c_andor(dev, 0x8a, 0x08, 0x07, (colour & 0x1f) << 3);
+		pms_i2c_andor(dev, 0x8a, 0x09, 0x07, (colour & 0x1f) << 3);
+	} else if (dev->decoder == PHILIPS1) {
+		pms_i2c_andor(dev, 0x42, 0x08, 0x07, (colour & 0x1f) << 3);
+		pms_i2c_andor(dev, 0x42, 0x09, 0x07, (colour & 0x1f) << 3);
+	}
+}
+
+static void pms_chromagain(struct pms *dev, short chroma)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_write(dev, 0x8a, 0x11, chroma);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_write(dev, 0x42, 0x11, chroma);
+}
+
+
+static void pms_spacialcompl(struct pms *dev, short data)
+{
+	mvv_write(dev, 0x3b, data);
+}
+
+static void pms_spacialcomph(struct pms *dev, short data)
+{
+	mvv_write(dev, 0x3a, data);
+}
+
+static void pms_vstart(struct pms *dev, short start)
+{
+	mvv_write(dev, 0x16, start);
+	mvv_write(dev, 0x17, (start >> 8) & 0x01);
+}
+
+#endif
+
+static void pms_secamcross(struct pms *dev, short cross)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0x8a, 0x0f, 0xdf, (cross & 1) << 5);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x0f, 0xdf, (cross & 1) << 5);
+}
+
+
+static void pms_swsense(struct pms *dev, short sense)
+{
+	if (dev->decoder == PHILIPS2) {
+		pms_i2c_write(dev, 0x8a, 0x0a, sense);
+		pms_i2c_write(dev, 0x8a, 0x0b, sense);
+	} else if (dev->decoder == PHILIPS1) {
+		pms_i2c_write(dev, 0x42, 0x0a, sense);
+		pms_i2c_write(dev, 0x42, 0x0b, sense);
+	}
+}
+
+
+static void pms_framerate(struct pms *dev, short frr)
+{
+	int fps = (dev->std & V4L2_STD_525_60) ? 30 : 25;
+
+	if (frr == 0)
+		return;
+	fps = fps/frr;
+	mvv_write(dev, 0x14, 0x80 | fps);
+	mvv_write(dev, 0x15, 1);
+}
+
+static void pms_vert(struct pms *dev, u8 deciden, u8 decinum)
+{
+	mvv_write(dev, 0x1c, deciden);	/* Denominator */
+	mvv_write(dev, 0x1d, decinum);	/* Numerator */
+}
+
+/*
+ *	Turn 16bit ratios into best small ratio the chipset can grok
+ */
+
+static void pms_vertdeci(struct pms *dev, unsigned short decinum, unsigned short deciden)
+{
+	/* Knock it down by / 5 once */
+	if (decinum % 5 == 0) {
+		deciden /= 5;
+		decinum /= 5;
+	}
+	/*
+	 *	3's
+	 */
+	while (decinum % 3 == 0 && deciden % 3 == 0) {
+		deciden /= 3;
+		decinum /= 3;
+	}
+	/*
+	 *	2's
+	 */
+	while (decinum % 2 == 0 && deciden % 2 == 0) {
+		decinum /= 2;
+		deciden /= 2;
+	}
+	/*
+	 *	Fudgyify
+	 */
+	while (deciden > 32) {
+		deciden /= 2;
+		decinum = (decinum + 1) / 2;
+	}
+	if (deciden == 32)
+		deciden--;
+	pms_vert(dev, deciden, decinum);
+}
+
+static void pms_horzdeci(struct pms *dev, short decinum, short deciden)
+{
+	if (decinum <= 512) {
+		if (decinum % 5 == 0) {
+			decinum /= 5;
+			deciden /= 5;
+		}
+	} else {
+		decinum = 512;
+		deciden = 640;	/* 768 would be ideal */
+	}
+
+	while (((decinum | deciden) & 1) == 0) {
+		decinum >>= 1;
+		deciden >>= 1;
+	}
+	while (deciden > 32) {
+		deciden >>= 1;
+		decinum = (decinum + 1) >> 1;
+	}
+	if (deciden == 32)
+		deciden--;
+
+	mvv_write(dev, 0x24, 0x80 | deciden);
+	mvv_write(dev, 0x25, decinum);
+}
+
+static void pms_resolution(struct pms *dev, short width, short height)
+{
+	int fg_height;
+
+	fg_height = height;
+	if (fg_height > 280)
+		fg_height = 280;
+
+	mvv_write(dev, 0x18, fg_height);
+	mvv_write(dev, 0x19, fg_height >> 8);
+
+	if (dev->std & V4L2_STD_525_60) {
+		mvv_write(dev, 0x1a, 0xfc);
+		mvv_write(dev, 0x1b, 0x00);
+		if (height > fg_height)
+			pms_vertdeci(dev, 240, 240);
+		else
+			pms_vertdeci(dev, fg_height, 240);
+	} else {
+		mvv_write(dev, 0x1a, 0x1a);
+		mvv_write(dev, 0x1b, 0x01);
+		if (fg_height > 256)
+			pms_vertdeci(dev, 270, 270);
+		else
+			pms_vertdeci(dev, fg_height, 270);
+	}
+	mvv_write(dev, 0x12, 0);
+	mvv_write(dev, 0x13, MVVMEMORYWIDTH);
+	mvv_write(dev, 0x42, 0x00);
+	mvv_write(dev, 0x43, 0x00);
+	mvv_write(dev, 0x44, MVVMEMORYWIDTH);
+
+	mvv_write(dev, 0x22, width + 8);
+	mvv_write(dev, 0x23, (width + 8) >> 8);
+
+	if (dev->std & V4L2_STD_525_60)
+		pms_horzdeci(dev, width, 640);
+	else
+		pms_horzdeci(dev, width + 8, 768);
+
+	mvv_write(dev, 0x30, mvv_read(dev, 0x30) & 0xfe);
+	mvv_write(dev, 0x08, mvv_read(dev, 0x08) | 0x01);
+	mvv_write(dev, 0x01, mvv_read(dev, 0x01) & 0xfd);
+	mvv_write(dev, 0x32, 0x00);
+	mvv_write(dev, 0x33, MVVMEMORYWIDTH);
+}
+
+
+/*
+ *	Set Input
+ */
+
+static void pms_vcrinput(struct pms *dev, short input)
+{
+	if (dev->decoder == PHILIPS2)
+		pms_i2c_andor(dev, 0x8a, 0x0d, 0x7f, (input & 1) << 7);
+	else if (dev->decoder == PHILIPS1)
+		pms_i2c_andor(dev, 0x42, 0x0d, 0x7f, (input & 1) << 7);
+}
+
+
+static int pms_capture(struct pms *dev, char __user *buf, int rgb555, int count)
+{
+	int y;
+	int dw = 2 * dev->width;
+	char tmp[dw + 32]; /* using a temp buffer is faster than direct  */
+	int cnt = 0;
+	int len = 0;
+	unsigned char r8 = 0x5;  /* value for reg8  */
+
+	if (rgb555)
+		r8 |= 0x20; /* else use untranslated rgb = 565 */
+	mvv_write(dev, 0x08, r8); /* capture rgb555/565, init DRAM, PC enable */
+
+/*	printf("%d %d %d %d %d %x %x\n",width,height,voff,nom,den,mvv_buf); */
+
+	for (y = 0; y < dev->height; y++) {
+		writeb(0, dev->mem);  /* synchronisiert neue Zeile */
+
+		/*
+		 *	This is in truth a fifo, be very careful as if you
+		 *	forgot this odd things will occur 8)
+		 */
+
+		memcpy_fromio(tmp, dev->mem, dw + 32); /* discard 16 word   */
+		cnt -= dev->height;
+		while (cnt <= 0) {
+			/*
+			 *	Don't copy too far
+			 */
+			int dt = dw;
+			if (dt + len > count)
+				dt = count - len;
+			cnt += dev->height;
+			if (copy_to_user(buf, tmp + 32, dt))
+				return len ? len : -EFAULT;
+			buf += dt;
+			len += dt;
+		}
+	}
+	return len;
+}
+
+
+/*
+ *	Video4linux interfacing
+ */
+
+static int pms_querycap(struct file *file, void  *priv,
+					struct v4l2_capability *vcap)
+{
+	struct pms *dev = video_drvdata(file);
+
+	strlcpy(vcap->driver, dev->v4l2_dev.name, sizeof(vcap->driver));
+	strlcpy(vcap->card, "Mediavision PMS", sizeof(vcap->card));
+	snprintf(vcap->bus_info, sizeof(vcap->bus_info),
+			"ISA:%s", dev->v4l2_dev.name);
+	vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
+	vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS;
+	return 0;
+}
+
+static int pms_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
+{
+	static const char *inputs[4] = {
+		"Composite",
+		"S-Video",
+		"Composite (VCR)",
+		"S-Video (VCR)"
+	};
+
+	if (vin->index > 3)
+		return -EINVAL;
+	strlcpy(vin->name, inputs[vin->index], sizeof(vin->name));
+	vin->type = V4L2_INPUT_TYPE_CAMERA;
+	vin->audioset = 0;
+	vin->tuner = 0;
+	vin->std = V4L2_STD_ALL;
+	vin->status = 0;
+	return 0;
+}
+
+static int pms_g_input(struct file *file, void *fh, unsigned int *inp)
+{
+	struct pms *dev = video_drvdata(file);
+
+	*inp = dev->input;
+	return 0;
+}
+
+static int pms_s_input(struct file *file, void *fh, unsigned int inp)
+{
+	struct pms *dev = video_drvdata(file);
+
+	if (inp > 3)
+		return -EINVAL;
+
+	dev->input = inp;
+	pms_videosource(dev, inp & 1);
+	pms_vcrinput(dev, inp >> 1);
+	return 0;
+}
+
+static int pms_g_std(struct file *file, void *fh, v4l2_std_id *std)
+{
+	struct pms *dev = video_drvdata(file);
+
+	*std = dev->std;
+	return 0;
+}
+
+static int pms_s_std(struct file *file, void *fh, v4l2_std_id *std)
+{
+	struct pms *dev = video_drvdata(file);
+	int ret = 0;
+
+	dev->std = *std;
+	if (dev->std & V4L2_STD_NTSC) {
+		pms_framerate(dev, 30);
+		pms_secamcross(dev, 0);
+		pms_format(dev, 1);
+	} else if (dev->std & V4L2_STD_PAL) {
+		pms_framerate(dev, 25);
+		pms_secamcross(dev, 0);
+		pms_format(dev, 2);
+	} else if (dev->std & V4L2_STD_SECAM) {
+		pms_framerate(dev, 25);
+		pms_secamcross(dev, 1);
+		pms_format(dev, 2);
+	} else {
+		ret = -EINVAL;
+	}
+	/*
+	switch (v->mode) {
+	case VIDEO_MODE_AUTO:
+		pms_framerate(dev, 25);
+		pms_secamcross(dev, 0);
+		pms_format(dev, 0);
+		break;
+	}*/
+	return ret;
+}
+
+static int pms_s_ctrl(struct v4l2_ctrl *ctrl)
+{
+	struct pms *dev = container_of(ctrl->handler, struct pms, hdl);
+	int ret = 0;
+
+	switch (ctrl->id) {
+	case V4L2_CID_BRIGHTNESS:
+		pms_brightness(dev, ctrl->val);
+		break;
+	case V4L2_CID_CONTRAST:
+		pms_contrast(dev, ctrl->val);
+		break;
+	case V4L2_CID_SATURATION:
+		pms_saturation(dev, ctrl->val);
+		break;
+	case V4L2_CID_HUE:
+		pms_hue(dev, ctrl->val);
+		break;
+	default:
+		ret = -EINVAL;
+		break;
+	}
+	return ret;
+}
+
+static int pms_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct pms *dev = video_drvdata(file);
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+
+	pix->width = dev->width;
+	pix->height = dev->height;
+	pix->pixelformat = dev->width == 15 ?
+			    V4L2_PIX_FMT_RGB555 : V4L2_PIX_FMT_RGB565;
+	pix->field = V4L2_FIELD_NONE;
+	pix->bytesperline = 2 * dev->width;
+	pix->sizeimage = 2 * dev->width * dev->height;
+	/* Just a guess */
+	pix->colorspace = V4L2_COLORSPACE_SRGB;
+	return 0;
+}
+
+static int pms_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+
+	if (pix->height < 16 || pix->height > 480)
+		return -EINVAL;
+	if (pix->width < 16 || pix->width > 640)
+		return -EINVAL;
+	if (pix->pixelformat != V4L2_PIX_FMT_RGB555 &&
+	    pix->pixelformat != V4L2_PIX_FMT_RGB565)
+		return -EINVAL;
+	pix->field = V4L2_FIELD_NONE;
+	pix->bytesperline = 2 * pix->width;
+	pix->sizeimage = 2 * pix->width * pix->height;
+	/* Just a guess */
+	pix->colorspace = V4L2_COLORSPACE_SRGB;
+	return 0;
+}
+
+static int pms_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct pms *dev = video_drvdata(file);
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+	int ret = pms_try_fmt_vid_cap(file, fh, fmt);
+
+	if (ret)
+		return ret;
+	dev->width = pix->width;
+	dev->height = pix->height;
+	dev->depth = (pix->pixelformat == V4L2_PIX_FMT_RGB555) ? 15 : 16;
+	pms_resolution(dev, dev->width, dev->height);
+	/* Ok we figured out what to use from our wide choice */
+	return 0;
+}
+
+static int pms_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt)
+{
+	static struct v4l2_fmtdesc formats[] = {
+		{ 0, 0, 0,
+		  "RGB 5:5:5", V4L2_PIX_FMT_RGB555,
+		  { 0, 0, 0, 0 }
+		},
+		{ 1, 0, 0,
+		  "RGB 5:6:5", V4L2_PIX_FMT_RGB565,
+		  { 0, 0, 0, 0 }
+		},
+	};
+	enum v4l2_buf_type type = fmt->type;
+
+	if (fmt->index > 1)
+		return -EINVAL;
+
+	*fmt = formats[fmt->index];
+	fmt->type = type;
+	return 0;
+}
+
+static ssize_t pms_read(struct file *file, char __user *buf,
+		    size_t count, loff_t *ppos)
+{
+	struct pms *dev = video_drvdata(file);
+	int len;
+
+	len = pms_capture(dev, buf, (dev->depth == 15), count);
+	return len;
+}
+
+static unsigned int pms_poll(struct file *file, struct poll_table_struct *wait)
+{
+	struct v4l2_fh *fh = file->private_data;
+	unsigned int res = POLLIN | POLLRDNORM;
+
+	if (v4l2_event_pending(fh))
+		res |= POLLPRI;
+	poll_wait(file, &fh->wait, wait);
+	return res;
+}
+
+static const struct v4l2_file_operations pms_fops = {
+	.owner		= THIS_MODULE,
+	.open           = v4l2_fh_open,
+	.release        = v4l2_fh_release,
+	.poll           = pms_poll,
+	.unlocked_ioctl	= video_ioctl2,
+	.read           = pms_read,
+};
+
+static const struct v4l2_ioctl_ops pms_ioctl_ops = {
+	.vidioc_querycap	    = pms_querycap,
+	.vidioc_g_input		    = pms_g_input,
+	.vidioc_s_input		    = pms_s_input,
+	.vidioc_enum_input	    = pms_enum_input,
+	.vidioc_g_std		    = pms_g_std,
+	.vidioc_s_std		    = pms_s_std,
+	.vidioc_enum_fmt_vid_cap    = pms_enum_fmt_vid_cap,
+	.vidioc_g_fmt_vid_cap	    = pms_g_fmt_vid_cap,
+	.vidioc_s_fmt_vid_cap	    = pms_s_fmt_vid_cap,
+	.vidioc_try_fmt_vid_cap     = pms_try_fmt_vid_cap,
+	.vidioc_subscribe_event     = v4l2_ctrl_subscribe_event,
+	.vidioc_unsubscribe_event   = v4l2_event_unsubscribe,
+};
+
+/*
+ *	Probe for and initialise the Mediavision PMS
+ */
+
+static int init_mediavision(struct pms *dev)
+{
+	int idec, decst;
+	int i;
+	static const unsigned char i2c_defs[] = {
+		0x4c, 0x30, 0x00, 0xe8,
+		0xb6, 0xe2, 0x00, 0x00,
+		0xff, 0xff, 0x00, 0x00,
+		0x00, 0x00, 0x78, 0x98,
+		0x00, 0x00, 0x00, 0x00,
+		0x34, 0x0a, 0xf4, 0xce,
+		0xe4
+	};
+
+	dev->mem = ioremap(mem_base, 0x800);
+	if (!dev->mem)
+		return -ENOMEM;
+
+	if (!request_region(0x9a01, 1, "Mediavision PMS config")) {
+		printk(KERN_WARNING "mediavision: unable to detect: 0x9a01 in use.\n");
+		iounmap(dev->mem);
+		return -EBUSY;
+	}
+	if (!request_region(dev->io, 3, "Mediavision PMS")) {
+		printk(KERN_WARNING "mediavision: I/O port %d in use.\n", dev->io);
+		release_region(0x9a01, 1);
+		iounmap(dev->mem);
+		return -EBUSY;
+	}
+	outb(0xb8, 0x9a01);		/* Unlock */
+	outb(dev->io >> 4, 0x9a01);	/* Set IO port */
+
+
+	decst = pms_i2c_stat(dev, 0x43);
+
+	if (decst != -1)
+		idec = 2;
+	else if (pms_i2c_stat(dev, 0xb9) != -1)
+		idec = 3;
+	else if (pms_i2c_stat(dev, 0x8b) != -1)
+		idec = 1;
+	else
+		idec = 0;
+
+	printk(KERN_INFO "PMS type is %d\n", idec);
+	if (idec == 0) {
+		release_region(dev->io, 3);
+		release_region(0x9a01, 1);
+		iounmap(dev->mem);
+		return -ENODEV;
+	}
+
+	/*
+	 *	Ok we have a PMS of some sort
+	 */
+
+	mvv_write(dev, 0x04, mem_base >> 12);	/* Set the memory area */
+
+	/* Ok now load the defaults */
+
+	for (i = 0; i < 0x19; i++) {
+		if (i2c_defs[i] == 0xff)
+			pms_i2c_andor(dev, 0x8a, i, 0x07, 0x00);
+		else
+			pms_i2c_write(dev, 0x8a, i, i2c_defs[i]);
+	}
+
+	pms_i2c_write(dev, 0xb8, 0x00, 0x12);
+	pms_i2c_write(dev, 0xb8, 0x04, 0x00);
+	pms_i2c_write(dev, 0xb8, 0x07, 0x00);
+	pms_i2c_write(dev, 0xb8, 0x08, 0x00);
+	pms_i2c_write(dev, 0xb8, 0x09, 0xff);
+	pms_i2c_write(dev, 0xb8, 0x0a, 0x00);
+	pms_i2c_write(dev, 0xb8, 0x0b, 0x10);
+	pms_i2c_write(dev, 0xb8, 0x10, 0x03);
+
+	mvv_write(dev, 0x01, 0x00);
+	mvv_write(dev, 0x05, 0xa0);
+	mvv_write(dev, 0x08, 0x25);
+	mvv_write(dev, 0x09, 0x00);
+	mvv_write(dev, 0x0a, 0x20 | MVVMEMORYWIDTH);
+
+	mvv_write(dev, 0x10, 0x02);
+	mvv_write(dev, 0x1e, 0x0c);
+	mvv_write(dev, 0x1f, 0x03);
+	mvv_write(dev, 0x26, 0x06);
+
+	mvv_write(dev, 0x2b, 0x00);
+	mvv_write(dev, 0x2c, 0x20);
+	mvv_write(dev, 0x2d, 0x00);
+	mvv_write(dev, 0x2f, 0x70);
+	mvv_write(dev, 0x32, 0x00);
+	mvv_write(dev, 0x33, MVVMEMORYWIDTH);
+	mvv_write(dev, 0x34, 0x00);
+	mvv_write(dev, 0x35, 0x00);
+	mvv_write(dev, 0x3a, 0x80);
+	mvv_write(dev, 0x3b, 0x10);
+	mvv_write(dev, 0x20, 0x00);
+	mvv_write(dev, 0x21, 0x00);
+	mvv_write(dev, 0x30, 0x22);
+	return 0;
+}
+
+/*
+ *	Initialization and module stuff
+ */
+
+#ifndef MODULE
+static int enable;
+module_param(enable, int, 0);
+#endif
+
+static const struct v4l2_ctrl_ops pms_ctrl_ops = {
+	.s_ctrl = pms_s_ctrl,
+};
+
+static int pms_probe(struct device *pdev, unsigned int card)
+{
+	struct pms *dev;
+	struct v4l2_device *v4l2_dev;
+	struct v4l2_ctrl_handler *hdl;
+	int res;
+
+#ifndef MODULE
+	if (!enable) {
+		pr_err("PMS: not enabled, use pms.enable=1 to probe\n");
+		return -ENODEV;
+	}
+#endif
+
+	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
+	if (dev == NULL)
+		return -ENOMEM;
+
+	dev->decoder = PHILIPS2;
+	dev->io = io_port;
+	dev->data = io_port + 1;
+	v4l2_dev = &dev->v4l2_dev;
+	hdl = &dev->hdl;
+
+	res = v4l2_device_register(pdev, v4l2_dev);
+	if (res < 0) {
+		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
+		goto free_dev;
+	}
+	v4l2_info(v4l2_dev, "Mediavision Pro Movie Studio driver 0.05\n");
+
+	res = init_mediavision(dev);
+	if (res) {
+		v4l2_err(v4l2_dev, "Board not found.\n");
+		goto free_io;
+	}
+
+	v4l2_ctrl_handler_init(hdl, 4);
+	v4l2_ctrl_new_std(hdl, &pms_ctrl_ops,
+			V4L2_CID_BRIGHTNESS, 0, 255, 1, 139);
+	v4l2_ctrl_new_std(hdl, &pms_ctrl_ops,
+			V4L2_CID_CONTRAST, 0, 255, 1, 70);
+	v4l2_ctrl_new_std(hdl, &pms_ctrl_ops,
+			V4L2_CID_SATURATION, 0, 255, 1, 64);
+	v4l2_ctrl_new_std(hdl, &pms_ctrl_ops,
+			V4L2_CID_HUE, 0, 255, 1, 0);
+	if (hdl->error) {
+		res = hdl->error;
+		goto free_hdl;
+	}
+
+	mutex_init(&dev->lock);
+	strlcpy(dev->vdev.name, v4l2_dev->name, sizeof(dev->vdev.name));
+	dev->vdev.v4l2_dev = v4l2_dev;
+	dev->vdev.ctrl_handler = hdl;
+	dev->vdev.fops = &pms_fops;
+	dev->vdev.ioctl_ops = &pms_ioctl_ops;
+	dev->vdev.release = video_device_release_empty;
+	dev->vdev.lock = &dev->lock;
+	dev->vdev.tvnorms = V4L2_STD_NTSC | V4L2_STD_PAL | V4L2_STD_SECAM;
+	set_bit(V4L2_FL_USE_FH_PRIO, &dev->vdev.flags);
+	video_set_drvdata(&dev->vdev, dev);
+	dev->std = V4L2_STD_NTSC_M;
+	dev->height = 240;
+	dev->width = 320;
+	dev->depth = 16;
+	pms_swsense(dev, 75);
+	pms_resolution(dev, 320, 240);
+	pms_videosource(dev, 0);
+	pms_vcrinput(dev, 0);
+	v4l2_ctrl_handler_setup(hdl);
+	res = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, video_nr);
+	if (res >= 0)
+		return 0;
+
+free_hdl:
+	v4l2_ctrl_handler_free(hdl);
+	v4l2_device_unregister(&dev->v4l2_dev);
+free_io:
+	release_region(dev->io, 3);
+	release_region(0x9a01, 1);
+	iounmap(dev->mem);
+free_dev:
+	kfree(dev);
+	return res;
+}
+
+static int pms_remove(struct device *pdev, unsigned int card)
+{
+	struct pms *dev = dev_get_drvdata(pdev);
+
+	video_unregister_device(&dev->vdev);
+	v4l2_ctrl_handler_free(&dev->hdl);
+	release_region(dev->io, 3);
+	release_region(0x9a01, 1);
+	iounmap(dev->mem);
+	return 0;
+}
+
+static struct isa_driver pms_driver = {
+	.probe		= pms_probe,
+	.remove		= pms_remove,
+	.driver		= {
+		.name	= "pms",
+	},
+};
+
+static int __init pms_init(void)
+{
+	return isa_register_driver(&pms_driver, 1);
+}
+
+static void __exit pms_exit(void)
+{
+	isa_unregister_driver(&pms_driver);
+}
+
+module_init(pms_init);
+module_exit(pms_exit);
diff --git a/drivers/media/parport/w9966.c b/drivers/media/parport/w9966.c
new file mode 100644
index 0000000..db2a600
--- /dev/null
+++ b/drivers/media/parport/w9966.c
@@ -0,0 +1,981 @@
+/*
+	Winbond w9966cf Webcam parport driver.
+
+	Version 0.33
+
+	Copyright (C) 2001 Jakob Kemi <jakob.kemi@post.utfors.se>
+
+	This program is free software; you can redistribute it and/or modify
+	it under the terms of the GNU General Public License as published by
+	the Free Software Foundation; either version 2 of the License, or
+	(at your option) any later version.
+
+	This program is distributed in the hope that it will be useful,
+	but WITHOUT ANY WARRANTY; without even the implied warranty of
+	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+	GNU General Public License for more details.
+
+	You should have received a copy of the GNU General Public License
+	along with this program; if not, write to the Free Software
+	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+/*
+	Supported devices:
+	*Lifeview FlyCam Supra (using the Philips saa7111a chip)
+
+	Does any other model using the w9966 interface chip exist ?
+
+	Todo:
+
+	*Add a working EPP mode, since DMA ECP read isn't implemented
+	in the parport drivers. (That's why it's so sloow)
+
+	*Add support for other ccd-control chips than the saa7111
+	please send me feedback on what kind of chips you have.
+
+	*Add proper probing. I don't know what's wrong with the IEEE1284
+	parport drivers but (IEEE1284_MODE_NIBBLE|IEEE1284_DEVICE_ID)
+	and nibble read seems to be broken for some peripherals.
+
+	*Add probing for onboard SRAM, port directions etc. (if possible)
+
+	*Add support for the hardware compressed modes (maybe using v4l2)
+
+	*Fix better support for the capture window (no skewed images, v4l
+	interface to capt. window)
+
+	*Probably some bugs that I don't know of
+
+	Please support me by sending feedback!
+
+	Changes:
+
+	Alan Cox:	Removed RGB mode for kernel merge, added THIS_MODULE
+			and owner support for newer module locks
+*/
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/videodev2.h>
+#include <linux/slab.h>
+#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
+#include <media/v4l2-device.h>
+#include <media/v4l2-fh.h>
+#include <media/v4l2-ctrls.h>
+#include <media/v4l2-event.h>
+#include <linux/parport.h>
+
+/*#define DEBUG*/				/* Undef me for production */
+
+#ifdef DEBUG
+#define DPRINTF(x, a...) printk(KERN_DEBUG "W9966: %s(): "x, __func__ , ##a)
+#else
+#define DPRINTF(x...)
+#endif
+
+/*
+ *	Defines, simple typedefs etc.
+ */
+
+#define W9966_DRIVERNAME	"W9966CF Webcam"
+#define W9966_MAXCAMS		4	/* Maximum number of cameras */
+#define W9966_RBUFFER		2048	/* Read buffer (must be an even number) */
+#define W9966_SRAMSIZE		131072	/* 128kb */
+#define W9966_SRAMID		0x02	/* check w9966cf.pdf */
+
+/* Empirically determined window limits */
+#define W9966_WND_MIN_X		16
+#define W9966_WND_MIN_Y		14
+#define W9966_WND_MAX_X		705
+#define W9966_WND_MAX_Y		253
+#define W9966_WND_MAX_W		(W9966_WND_MAX_X - W9966_WND_MIN_X)
+#define W9966_WND_MAX_H		(W9966_WND_MAX_Y - W9966_WND_MIN_Y)
+
+/* Keep track of our current state */
+#define W9966_STATE_PDEV	0x01
+#define W9966_STATE_CLAIMED	0x02
+#define W9966_STATE_VDEV	0x04
+
+#define W9966_I2C_W_ID		0x48
+#define W9966_I2C_R_ID		0x49
+#define W9966_I2C_R_DATA	0x08
+#define W9966_I2C_R_CLOCK	0x04
+#define W9966_I2C_W_DATA	0x02
+#define W9966_I2C_W_CLOCK	0x01
+
+struct w9966 {
+	struct v4l2_device v4l2_dev;
+	struct v4l2_ctrl_handler hdl;
+	unsigned char dev_state;
+	unsigned char i2c_state;
+	unsigned short ppmode;
+	struct parport *pport;
+	struct pardevice *pdev;
+	struct video_device vdev;
+	unsigned short width;
+	unsigned short height;
+	unsigned char brightness;
+	signed char contrast;
+	signed char color;
+	signed char hue;
+	struct mutex lock;
+};
+
+/*
+ *	Module specific properties
+ */
+
+MODULE_AUTHOR("Jakob Kemi <jakob.kemi@post.utfors.se>");
+MODULE_DESCRIPTION("Winbond w9966cf WebCam driver (0.32)");
+MODULE_LICENSE("GPL");
+MODULE_VERSION("0.33.1");
+
+#ifdef MODULE
+static char *pardev[] = {[0 ... W9966_MAXCAMS] = ""};
+#else
+static char *pardev[] = {[0 ... W9966_MAXCAMS] = "aggressive"};
+#endif
+module_param_array(pardev, charp, NULL, 0);
+MODULE_PARM_DESC(pardev, "pardev: where to search for\n"
+		"\teach camera. 'aggressive' means brute-force search.\n"
+		"\tEg: >pardev=parport3,aggressive,parport2,parport1< would assign\n"
+		"\tcam 1 to parport3 and search every parport for cam 2 etc...");
+
+static int parmode;
+module_param(parmode, int, 0);
+MODULE_PARM_DESC(parmode, "parmode: transfer mode (0=auto, 1=ecp, 2=epp");
+
+static int video_nr = -1;
+module_param(video_nr, int, 0);
+
+static struct w9966 w9966_cams[W9966_MAXCAMS];
+
+/*
+ *	Private function defines
+ */
+
+
+/* Set camera phase flags, so we know what to uninit when terminating */
+static inline void w9966_set_state(struct w9966 *cam, int mask, int val)
+{
+	cam->dev_state = (cam->dev_state & ~mask) ^ val;
+}
+
+/* Get camera phase flags */
+static inline int w9966_get_state(struct w9966 *cam, int mask, int val)
+{
+	return ((cam->dev_state & mask) == val);
+}
+
+/* Claim parport for ourself */
+static void w9966_pdev_claim(struct w9966 *cam)
+{
+	if (w9966_get_state(cam, W9966_STATE_CLAIMED, W9966_STATE_CLAIMED))
+		return;
+	parport_claim_or_block(cam->pdev);
+	w9966_set_state(cam, W9966_STATE_CLAIMED, W9966_STATE_CLAIMED);
+}
+
+/* Release parport for others to use */
+static void w9966_pdev_release(struct w9966 *cam)
+{
+	if (w9966_get_state(cam, W9966_STATE_CLAIMED, 0))
+		return;
+	parport_release(cam->pdev);
+	w9966_set_state(cam, W9966_STATE_CLAIMED, 0);
+}
+
+/* Read register from W9966 interface-chip
+   Expects a claimed pdev
+   -1 on error, else register data (byte) */
+static int w9966_read_reg(struct w9966 *cam, int reg)
+{
+	/* ECP, read, regtransfer, REG, REG, REG, REG, REG */
+	const unsigned char addr = 0x80 | (reg & 0x1f);
+	unsigned char val;
+
+	if (parport_negotiate(cam->pport, cam->ppmode | IEEE1284_ADDR) != 0)
+		return -1;
+	if (parport_write(cam->pport, &addr, 1) != 1)
+		return -1;
+	if (parport_negotiate(cam->pport, cam->ppmode | IEEE1284_DATA) != 0)
+		return -1;
+	if (parport_read(cam->pport, &val, 1) != 1)
+		return -1;
+
+	return val;
+}
+
+/* Write register to W9966 interface-chip
+   Expects a claimed pdev
+   -1 on error */
+static int w9966_write_reg(struct w9966 *cam, int reg, int data)
+{
+	/* ECP, write, regtransfer, REG, REG, REG, REG, REG */
+	const unsigned char addr = 0xc0 | (reg & 0x1f);
+	const unsigned char val = data;
+
+	if (parport_negotiate(cam->pport, cam->ppmode | IEEE1284_ADDR) != 0)
+		return -1;
+	if (parport_write(cam->pport, &addr, 1) != 1)
+		return -1;
+	if (parport_negotiate(cam->pport, cam->ppmode | IEEE1284_DATA) != 0)
+		return -1;
+	if (parport_write(cam->pport, &val, 1) != 1)
+		return -1;
+
+	return 0;
+}
+
+/*
+ *	Ugly and primitive i2c protocol functions
+ */
+
+/* Sets the data line on the i2c bus.
+   Expects a claimed pdev. */
+static void w9966_i2c_setsda(struct w9966 *cam, int state)
+{
+	if (state)
+		cam->i2c_state |= W9966_I2C_W_DATA;
+	else
+		cam->i2c_state &= ~W9966_I2C_W_DATA;
+
+	w9966_write_reg(cam, 0x18, cam->i2c_state);
+	udelay(5);
+}
+
+/* Get peripheral clock line
+   Expects a claimed pdev. */
+static int w9966_i2c_getscl(struct w9966 *cam)
+{
+	const unsigned char state = w9966_read_reg(cam, 0x18);
+	return ((state & W9966_I2C_R_CLOCK) > 0);
+}
+
+/* Sets the clock line on the i2c bus.
+   Expects a claimed pdev. -1 on error */
+static int w9966_i2c_setscl(struct w9966 *cam, int state)
+{
+	unsigned long timeout;
+
+	if (state)
+		cam->i2c_state |= W9966_I2C_W_CLOCK;
+	else
+		cam->i2c_state &= ~W9966_I2C_W_CLOCK;
+
+	w9966_write_reg(cam, 0x18, cam->i2c_state);
+	udelay(5);
+
+	/* we go to high, we also expect the peripheral to ack. */
+	if (state) {
+		timeout = jiffies + 100;
+		while (!w9966_i2c_getscl(cam)) {
+			if (time_after(jiffies, timeout))
+				return -1;
+		}
+	}
+	return 0;
+}
+
+#if 0
+/* Get peripheral data line
+   Expects a claimed pdev. */
+static int w9966_i2c_getsda(struct w9966 *cam)
+{
+	const unsigned char state = w9966_read_reg(cam, 0x18);
+	return ((state & W9966_I2C_R_DATA) > 0);
+}
+#endif
+
+/* Write a byte with ack to the i2c bus.
+   Expects a claimed pdev. -1 on error */
+static int w9966_i2c_wbyte(struct w9966 *cam, int data)
+{
+	int i;
+
+	for (i = 7; i >= 0; i--) {
+		w9966_i2c_setsda(cam, (data >> i) & 0x01);
+
+		if (w9966_i2c_setscl(cam, 1) == -1)
+			return -1;
+		w9966_i2c_setscl(cam, 0);
+	}
+
+	w9966_i2c_setsda(cam, 1);
+
+	if (w9966_i2c_setscl(cam, 1) == -1)
+		return -1;
+	w9966_i2c_setscl(cam, 0);
+
+	return 0;
+}
+
+/* Read a data byte with ack from the i2c-bus
+   Expects a claimed pdev. -1 on error */
+#if 0
+static int w9966_i2c_rbyte(struct w9966 *cam)
+{
+	unsigned char data = 0x00;
+	int i;
+
+	w9966_i2c_setsda(cam, 1);
+
+	for (i = 0; i < 8; i++) {
+		if (w9966_i2c_setscl(cam, 1) == -1)
+			return -1;
+		data = data << 1;
+		if (w9966_i2c_getsda(cam))
+			data |= 0x01;
+
+		w9966_i2c_setscl(cam, 0);
+	}
+	return data;
+}
+#endif
+
+/* Read a register from the i2c device.
+   Expects claimed pdev. -1 on error */
+#if 0
+static int w9966_read_reg_i2c(struct w9966 *cam, int reg)
+{
+	int data;
+
+	w9966_i2c_setsda(cam, 0);
+	w9966_i2c_setscl(cam, 0);
+
+	if (w9966_i2c_wbyte(cam, W9966_I2C_W_ID) == -1 ||
+	    w9966_i2c_wbyte(cam, reg) == -1)
+		return -1;
+
+	w9966_i2c_setsda(cam, 1);
+	if (w9966_i2c_setscl(cam, 1) == -1)
+		return -1;
+	w9966_i2c_setsda(cam, 0);
+	w9966_i2c_setscl(cam, 0);
+
+	if (w9966_i2c_wbyte(cam, W9966_I2C_R_ID) == -1)
+		return -1;
+	data = w9966_i2c_rbyte(cam);
+	if (data == -1)
+		return -1;
+
+	w9966_i2c_setsda(cam, 0);
+
+	if (w9966_i2c_setscl(cam, 1) == -1)
+		return -1;
+	w9966_i2c_setsda(cam, 1);
+
+	return data;
+}
+#endif
+
+/* Write a register to the i2c device.
+   Expects claimed pdev. -1 on error */
+static int w9966_write_reg_i2c(struct w9966 *cam, int reg, int data)
+{
+	w9966_i2c_setsda(cam, 0);
+	w9966_i2c_setscl(cam, 0);
+
+	if (w9966_i2c_wbyte(cam, W9966_I2C_W_ID) == -1 ||
+			w9966_i2c_wbyte(cam, reg) == -1 ||
+			w9966_i2c_wbyte(cam, data) == -1)
+		return -1;
+
+	w9966_i2c_setsda(cam, 0);
+	if (w9966_i2c_setscl(cam, 1) == -1)
+		return -1;
+
+	w9966_i2c_setsda(cam, 1);
+
+	return 0;
+}
+
+/* Find a good length for capture window (used both for W and H)
+   A bit ugly but pretty functional. The capture length
+   have to match the downscale */
+static int w9966_findlen(int near, int size, int maxlen)
+{
+	int bestlen = size;
+	int besterr = abs(near - bestlen);
+	int len;
+
+	for (len = size + 1; len < maxlen; len++) {
+		int err;
+		if (((64 * size) % len) != 0)
+			continue;
+
+		err = abs(near - len);
+
+		/* Only continue as long as we keep getting better values */
+		if (err > besterr)
+			break;
+
+		besterr = err;
+		bestlen = len;
+	}
+
+	return bestlen;
+}
+
+/* Modify capture window (if necessary)
+   and calculate downscaling
+   Return -1 on error */
+static int w9966_calcscale(int size, int min, int max, int *beg, int *end, unsigned char *factor)
+{
+	int maxlen = max - min;
+	int len = *end - *beg + 1;
+	int newlen = w9966_findlen(len, size, maxlen);
+	int err = newlen - len;
+
+	/* Check for bad format */
+	if (newlen > maxlen || newlen < size)
+		return -1;
+
+	/* Set factor (6 bit fixed) */
+	*factor = (64 * size) / newlen;
+	if (*factor == 64)
+		*factor = 0x00;	/* downscale is disabled */
+	else
+		*factor |= 0x80; /* set downscale-enable bit */
+
+	/* Modify old beginning and end */
+	*beg -= err / 2;
+	*end += err - (err / 2);
+
+	/* Move window if outside borders */
+	if (*beg < min) {
+		*end += min - *beg;
+		*beg += min - *beg;
+	}
+	if (*end > max) {
+		*beg -= *end - max;
+		*end -= *end - max;
+	}
+
+	return 0;
+}
+
+/* Setup the cameras capture window etc.
+   Expects a claimed pdev
+   return -1 on error */
+static int w9966_setup(struct w9966 *cam, int x1, int y1, int x2, int y2, int w, int h)
+{
+	unsigned int i;
+	unsigned int enh_s, enh_e;
+	unsigned char scale_x, scale_y;
+	unsigned char regs[0x1c];
+	unsigned char saa7111_regs[] = {
+		0x21, 0x00, 0xd8, 0x23, 0x00, 0x80, 0x80, 0x00,
+		0x88, 0x10, 0x80, 0x40, 0x40, 0x00, 0x01, 0x00,
+		0x48, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+		0x00, 0x00, 0x00, 0x71, 0xe7, 0x00, 0x00, 0xc0
+	};
+
+
+	if (w * h * 2 > W9966_SRAMSIZE) {
+		DPRINTF("capture window exceeds SRAM size!.\n");
+		w = 200; h = 160;	/* Pick default values */
+	}
+
+	w &= ~0x1;
+	if (w < 2)
+		w = 2;
+	if (h < 1)
+		h = 1;
+	if (w > W9966_WND_MAX_W)
+		w = W9966_WND_MAX_W;
+	if (h > W9966_WND_MAX_H)
+		h = W9966_WND_MAX_H;
+
+	cam->width = w;
+	cam->height = h;
+
+	enh_s = 0;
+	enh_e = w * h * 2;
+
+	/* Modify capture window if necessary and calculate downscaling */
+	if (w9966_calcscale(w, W9966_WND_MIN_X, W9966_WND_MAX_X, &x1, &x2, &scale_x) != 0 ||
+			w9966_calcscale(h, W9966_WND_MIN_Y, W9966_WND_MAX_Y, &y1, &y2, &scale_y) != 0)
+		return -1;
+
+	DPRINTF("%dx%d, x: %d<->%d, y: %d<->%d, sx: %d/64, sy: %d/64.\n",
+			w, h, x1, x2, y1, y2, scale_x & ~0x80, scale_y & ~0x80);
+
+	/* Setup registers */
+	regs[0x00] = 0x00;			/* Set normal operation */
+	regs[0x01] = 0x18;			/* Capture mode */
+	regs[0x02] = scale_y;			/* V-scaling */
+	regs[0x03] = scale_x;			/* H-scaling */
+
+	/* Capture window */
+	regs[0x04] = (x1 & 0x0ff);		/* X-start (8 low bits) */
+	regs[0x05] = (x1 & 0x300)>>8;		/* X-start (2 high bits) */
+	regs[0x06] = (y1 & 0x0ff);		/* Y-start (8 low bits) */
+	regs[0x07] = (y1 & 0x300)>>8;		/* Y-start (2 high bits) */
+	regs[0x08] = (x2 & 0x0ff);		/* X-end (8 low bits) */
+	regs[0x09] = (x2 & 0x300)>>8;		/* X-end (2 high bits) */
+	regs[0x0a] = (y2 & 0x0ff);		/* Y-end (8 low bits) */
+
+	regs[0x0c] = W9966_SRAMID;		/* SRAM-banks (1x 128kb) */
+
+	/* Enhancement layer */
+	regs[0x0d] = (enh_s & 0x000ff);		/* Enh. start (0-7) */
+	regs[0x0e] = (enh_s & 0x0ff00) >> 8;	/* Enh. start (8-15) */
+	regs[0x0f] = (enh_s & 0x70000) >> 16;	/* Enh. start (16-17/18??) */
+	regs[0x10] = (enh_e & 0x000ff);		/* Enh. end (0-7) */
+	regs[0x11] = (enh_e & 0x0ff00) >> 8;	/* Enh. end (8-15) */
+	regs[0x12] = (enh_e & 0x70000) >> 16;	/* Enh. end (16-17/18??) */
+
+	/* Misc */
+	regs[0x13] = 0x40;			/* VEE control (raw 4:2:2) */
+	regs[0x17] = 0x00;			/* ??? */
+	regs[0x18] = cam->i2c_state = 0x00;	/* Serial bus */
+	regs[0x19] = 0xff;			/* I/O port direction control */
+	regs[0x1a] = 0xff;			/* I/O port data register */
+	regs[0x1b] = 0x10;			/* ??? */
+
+	/* SAA7111 chip settings */
+	saa7111_regs[0x0a] = cam->brightness;
+	saa7111_regs[0x0b] = cam->contrast;
+	saa7111_regs[0x0c] = cam->color;
+	saa7111_regs[0x0d] = cam->hue;
+
+	/* Reset (ECP-fifo & serial-bus) */
+	if (w9966_write_reg(cam, 0x00, 0x03) == -1)
+		return -1;
+
+	/* Write regs to w9966cf chip */
+	for (i = 0; i < 0x1c; i++)
+		if (w9966_write_reg(cam, i, regs[i]) == -1)
+			return -1;
+
+	/* Write regs to saa7111 chip */
+	for (i = 0; i < 0x20; i++)
+		if (w9966_write_reg_i2c(cam, i, saa7111_regs[i]) == -1)
+			return -1;
+
+	return 0;
+}
+
+/*
+ *	Video4linux interfacing
+ */
+
+static int cam_querycap(struct file *file, void  *priv,
+					struct v4l2_capability *vcap)
+{
+	struct w9966 *cam = video_drvdata(file);
+
+	strlcpy(vcap->driver, cam->v4l2_dev.name, sizeof(vcap->driver));
+	strlcpy(vcap->card, W9966_DRIVERNAME, sizeof(vcap->card));
+	strlcpy(vcap->bus_info, "parport", sizeof(vcap->bus_info));
+	vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
+	vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS;
+	return 0;
+}
+
+static int cam_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
+{
+	if (vin->index > 0)
+		return -EINVAL;
+	strlcpy(vin->name, "Camera", sizeof(vin->name));
+	vin->type = V4L2_INPUT_TYPE_CAMERA;
+	vin->audioset = 0;
+	vin->tuner = 0;
+	vin->std = 0;
+	vin->status = 0;
+	return 0;
+}
+
+static int cam_g_input(struct file *file, void *fh, unsigned int *inp)
+{
+	*inp = 0;
+	return 0;
+}
+
+static int cam_s_input(struct file *file, void *fh, unsigned int inp)
+{
+	return (inp > 0) ? -EINVAL : 0;
+}
+
+static int cam_s_ctrl(struct v4l2_ctrl *ctrl)
+{
+	struct w9966 *cam =
+		container_of(ctrl->handler, struct w9966, hdl);
+	int ret = 0;
+
+	mutex_lock(&cam->lock);
+	switch (ctrl->id) {
+	case V4L2_CID_BRIGHTNESS:
+		cam->brightness = ctrl->val;
+		break;
+	case V4L2_CID_CONTRAST:
+		cam->contrast = ctrl->val;
+		break;
+	case V4L2_CID_SATURATION:
+		cam->color = ctrl->val;
+		break;
+	case V4L2_CID_HUE:
+		cam->hue = ctrl->val;
+		break;
+	default:
+		ret = -EINVAL;
+		break;
+	}
+
+	if (ret == 0) {
+		w9966_pdev_claim(cam);
+
+		if (w9966_write_reg_i2c(cam, 0x0a, cam->brightness) == -1 ||
+		    w9966_write_reg_i2c(cam, 0x0b, cam->contrast) == -1 ||
+		    w9966_write_reg_i2c(cam, 0x0c, cam->color) == -1 ||
+		    w9966_write_reg_i2c(cam, 0x0d, cam->hue) == -1) {
+			ret = -EIO;
+		}
+
+		w9966_pdev_release(cam);
+	}
+	mutex_unlock(&cam->lock);
+	return ret;
+}
+
+static int cam_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct w9966 *cam = video_drvdata(file);
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+
+	pix->width = cam->width;
+	pix->height = cam->height;
+	pix->pixelformat = V4L2_PIX_FMT_YUYV;
+	pix->field = V4L2_FIELD_NONE;
+	pix->bytesperline = 2 * cam->width;
+	pix->sizeimage = 2 * cam->width * cam->height;
+	/* Just a guess */
+	pix->colorspace = V4L2_COLORSPACE_SMPTE170M;
+	return 0;
+}
+
+static int cam_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+
+	if (pix->width < 2)
+		pix->width = 2;
+	if (pix->height < 1)
+		pix->height = 1;
+	if (pix->width > W9966_WND_MAX_W)
+		pix->width = W9966_WND_MAX_W;
+	if (pix->height > W9966_WND_MAX_H)
+		pix->height = W9966_WND_MAX_H;
+	pix->pixelformat = V4L2_PIX_FMT_YUYV;
+	pix->field = V4L2_FIELD_NONE;
+	pix->bytesperline = 2 * pix->width;
+	pix->sizeimage = 2 * pix->width * pix->height;
+	/* Just a guess */
+	pix->colorspace = V4L2_COLORSPACE_SMPTE170M;
+	return 0;
+}
+
+static int cam_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
+{
+	struct w9966 *cam = video_drvdata(file);
+	struct v4l2_pix_format *pix = &fmt->fmt.pix;
+	int ret = cam_try_fmt_vid_cap(file, fh, fmt);
+
+	if (ret)
+		return ret;
+
+	mutex_lock(&cam->lock);
+	/* Update camera regs */
+	w9966_pdev_claim(cam);
+	ret = w9966_setup(cam, 0, 0, 1023, 1023, pix->width, pix->height);
+	w9966_pdev_release(cam);
+	mutex_unlock(&cam->lock);
+	return ret;
+}
+
+static int cam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt)
+{
+	static struct v4l2_fmtdesc formats[] = {
+		{ 0, 0, 0,
+		  "YUV 4:2:2", V4L2_PIX_FMT_YUYV,
+		  { 0, 0, 0, 0 }
+		},
+	};
+	enum v4l2_buf_type type = fmt->type;
+
+	if (fmt->index > 0)
+		return -EINVAL;
+
+	*fmt = formats[fmt->index];
+	fmt->type = type;
+	return 0;
+}
+
+/* Capture data */
+static ssize_t w9966_v4l_read(struct file *file, char  __user *buf,
+		size_t count, loff_t *ppos)
+{
+	struct w9966 *cam = video_drvdata(file);
+	unsigned char addr = 0xa0;	/* ECP, read, CCD-transfer, 00000 */
+	unsigned char __user *dest = (unsigned char __user *)buf;
+	unsigned long dleft = count;
+	unsigned char *tbuf;
+
+	/* Why would anyone want more than this?? */
+	if (count > cam->width * cam->height * 2)
+		return -EINVAL;
+
+	mutex_lock(&cam->lock);
+	w9966_pdev_claim(cam);
+	w9966_write_reg(cam, 0x00, 0x02);	/* Reset ECP-FIFO buffer */
+	w9966_write_reg(cam, 0x00, 0x00);	/* Return to normal operation */
+	w9966_write_reg(cam, 0x01, 0x98);	/* Enable capture */
+
+	/* write special capture-addr and negotiate into data transfer */
+	if ((parport_negotiate(cam->pport, cam->ppmode|IEEE1284_ADDR) != 0) ||
+			(parport_write(cam->pport, &addr, 1) != 1) ||
+			(parport_negotiate(cam->pport, cam->ppmode|IEEE1284_DATA) != 0)) {
+		w9966_pdev_release(cam);
+		mutex_unlock(&cam->lock);
+		return -EFAULT;
+	}
+
+	tbuf = kmalloc(W9966_RBUFFER, GFP_KERNEL);
+	if (tbuf == NULL) {
+		count = -ENOMEM;
+		goto out;
+	}
+
+	while (dleft > 0) {
+		unsigned long tsize = (dleft > W9966_RBUFFER) ? W9966_RBUFFER : dleft;
+
+		if (parport_read(cam->pport, tbuf, tsize) < tsize) {
+			count = -EFAULT;
+			goto out;
+		}
+		if (copy_to_user(dest, tbuf, tsize) != 0) {
+			count = -EFAULT;
+			goto out;
+		}
+		dest += tsize;
+		dleft -= tsize;
+	}
+
+	w9966_write_reg(cam, 0x01, 0x18);	/* Disable capture */
+
+out:
+	kfree(tbuf);
+	w9966_pdev_release(cam);
+	mutex_unlock(&cam->lock);
+
+	return count;
+}
+
+static const struct v4l2_file_operations w9966_fops = {
+	.owner		= THIS_MODULE,
+	.open		= v4l2_fh_open,
+	.release	= v4l2_fh_release,
+	.poll		= v4l2_ctrl_poll,
+	.unlocked_ioctl = video_ioctl2,
+	.read           = w9966_v4l_read,
+};
+
+static const struct v4l2_ioctl_ops w9966_ioctl_ops = {
+	.vidioc_querycap    		    = cam_querycap,
+	.vidioc_g_input      		    = cam_g_input,
+	.vidioc_s_input      		    = cam_s_input,
+	.vidioc_enum_input   		    = cam_enum_input,
+	.vidioc_enum_fmt_vid_cap 	    = cam_enum_fmt_vid_cap,
+	.vidioc_g_fmt_vid_cap 		    = cam_g_fmt_vid_cap,
+	.vidioc_s_fmt_vid_cap  		    = cam_s_fmt_vid_cap,
+	.vidioc_try_fmt_vid_cap  	    = cam_try_fmt_vid_cap,
+	.vidioc_log_status		    = v4l2_ctrl_log_status,
+	.vidioc_subscribe_event		    = v4l2_ctrl_subscribe_event,
+	.vidioc_unsubscribe_event	    = v4l2_event_unsubscribe,
+};
+
+static const struct v4l2_ctrl_ops cam_ctrl_ops = {
+	.s_ctrl = cam_s_ctrl,
+};
+
+
+/* Initialize camera device. Setup all internal flags, set a
+   default video mode, setup ccd-chip, register v4l device etc..
+   Also used for 'probing' of hardware.
+   -1 on error */
+static int w9966_init(struct w9966 *cam, struct parport *port)
+{
+	struct v4l2_device *v4l2_dev = &cam->v4l2_dev;
+
+	if (cam->dev_state != 0)
+		return -1;
+
+	strlcpy(v4l2_dev->name, "w9966", sizeof(v4l2_dev->name));
+
+	if (v4l2_device_register(NULL, v4l2_dev) < 0) {
+		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
+		return -1;
+	}
+
+	v4l2_ctrl_handler_init(&cam->hdl, 4);
+	v4l2_ctrl_new_std(&cam->hdl, &cam_ctrl_ops,
+			  V4L2_CID_BRIGHTNESS, 0, 255, 1, 128);
+	v4l2_ctrl_new_std(&cam->hdl, &cam_ctrl_ops,
+			  V4L2_CID_CONTRAST, -64, 64, 1, 64);
+	v4l2_ctrl_new_std(&cam->hdl, &cam_ctrl_ops,
+			  V4L2_CID_SATURATION, -64, 64, 1, 64);
+	v4l2_ctrl_new_std(&cam->hdl, &cam_ctrl_ops,
+			  V4L2_CID_HUE, -128, 127, 1, 0);
+	if (cam->hdl.error) {
+		v4l2_err(v4l2_dev, "couldn't register controls\n");
+		return -1;
+	}
+	cam->pport = port;
+	cam->brightness = 128;
+	cam->contrast = 64;
+	cam->color = 64;
+	cam->hue = 0;
+
+	/* Select requested transfer mode */
+	switch (parmode) {
+	default:	/* Auto-detect (priority: hw-ecp, hw-epp, sw-ecp) */
+	case 0:
+		if (port->modes & PARPORT_MODE_ECP)
+			cam->ppmode = IEEE1284_MODE_ECP;
+		else if (port->modes & PARPORT_MODE_EPP)
+			cam->ppmode = IEEE1284_MODE_EPP;
+		else
+			cam->ppmode = IEEE1284_MODE_ECP;
+		break;
+	case 1:		/* hw- or sw-ecp */
+		cam->ppmode = IEEE1284_MODE_ECP;
+		break;
+	case 2:		/* hw- or sw-epp */
+		cam->ppmode = IEEE1284_MODE_EPP;
+		break;
+	}
+
+	/* Tell the parport driver that we exists */
+	cam->pdev = parport_register_device(port, "w9966", NULL, NULL, NULL, 0, NULL);
+	if (cam->pdev == NULL) {
+		DPRINTF("parport_register_device() failed\n");
+		return -1;
+	}
+	w9966_set_state(cam, W9966_STATE_PDEV, W9966_STATE_PDEV);
+
+	w9966_pdev_claim(cam);
+
+	/* Setup a default capture mode */
+	if (w9966_setup(cam, 0, 0, 1023, 1023, 200, 160) != 0) {
+		DPRINTF("w9966_setup() failed.\n");
+		return -1;
+	}
+
+	w9966_pdev_release(cam);
+
+	/* Fill in the video_device struct and register us to v4l */
+	strlcpy(cam->vdev.name, W9966_DRIVERNAME, sizeof(cam->vdev.name));
+	cam->vdev.v4l2_dev = v4l2_dev;
+	cam->vdev.fops = &w9966_fops;
+	cam->vdev.ioctl_ops = &w9966_ioctl_ops;
+	cam->vdev.release = video_device_release_empty;
+	cam->vdev.ctrl_handler = &cam->hdl;
+	set_bit(V4L2_FL_USE_FH_PRIO, &cam->vdev.flags);
+	video_set_drvdata(&cam->vdev, cam);
+
+	mutex_init(&cam->lock);
+
+	if (video_register_device(&cam->vdev, VFL_TYPE_GRABBER, video_nr) < 0)
+		return -1;
+
+	w9966_set_state(cam, W9966_STATE_VDEV, W9966_STATE_VDEV);
+
+	/* All ok */
+	v4l2_info(v4l2_dev, "Found and initialized a webcam on %s.\n",
+			cam->pport->name);
+	return 0;
+}
+
+
+/* Terminate everything gracefully */
+static void w9966_term(struct w9966 *cam)
+{
+	/* Unregister from v4l */
+	if (w9966_get_state(cam, W9966_STATE_VDEV, W9966_STATE_VDEV)) {
+		video_unregister_device(&cam->vdev);
+		w9966_set_state(cam, W9966_STATE_VDEV, 0);
+	}
+
+	v4l2_ctrl_handler_free(&cam->hdl);
+
+	/* Terminate from IEEE1284 mode and release pdev block */
+	if (w9966_get_state(cam, W9966_STATE_PDEV, W9966_STATE_PDEV)) {
+		w9966_pdev_claim(cam);
+		parport_negotiate(cam->pport, IEEE1284_MODE_COMPAT);
+		w9966_pdev_release(cam);
+	}
+
+	/* Unregister from parport */
+	if (w9966_get_state(cam, W9966_STATE_PDEV, W9966_STATE_PDEV)) {
+		parport_unregister_device(cam->pdev);
+		w9966_set_state(cam, W9966_STATE_PDEV, 0);
+	}
+	memset(cam, 0, sizeof(*cam));
+}
+
+
+/* Called once for every parport on init */
+static void w9966_attach(struct parport *port)
+{
+	int i;
+
+	for (i = 0; i < W9966_MAXCAMS; i++) {
+		if (w9966_cams[i].dev_state != 0)	/* Cam is already assigned */
+			continue;
+		if (strcmp(pardev[i], "aggressive") == 0 || strcmp(pardev[i], port->name) == 0) {
+			if (w9966_init(&w9966_cams[i], port) != 0)
+				w9966_term(&w9966_cams[i]);
+			break;	/* return */
+		}
+	}
+}
+
+/* Called once for every parport on termination */
+static void w9966_detach(struct parport *port)
+{
+	int i;
+
+	for (i = 0; i < W9966_MAXCAMS; i++)
+		if (w9966_cams[i].dev_state != 0 && w9966_cams[i].pport == port)
+			w9966_term(&w9966_cams[i]);
+}
+
+
+static struct parport_driver w9966_ppd = {
+	.name = W9966_DRIVERNAME,
+	.attach = w9966_attach,
+	.detach = w9966_detach,
+};
+
+/* Module entry point */
+static int __init w9966_mod_init(void)
+{
+	int i;
+
+	for (i = 0; i < W9966_MAXCAMS; i++)
+		w9966_cams[i].dev_state = 0;
+
+	return parport_register_driver(&w9966_ppd);
+}
+
+/* Module cleanup */
+static void __exit w9966_mod_term(void)
+{
+	parport_unregister_driver(&w9966_ppd);
+}
+
+module_init(w9966_mod_init);
+module_exit(w9966_mod_term);
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index d545d93..f9703a0 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -606,67 +606,6 @@ config VIDEO_VIVI
 	  In doubt, say N.
 
 #
-# ISA & parallel port drivers configuration
-#	All devices here are webcam or grabber devices
-#
-
-menuconfig V4L_ISA_PARPORT_DRIVERS
-	bool "V4L ISA and parallel port devices"
-	depends on ISA || PARPORT
-	depends on MEDIA_CAMERA_SUPPORT
-	default n
-	---help---
-	  Say Y here to enable support for these ISA and parallel port drivers.
-
-if V4L_ISA_PARPORT_DRIVERS
-
-config VIDEO_BWQCAM
-	tristate "Quickcam BW Video For Linux"
-	depends on PARPORT && VIDEO_V4L2
-	help
-	  Say Y have if you the black and white version of the QuickCam
-	  camera. See the next option for the color version.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called bw-qcam.
-
-config VIDEO_CQCAM
-	tristate "QuickCam Colour Video For Linux"
-	depends on PARPORT && VIDEO_V4L2
-	help
-	  This is the video4linux driver for the colour version of the
-	  Connectix QuickCam.  If you have one of these cameras, say Y here,
-	  otherwise say N.  This driver does not work with the original
-	  monochrome QuickCam, QuickCam VC or QuickClip.  It is also available
-	  as a module (c-qcam).
-	  Read <file:Documentation/video4linux/CQcam.txt> for more information.
-
-config VIDEO_PMS
-	tristate "Mediavision Pro Movie Studio Video For Linux"
-	depends on ISA && VIDEO_V4L2
-	help
-	  Say Y if you have the ISA Mediavision Pro Movie Studio
-	  capture card.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called pms.
-
-config VIDEO_W9966
-	tristate "W9966CF Webcam (FlyCam Supra and others) Video For Linux"
-	depends on PARPORT_1284 && PARPORT && VIDEO_V4L2
-	help
-	  Video4linux driver for Winbond's w9966 based Webcams.
-	  Currently tested with the LifeView FlyCam Supra.
-	  If you have one of these cameras, say Y here
-	  otherwise say N.
-	  This driver is also available as a module (w9966).
-
-	  Check out <file:Documentation/video4linux/w9966.txt> for more
-	  information.
-
-endif # V4L_ISA_PARPORT_DRIVERS
-
-#
 # Platform drivers
 #	All drivers here are currently for webcam support
 
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index f212af3..a0c6692 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -87,10 +87,6 @@ obj-$(CONFIG_SOC_CAMERA_TW9910)		+= tw9910.o
 
 # And now the v4l2 drivers:
 
-obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
-obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
-obj-$(CONFIG_VIDEO_W9966) += w9966.o
-obj-$(CONFIG_VIDEO_PMS) += pms.o
 obj-$(CONFIG_VIDEO_VINO) += vino.o
 obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
 
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c
deleted file mode 100644
index 5b75a64..0000000
--- a/drivers/media/video/bw-qcam.c
+++ /dev/null
@@ -1,1113 +0,0 @@
-/*
- *    QuickCam Driver For Video4Linux.
- *
- *	Video4Linux conversion work by Alan Cox.
- *	Parport compatibility by Phil Blundell.
- *	Busy loop avoidance by Mark Cooke.
- *
- *    Module parameters:
- *
- *	maxpoll=<1 - 5000>
- *
- *	  When polling the QuickCam for a response, busy-wait for a
- *	  maximum of this many loops. The default of 250 gives little
- *	  impact on interactive response.
- *
- *	  NOTE: If this parameter is set too high, the processor
- *		will busy wait until this loop times out, and then
- *		slowly poll for a further 5 seconds before failing
- *		the transaction. You have been warned.
- *
- *	yieldlines=<1 - 250>
- *
- *	  When acquiring a frame from the camera, the data gathering
- *	  loop will yield back to the scheduler after completing
- *	  this many lines. The default of 4 provides a trade-off
- *	  between increased frame acquisition time and impact on
- *	  interactive response.
- */
-
-/* qcam-lib.c -- Library for programming with the Connectix QuickCam.
- * See the included documentation for usage instructions and details
- * of the protocol involved. */
-
-
-/* Version 0.5, August 4, 1996 */
-/* Version 0.7, August 27, 1996 */
-/* Version 0.9, November 17, 1996 */
-
-
-/******************************************************************
-
-Copyright (C) 1996 by Scott Laird
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL SCOTT LAIRD BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#include <linux/module.h>
-#include <linux/delay.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/mm.h>
-#include <linux/parport.h>
-#include <linux/sched.h>
-#include <linux/videodev2.h>
-#include <linux/mutex.h>
-#include <asm/uaccess.h>
-#include <media/v4l2-common.h>
-#include <media/v4l2-ioctl.h>
-#include <media/v4l2-device.h>
-#include <media/v4l2-fh.h>
-#include <media/v4l2-ctrls.h>
-#include <media/v4l2-event.h>
-
-/* One from column A... */
-#define QC_NOTSET 0
-#define QC_UNIDIR 1
-#define QC_BIDIR  2
-#define QC_SERIAL 3
-
-/* ... and one from column B */
-#define QC_ANY          0x00
-#define QC_FORCE_UNIDIR 0x10
-#define QC_FORCE_BIDIR  0x20
-#define QC_FORCE_SERIAL 0x30
-/* in the port_mode member */
-
-#define QC_MODE_MASK    0x07
-#define QC_FORCE_MASK   0x70
-
-#define MAX_HEIGHT 243
-#define MAX_WIDTH 336
-
-/* Bit fields for status flags */
-#define QC_PARAM_CHANGE	0x01 /* Camera status change has occurred */
-
-struct qcam {
-	struct v4l2_device v4l2_dev;
-	struct video_device vdev;
-	struct v4l2_ctrl_handler hdl;
-	struct pardevice *pdev;
-	struct parport *pport;
-	struct mutex lock;
-	int width, height;
-	int bpp;
-	int mode;
-	int contrast, brightness, whitebal;
-	int port_mode;
-	int transfer_scale;
-	int top, left;
-	int status;
-	unsigned int saved_bits;
-	unsigned long in_use;
-};
-
-static unsigned int maxpoll = 250;   /* Maximum busy-loop count for qcam I/O */
-static unsigned int yieldlines = 4;  /* Yield after this many during capture */
-static int video_nr = -1;
-static unsigned int force_init;		/* Whether to probe aggressively */
-
-module_param(maxpoll, int, 0);
-module_param(yieldlines, int, 0);
-module_param(video_nr, int, 0);
-
-/* Set force_init=1 to avoid detection by polling status register and
- * immediately attempt to initialize qcam */
-module_param(force_init, int, 0);
-
-#define MAX_CAMS 4
-static struct qcam *qcams[MAX_CAMS];
-static unsigned int num_cams;
-
-static inline int read_lpstatus(struct qcam *q)
-{
-	return parport_read_status(q->pport);
-}
-
-static inline int read_lpdata(struct qcam *q)
-{
-	return parport_read_data(q->pport);
-}
-
-static inline void write_lpdata(struct qcam *q, int d)
-{
-	parport_write_data(q->pport, d);
-}
-
-static void write_lpcontrol(struct qcam *q, int d)
-{
-	if (d & 0x20) {
-		/* Set bidirectional mode to reverse (data in) */
-		parport_data_reverse(q->pport);
-	} else {
-		/* Set bidirectional mode to forward (data out) */
-		parport_data_forward(q->pport);
-	}
-
-	/* Now issue the regular port command, but strip out the
-	 * direction flag */
-	d &= ~0x20;
-	parport_write_control(q->pport, d);
-}
-
-
-/* qc_waithand busy-waits for a handshake signal from the QuickCam.
- * Almost all communication with the camera requires handshaking. */
-
-static int qc_waithand(struct qcam *q, int val)
-{
-	int status;
-	int runs = 0;
-
-	if (val) {
-		while (!((status = read_lpstatus(q)) & 8)) {
-			/* 1000 is enough spins on the I/O for all normal
-			   cases, at that point we start to poll slowly
-			   until the camera wakes up. However, we are
-			   busy blocked until the camera responds, so
-			   setting it lower is much better for interactive
-			   response. */
-
-			if (runs++ > maxpoll)
-				msleep_interruptible(5);
-			if (runs > (maxpoll + 1000)) /* 5 seconds */
-				return -1;
-		}
-	} else {
-		while (((status = read_lpstatus(q)) & 8)) {
-			/* 1000 is enough spins on the I/O for all normal
-			   cases, at that point we start to poll slowly
-			   until the camera wakes up. However, we are
-			   busy blocked until the camera responds, so
-			   setting it lower is much better for interactive
-			   response. */
-
-			if (runs++ > maxpoll)
-				msleep_interruptible(5);
-			if (runs++ > (maxpoll + 1000)) /* 5 seconds */
-				return -1;
-		}
-	}
-
-	return status;
-}
-
-/* Waithand2 is used when the qcam is in bidirectional mode, and the
- * handshaking signal is CamRdy2 (bit 0 of data reg) instead of CamRdy1
- * (bit 3 of status register).  It also returns the last value read,
- * since this data is useful. */
-
-static unsigned int qc_waithand2(struct qcam *q, int val)
-{
-	unsigned int status;
-	int runs = 0;
-
-	do {
-		status = read_lpdata(q);
-		/* 1000 is enough spins on the I/O for all normal
-		   cases, at that point we start to poll slowly
-		   until the camera wakes up. However, we are
-		   busy blocked until the camera responds, so
-		   setting it lower is much better for interactive
-		   response. */
-
-		if (runs++ > maxpoll)
-			msleep_interruptible(5);
-		if (runs++ > (maxpoll + 1000)) /* 5 seconds */
-			return 0;
-	} while ((status & 1) != val);
-
-	return status;
-}
-
-/* qc_command is probably a bit of a misnomer -- it's used to send
- * bytes *to* the camera.  Generally, these bytes are either commands
- * or arguments to commands, so the name fits, but it still bugs me a
- * bit.  See the documentation for a list of commands. */
-
-static int qc_command(struct qcam *q, int command)
-{
-	int n1, n2;
-	int cmd;
-
-	write_lpdata(q, command);
-	write_lpcontrol(q, 6);
-
-	n1 = qc_waithand(q, 1);
-
-	write_lpcontrol(q, 0xe);
-	n2 = qc_waithand(q, 0);
-
-	cmd = (n1 & 0xf0) | ((n2 & 0xf0) >> 4);
-	return cmd;
-}
-
-static int qc_readparam(struct qcam *q)
-{
-	int n1, n2;
-	int cmd;
-
-	write_lpcontrol(q, 6);
-	n1 = qc_waithand(q, 1);
-
-	write_lpcontrol(q, 0xe);
-	n2 = qc_waithand(q, 0);
-
-	cmd = (n1 & 0xf0) | ((n2 & 0xf0) >> 4);
-	return cmd;
-}
-
-
-/* Try to detect a QuickCam.  It appears to flash the upper 4 bits of
-   the status register at 5-10 Hz.  This is only used in the autoprobe
-   code.  Be aware that this isn't the way Connectix detects the
-   camera (they send a reset and try to handshake), but this should be
-   almost completely safe, while their method screws up my printer if
-   I plug it in before the camera. */
-
-static int qc_detect(struct qcam *q)
-{
-	int reg, lastreg;
-	int count = 0;
-	int i;
-
-	if (force_init)
-		return 1;
-
-	lastreg = reg = read_lpstatus(q) & 0xf0;
-
-	for (i = 0; i < 500; i++) {
-		reg = read_lpstatus(q) & 0xf0;
-		if (reg != lastreg)
-			count++;
-		lastreg = reg;
-		mdelay(2);
-	}
-
-
-#if 0
-	/* Force camera detection during testing. Sometimes the camera
-	   won't be flashing these bits. Possibly unloading the module
-	   in the middle of a grab? Or some timeout condition?
-	   I've seen this parameter as low as 19 on my 450Mhz box - mpc */
-	printk(KERN_DEBUG "Debugging: QCam detection counter <30-200 counts as detected>: %d\n", count);
-	return 1;
-#endif
-
-	/* Be (even more) liberal in what you accept...  */
-
-	if (count > 20 && count < 400) {
-		return 1;	/* found */
-	} else {
-		printk(KERN_ERR "No Quickcam found on port %s\n",
-				q->pport->name);
-		printk(KERN_DEBUG "Quickcam detection counter: %u\n", count);
-		return 0;	/* not found */
-	}
-}
-
-/* Decide which scan mode to use.  There's no real requirement that
- * the scanmode match the resolution in q->height and q-> width -- the
- * camera takes the picture at the resolution specified in the
- * "scanmode" and then returns the image at the resolution specified
- * with the resolution commands.  If the scan is bigger than the
- * requested resolution, the upper-left hand corner of the scan is
- * returned.  If the scan is smaller, then the rest of the image
- * returned contains garbage. */
-
-static int qc_setscanmode(struct qcam *q)
-{
-	int old_mode = q->mode;
-
-	switch (q->transfer_scale) {
-	case 1:
-		q->mode = 0;
-		break;
-	case 2:
-		q->mode = 4;
-		break;
-	case 4:
-		q->mode = 8;
-		break;
-	}
-
-	switch (q->bpp) {
-	case 4:
-		break;
-	case 6:
-		q->mode += 2;
-		break;
-	}
-
-	switch (q->port_mode & QC_MODE_MASK) {
-	case QC_BIDIR:
-		q->mode += 1;
-		break;
-	case QC_NOTSET:
-	case QC_UNIDIR:
-		break;
-	}
-
-	if (q->mode != old_mode)
-		q->status |= QC_PARAM_CHANGE;
-
-	return 0;
-}
-
-
-/* Reset the QuickCam.  This uses the same sequence the Windows
- * QuickPic program uses.  Someone with a bi-directional port should
- * check that bi-directional mode is detected right, and then
- * implement bi-directional mode in qc_readbyte(). */
-
-static void qc_reset(struct qcam *q)
-{
-	switch (q->port_mode & QC_FORCE_MASK) {
-	case QC_FORCE_UNIDIR:
-		q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_UNIDIR;
-		break;
-
-	case QC_FORCE_BIDIR:
-		q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_BIDIR;
-		break;
-
-	case QC_ANY:
-		write_lpcontrol(q, 0x20);
-		write_lpdata(q, 0x75);
-
-		if (read_lpdata(q) != 0x75)
-			q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_BIDIR;
-		else
-			q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_UNIDIR;
-		break;
-	}
-
-	write_lpcontrol(q, 0xb);
-	udelay(250);
-	write_lpcontrol(q, 0xe);
-	qc_setscanmode(q);		/* in case port_mode changed */
-}
-
-
-
-/* Reset the QuickCam and program for brightness, contrast,
- * white-balance, and resolution. */
-
-static void qc_set(struct qcam *q)
-{
-	int val;
-	int val2;
-
-	qc_reset(q);
-
-	/* Set the brightness.  Yes, this is repetitive, but it works.
-	 * Shorter versions seem to fail subtly.  Feel free to try :-). */
-	/* I think the problem was in qc_command, not here -- bls */
-
-	qc_command(q, 0xb);
-	qc_command(q, q->brightness);
-
-	val = q->height / q->transfer_scale;
-	qc_command(q, 0x11);
-	qc_command(q, val);
-	if ((q->port_mode & QC_MODE_MASK) == QC_UNIDIR && q->bpp == 6) {
-		/* The normal "transfers per line" calculation doesn't seem to work
-		   as expected here (and yet it works fine in qc_scan).  No idea
-		   why this case is the odd man out.  Fortunately, Laird's original
-		   working version gives me a good way to guess at working values.
-		   -- bls */
-		val = q->width;
-		val2 = q->transfer_scale * 4;
-	} else {
-		val = q->width * q->bpp;
-		val2 = (((q->port_mode & QC_MODE_MASK) == QC_BIDIR) ? 24 : 8) *
-			q->transfer_scale;
-	}
-	val = DIV_ROUND_UP(val, val2);
-	qc_command(q, 0x13);
-	qc_command(q, val);
-
-	/* Setting top and left -- bls */
-	qc_command(q, 0xd);
-	qc_command(q, q->top);
-	qc_command(q, 0xf);
-	qc_command(q, q->left / 2);
-
-	qc_command(q, 0x19);
-	qc_command(q, q->contrast);
-	qc_command(q, 0x1f);
-	qc_command(q, q->whitebal);
-
-	/* Clear flag that we must update the grabbing parameters on the camera
-	   before we grab the next frame */
-	q->status &= (~QC_PARAM_CHANGE);
-}
-
-/* Qc_readbytes reads some bytes from the QC and puts them in
-   the supplied buffer.  It returns the number of bytes read,
-   or -1 on error. */
-
-static inline int qc_readbytes(struct qcam *q, char buffer[])
-{
-	int ret = 1;
-	unsigned int hi, lo;
-	unsigned int hi2, lo2;
-	static int state;
-
-	if (buffer == NULL) {
-		state = 0;
-		return 0;
-	}
-
-	switch (q->port_mode & QC_MODE_MASK) {
-	case QC_BIDIR:		/* Bi-directional Port */
-		write_lpcontrol(q, 0x26);
-		lo = (qc_waithand2(q, 1) >> 1);
-		hi = (read_lpstatus(q) >> 3) & 0x1f;
-		write_lpcontrol(q, 0x2e);
-		lo2 = (qc_waithand2(q, 0) >> 1);
-		hi2 = (read_lpstatus(q) >> 3) & 0x1f;
-		switch (q->bpp) {
-		case 4:
-			buffer[0] = lo & 0xf;
-			buffer[1] = ((lo & 0x70) >> 4) | ((hi & 1) << 3);
-			buffer[2] = (hi & 0x1e) >> 1;
-			buffer[3] = lo2 & 0xf;
-			buffer[4] = ((lo2 & 0x70) >> 4) | ((hi2 & 1) << 3);
-			buffer[5] = (hi2 & 0x1e) >> 1;
-			ret = 6;
-			break;
-		case 6:
-			buffer[0] = lo & 0x3f;
-			buffer[1] = ((lo & 0x40) >> 6) | (hi << 1);
-			buffer[2] = lo2 & 0x3f;
-			buffer[3] = ((lo2 & 0x40) >> 6) | (hi2 << 1);
-			ret = 4;
-			break;
-		}
-		break;
-
-	case QC_UNIDIR:	/* Unidirectional Port */
-		write_lpcontrol(q, 6);
-		lo = (qc_waithand(q, 1) & 0xf0) >> 4;
-		write_lpcontrol(q, 0xe);
-		hi = (qc_waithand(q, 0) & 0xf0) >> 4;
-
-		switch (q->bpp) {
-		case 4:
-			buffer[0] = lo;
-			buffer[1] = hi;
-			ret = 2;
-			break;
-		case 6:
-			switch (state) {
-			case 0:
-				buffer[0] = (lo << 2) | ((hi & 0xc) >> 2);
-				q->saved_bits = (hi & 3) << 4;
-				state = 1;
-				ret = 1;
-				break;
-			case 1:
-				buffer[0] = lo | q->saved_bits;
-				q->saved_bits = hi << 2;
-				state = 2;
-				ret = 1;
-				break;
-			case 2:
-				buffer[0] = ((lo & 0xc) >> 2) | q->saved_bits;
-				buffer[1] = ((lo & 3) << 4) | hi;
-				state = 0;
-				ret = 2;
-				break;
-			}
-			break;
-		}
-		break;
-	}
-	return ret;
-}
-
-/* requests a scan from the camera.  It sends the correct instructions
- * to the camera and then reads back the correct number of bytes.  In
- * previous versions of this routine the return structure contained
- * the raw output from the camera, and there was a 'qc_convertscan'
- * function that converted that to a useful format.  In version 0.3 I
- * rolled qc_convertscan into qc_scan and now I only return the
- * converted scan.  The format is just an one-dimensional array of
- * characters, one for each pixel, with 0=black up to n=white, where
- * n=2^(bit depth)-1.  Ask me for more details if you don't understand
- * this. */
-
-static long qc_capture(struct qcam *q, char __user *buf, unsigned long len)
-{
-	int i, j, k, yield;
-	int bytes;
-	int linestotrans, transperline;
-	int divisor;
-	int pixels_per_line;
-	int pixels_read = 0;
-	int got = 0;
-	char buffer[6];
-	int  shift = 8 - q->bpp;
-	char invert;
-
-	if (q->mode == -1)
-		return -ENXIO;
-
-	qc_command(q, 0x7);
-	qc_command(q, q->mode);
-
-	if ((q->port_mode & QC_MODE_MASK) == QC_BIDIR) {
-		write_lpcontrol(q, 0x2e);	/* turn port around */
-		write_lpcontrol(q, 0x26);
-		qc_waithand(q, 1);
-		write_lpcontrol(q, 0x2e);
-		qc_waithand(q, 0);
-	}
-
-	/* strange -- should be 15:63 below, but 4bpp is odd */
-	invert = (q->bpp == 4) ? 16 : 63;
-
-	linestotrans = q->height / q->transfer_scale;
-	pixels_per_line = q->width / q->transfer_scale;
-	transperline = q->width * q->bpp;
-	divisor = (((q->port_mode & QC_MODE_MASK) == QC_BIDIR) ? 24 : 8) *
-		q->transfer_scale;
-	transperline = DIV_ROUND_UP(transperline, divisor);
-
-	for (i = 0, yield = yieldlines; i < linestotrans; i++) {
-		for (pixels_read = j = 0; j < transperline; j++) {
-			bytes = qc_readbytes(q, buffer);
-			for (k = 0; k < bytes && (pixels_read + k) < pixels_per_line; k++) {
-				int o;
-				if (buffer[k] == 0 && invert == 16) {
-					/* 4bpp is odd (again) -- inverter is 16, not 15, but output
-					   must be 0-15 -- bls */
-					buffer[k] = 16;
-				}
-				o = i * pixels_per_line + pixels_read + k;
-				if (o < len) {
-					u8 ch = invert - buffer[k];
-					got++;
-					put_user(ch << shift, buf + o);
-				}
-			}
-			pixels_read += bytes;
-		}
-		qc_readbytes(q, NULL);	/* reset state machine */
-
-		/* Grabbing an entire frame from the quickcam is a lengthy
-		   process. We don't (usually) want to busy-block the
-		   processor for the entire frame. yieldlines is a module
-		   parameter. If we yield every line, the minimum frame
-		   time will be 240 / 200 = 1.2 seconds. The compile-time
-		   default is to yield every 4 lines. */
-		if (i >= yield) {
-			msleep_interruptible(5);
-			yield = i + yieldlines;
-		}
-	}
-
-	if ((q->port_mode & QC_MODE_MASK) == QC_BIDIR) {
-		write_lpcontrol(q, 2);
-		write_lpcontrol(q, 6);
-		udelay(3);
-		write_lpcontrol(q, 0xe);
-	}
-	if (got < len)
-		return got;
-	return len;
-}
-
-/*
- *	Video4linux interfacing
- */
-
-static int qcam_querycap(struct file *file, void  *priv,
-					struct v4l2_capability *vcap)
-{
-	struct qcam *qcam = video_drvdata(file);
-
-	strlcpy(vcap->driver, qcam->v4l2_dev.name, sizeof(vcap->driver));
-	strlcpy(vcap->card, "Connectix B&W Quickcam", sizeof(vcap->card));
-	strlcpy(vcap->bus_info, qcam->pport->name, sizeof(vcap->bus_info));
-	vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
-	vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS;
-	return 0;
-}
-
-static int qcam_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
-{
-	if (vin->index > 0)
-		return -EINVAL;
-	strlcpy(vin->name, "Camera", sizeof(vin->name));
-	vin->type = V4L2_INPUT_TYPE_CAMERA;
-	vin->audioset = 0;
-	vin->tuner = 0;
-	vin->std = 0;
-	vin->status = 0;
-	return 0;
-}
-
-static int qcam_g_input(struct file *file, void *fh, unsigned int *inp)
-{
-	*inp = 0;
-	return 0;
-}
-
-static int qcam_s_input(struct file *file, void *fh, unsigned int inp)
-{
-	return (inp > 0) ? -EINVAL : 0;
-}
-
-static int qcam_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct qcam *qcam = video_drvdata(file);
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-
-	pix->width = qcam->width / qcam->transfer_scale;
-	pix->height = qcam->height / qcam->transfer_scale;
-	pix->pixelformat = (qcam->bpp == 4) ? V4L2_PIX_FMT_Y4 : V4L2_PIX_FMT_Y6;
-	pix->field = V4L2_FIELD_NONE;
-	pix->bytesperline = pix->width;
-	pix->sizeimage = pix->width * pix->height;
-	/* Just a guess */
-	pix->colorspace = V4L2_COLORSPACE_SRGB;
-	return 0;
-}
-
-static int qcam_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-
-	if (pix->height <= 60 || pix->width <= 80) {
-		pix->height = 60;
-		pix->width = 80;
-	} else if (pix->height <= 120 || pix->width <= 160) {
-		pix->height = 120;
-		pix->width = 160;
-	} else {
-		pix->height = 240;
-		pix->width = 320;
-	}
-	if (pix->pixelformat != V4L2_PIX_FMT_Y4 &&
-	    pix->pixelformat != V4L2_PIX_FMT_Y6)
-		pix->pixelformat = V4L2_PIX_FMT_Y4;
-	pix->field = V4L2_FIELD_NONE;
-	pix->bytesperline = pix->width;
-	pix->sizeimage = pix->width * pix->height;
-	/* Just a guess */
-	pix->colorspace = V4L2_COLORSPACE_SRGB;
-	return 0;
-}
-
-static int qcam_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct qcam *qcam = video_drvdata(file);
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-	int ret = qcam_try_fmt_vid_cap(file, fh, fmt);
-
-	if (ret)
-		return ret;
-	qcam->width = 320;
-	qcam->height = 240;
-	if (pix->height == 60)
-		qcam->transfer_scale = 4;
-	else if (pix->height == 120)
-		qcam->transfer_scale = 2;
-	else
-		qcam->transfer_scale = 1;
-	if (pix->pixelformat == V4L2_PIX_FMT_Y6)
-		qcam->bpp = 6;
-	else
-		qcam->bpp = 4;
-
-	mutex_lock(&qcam->lock);
-	qc_setscanmode(qcam);
-	/* We must update the camera before we grab. We could
-	   just have changed the grab size */
-	qcam->status |= QC_PARAM_CHANGE;
-	mutex_unlock(&qcam->lock);
-	return 0;
-}
-
-static int qcam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt)
-{
-	static struct v4l2_fmtdesc formats[] = {
-		{ 0, 0, 0,
-		  "4-Bit Monochrome", V4L2_PIX_FMT_Y4,
-		  { 0, 0, 0, 0 }
-		},
-		{ 1, 0, 0,
-		  "6-Bit Monochrome", V4L2_PIX_FMT_Y6,
-		  { 0, 0, 0, 0 }
-		},
-	};
-	enum v4l2_buf_type type = fmt->type;
-
-	if (fmt->index > 1)
-		return -EINVAL;
-
-	*fmt = formats[fmt->index];
-	fmt->type = type;
-	return 0;
-}
-
-static int qcam_enum_framesizes(struct file *file, void *fh,
-					 struct v4l2_frmsizeenum *fsize)
-{
-	static const struct v4l2_frmsize_discrete sizes[] = {
-		{  80,  60 },
-		{ 160, 120 },
-		{ 320, 240 },
-	};
-
-	if (fsize->index > 2)
-		return -EINVAL;
-	if (fsize->pixel_format != V4L2_PIX_FMT_Y4 &&
-	    fsize->pixel_format != V4L2_PIX_FMT_Y6)
-		return -EINVAL;
-	fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
-	fsize->discrete = sizes[fsize->index];
-	return 0;
-}
-
-static ssize_t qcam_read(struct file *file, char __user *buf,
-		size_t count, loff_t *ppos)
-{
-	struct qcam *qcam = video_drvdata(file);
-	int len;
-	parport_claim_or_block(qcam->pdev);
-
-	mutex_lock(&qcam->lock);
-
-	qc_reset(qcam);
-
-	/* Update the camera parameters if we need to */
-	if (qcam->status & QC_PARAM_CHANGE)
-		qc_set(qcam);
-
-	len = qc_capture(qcam, buf, count);
-
-	mutex_unlock(&qcam->lock);
-
-	parport_release(qcam->pdev);
-	return len;
-}
-
-static unsigned int qcam_poll(struct file *filp, poll_table *wait)
-{
-	return v4l2_ctrl_poll(filp, wait) | POLLIN | POLLRDNORM;
-}
-
-static int qcam_s_ctrl(struct v4l2_ctrl *ctrl)
-{
-	struct qcam *qcam =
-		container_of(ctrl->handler, struct qcam, hdl);
-	int ret = 0;
-
-	mutex_lock(&qcam->lock);
-	switch (ctrl->id) {
-	case V4L2_CID_BRIGHTNESS:
-		qcam->brightness = ctrl->val;
-		break;
-	case V4L2_CID_CONTRAST:
-		qcam->contrast = ctrl->val;
-		break;
-	case V4L2_CID_GAMMA:
-		qcam->whitebal = ctrl->val;
-		break;
-	default:
-		ret = -EINVAL;
-		break;
-	}
-	if (ret == 0) {
-		qc_setscanmode(qcam);
-		qcam->status |= QC_PARAM_CHANGE;
-	}
-	mutex_unlock(&qcam->lock);
-	return ret;
-}
-
-static const struct v4l2_file_operations qcam_fops = {
-	.owner		= THIS_MODULE,
-	.open		= v4l2_fh_open,
-	.release	= v4l2_fh_release,
-	.poll		= qcam_poll,
-	.unlocked_ioctl = video_ioctl2,
-	.read		= qcam_read,
-};
-
-static const struct v4l2_ioctl_ops qcam_ioctl_ops = {
-	.vidioc_querycap    		    = qcam_querycap,
-	.vidioc_g_input      		    = qcam_g_input,
-	.vidioc_s_input      		    = qcam_s_input,
-	.vidioc_enum_input   		    = qcam_enum_input,
-	.vidioc_enum_fmt_vid_cap 	    = qcam_enum_fmt_vid_cap,
-	.vidioc_enum_framesizes		    = qcam_enum_framesizes,
-	.vidioc_g_fmt_vid_cap 		    = qcam_g_fmt_vid_cap,
-	.vidioc_s_fmt_vid_cap  		    = qcam_s_fmt_vid_cap,
-	.vidioc_try_fmt_vid_cap  	    = qcam_try_fmt_vid_cap,
-	.vidioc_log_status		    = v4l2_ctrl_log_status,
-	.vidioc_subscribe_event		    = v4l2_ctrl_subscribe_event,
-	.vidioc_unsubscribe_event	    = v4l2_event_unsubscribe,
-};
-
-static const struct v4l2_ctrl_ops qcam_ctrl_ops = {
-	.s_ctrl = qcam_s_ctrl,
-};
-
-/* Initialize the QuickCam driver control structure.  This is where
- * defaults are set for people who don't have a config file.*/
-
-static struct qcam *qcam_init(struct parport *port)
-{
-	struct qcam *qcam;
-	struct v4l2_device *v4l2_dev;
-
-	qcam = kzalloc(sizeof(struct qcam), GFP_KERNEL);
-	if (qcam == NULL)
-		return NULL;
-
-	v4l2_dev = &qcam->v4l2_dev;
-	snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "bw-qcam%d", num_cams);
-
-	if (v4l2_device_register(port->dev, v4l2_dev) < 0) {
-		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
-		kfree(qcam);
-		return NULL;
-	}
-
-	v4l2_ctrl_handler_init(&qcam->hdl, 3);
-	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
-			  V4L2_CID_BRIGHTNESS, 0, 255, 1, 180);
-	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
-			  V4L2_CID_CONTRAST, 0, 255, 1, 192);
-	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
-			  V4L2_CID_GAMMA, 0, 255, 1, 105);
-	if (qcam->hdl.error) {
-		v4l2_err(v4l2_dev, "couldn't register controls\n");
-		v4l2_ctrl_handler_free(&qcam->hdl);
-		kfree(qcam);
-		return NULL;
-	}
-	qcam->pport = port;
-	qcam->pdev = parport_register_device(port, v4l2_dev->name, NULL, NULL,
-			NULL, 0, NULL);
-	if (qcam->pdev == NULL) {
-		v4l2_err(v4l2_dev, "couldn't register for %s.\n", port->name);
-		v4l2_ctrl_handler_free(&qcam->hdl);
-		kfree(qcam);
-		return NULL;
-	}
-
-	strlcpy(qcam->vdev.name, "Connectix QuickCam", sizeof(qcam->vdev.name));
-	qcam->vdev.v4l2_dev = v4l2_dev;
-	qcam->vdev.ctrl_handler = &qcam->hdl;
-	qcam->vdev.fops = &qcam_fops;
-	qcam->vdev.ioctl_ops = &qcam_ioctl_ops;
-	set_bit(V4L2_FL_USE_FH_PRIO, &qcam->vdev.flags);
-	qcam->vdev.release = video_device_release_empty;
-	video_set_drvdata(&qcam->vdev, qcam);
-
-	mutex_init(&qcam->lock);
-
-	qcam->port_mode = (QC_ANY | QC_NOTSET);
-	qcam->width = 320;
-	qcam->height = 240;
-	qcam->bpp = 4;
-	qcam->transfer_scale = 2;
-	qcam->contrast = 192;
-	qcam->brightness = 180;
-	qcam->whitebal = 105;
-	qcam->top = 1;
-	qcam->left = 14;
-	qcam->mode = -1;
-	qcam->status = QC_PARAM_CHANGE;
-	return qcam;
-}
-
-static int qc_calibrate(struct qcam *q)
-{
-	/*
-	 *	Bugfix by Hanno Mueller hmueller@kabel.de, Mai 21 96
-	 *	The white balance is an individual value for each
-	 *	quickcam.
-	 */
-
-	int value;
-	int count = 0;
-
-	qc_command(q, 27);	/* AutoAdjustOffset */
-	qc_command(q, 0);	/* Dummy Parameter, ignored by the camera */
-
-	/* GetOffset (33) will read 255 until autocalibration */
-	/* is finished. After that, a value of 1-254 will be */
-	/* returned. */
-
-	do {
-		qc_command(q, 33);
-		value = qc_readparam(q);
-		mdelay(1);
-		schedule();
-		count++;
-	} while (value == 0xff && count < 2048);
-
-	q->whitebal = value;
-	return value;
-}
-
-static int init_bwqcam(struct parport *port)
-{
-	struct qcam *qcam;
-
-	if (num_cams == MAX_CAMS) {
-		printk(KERN_ERR "Too many Quickcams (max %d)\n", MAX_CAMS);
-		return -ENOSPC;
-	}
-
-	qcam = qcam_init(port);
-	if (qcam == NULL)
-		return -ENODEV;
-
-	parport_claim_or_block(qcam->pdev);
-
-	qc_reset(qcam);
-
-	if (qc_detect(qcam) == 0) {
-		parport_release(qcam->pdev);
-		parport_unregister_device(qcam->pdev);
-		kfree(qcam);
-		return -ENODEV;
-	}
-	qc_calibrate(qcam);
-	v4l2_ctrl_handler_setup(&qcam->hdl);
-
-	parport_release(qcam->pdev);
-
-	v4l2_info(&qcam->v4l2_dev, "Connectix Quickcam on %s\n", qcam->pport->name);
-
-	if (video_register_device(&qcam->vdev, VFL_TYPE_GRABBER, video_nr) < 0) {
-		parport_unregister_device(qcam->pdev);
-		kfree(qcam);
-		return -ENODEV;
-	}
-
-	qcams[num_cams++] = qcam;
-
-	return 0;
-}
-
-static void close_bwqcam(struct qcam *qcam)
-{
-	video_unregister_device(&qcam->vdev);
-	v4l2_ctrl_handler_free(&qcam->hdl);
-	parport_unregister_device(qcam->pdev);
-	kfree(qcam);
-}
-
-/* The parport parameter controls which parports will be scanned.
- * Scanning all parports causes some printers to print a garbage page.
- *       -- March 14, 1999  Billy Donahue <billy@escape.com> */
-#ifdef MODULE
-static char *parport[MAX_CAMS] = { NULL, };
-module_param_array(parport, charp, NULL, 0);
-#endif
-
-static int accept_bwqcam(struct parport *port)
-{
-#ifdef MODULE
-	int n;
-
-	if (parport[0] && strncmp(parport[0], "auto", 4) != 0) {
-		/* user gave parport parameters */
-		for (n = 0; n < MAX_CAMS && parport[n]; n++) {
-			char *ep;
-			unsigned long r;
-			r = simple_strtoul(parport[n], &ep, 0);
-			if (ep == parport[n]) {
-				printk(KERN_ERR
-					"bw-qcam: bad port specifier \"%s\"\n",
-					parport[n]);
-				continue;
-			}
-			if (r == port->number)
-				return 1;
-		}
-		return 0;
-	}
-#endif
-	return 1;
-}
-
-static void bwqcam_attach(struct parport *port)
-{
-	if (accept_bwqcam(port))
-		init_bwqcam(port);
-}
-
-static void bwqcam_detach(struct parport *port)
-{
-	int i;
-	for (i = 0; i < num_cams; i++) {
-		struct qcam *qcam = qcams[i];
-		if (qcam && qcam->pdev->port == port) {
-			qcams[i] = NULL;
-			close_bwqcam(qcam);
-		}
-	}
-}
-
-static struct parport_driver bwqcam_driver = {
-	.name	= "bw-qcam",
-	.attach	= bwqcam_attach,
-	.detach	= bwqcam_detach,
-};
-
-static void __exit exit_bw_qcams(void)
-{
-	parport_unregister_driver(&bwqcam_driver);
-}
-
-static int __init init_bw_qcams(void)
-{
-#ifdef MODULE
-	/* Do some sanity checks on the module parameters. */
-	if (maxpoll > 5000) {
-		printk(KERN_INFO "Connectix Quickcam max-poll was above 5000. Using 5000.\n");
-		maxpoll = 5000;
-	}
-
-	if (yieldlines < 1) {
-		printk(KERN_INFO "Connectix Quickcam yieldlines was less than 1. Using 1.\n");
-		yieldlines = 1;
-	}
-#endif
-	return parport_register_driver(&bwqcam_driver);
-}
-
-module_init(init_bw_qcams);
-module_exit(exit_bw_qcams);
-
-MODULE_LICENSE("GPL");
-MODULE_VERSION("0.0.3");
diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c
deleted file mode 100644
index ec51e1f..0000000
--- a/drivers/media/video/c-qcam.c
+++ /dev/null
@@ -1,883 +0,0 @@
-/*
- *	Video4Linux Colour QuickCam driver
- *	Copyright 1997-2000 Philip Blundell <philb@gnu.org>
- *
- *    Module parameters:
- *
- *	parport=auto      -- probe all parports (default)
- *	parport=0         -- parport0 becomes qcam1
- *	parport=2,0,1     -- parports 2,0,1 are tried in that order
- *
- *	probe=0		  -- do no probing, assume camera is present
- *	probe=1		  -- use IEEE-1284 autoprobe data only (default)
- *	probe=2		  -- probe aggressively for cameras
- *
- *	force_rgb=1       -- force data format to RGB (default is BGR)
- *
- * The parport parameter controls which parports will be scanned.
- * Scanning all parports causes some printers to print a garbage page.
- *       -- March 14, 1999  Billy Donahue <billy@escape.com>
- *
- * Fixed data format to BGR, added force_rgb parameter. Added missing
- * parport_unregister_driver() on module removal.
- *       -- May 28, 2000  Claudio Matsuoka <claudio@conectiva.com>
- */
-
-#include <linux/module.h>
-#include <linux/delay.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/mm.h>
-#include <linux/parport.h>
-#include <linux/sched.h>
-#include <linux/mutex.h>
-#include <linux/jiffies.h>
-#include <linux/videodev2.h>
-#include <asm/uaccess.h>
-#include <media/v4l2-device.h>
-#include <media/v4l2-common.h>
-#include <media/v4l2-ioctl.h>
-#include <media/v4l2-fh.h>
-#include <media/v4l2-ctrls.h>
-#include <media/v4l2-event.h>
-
-struct qcam {
-	struct v4l2_device v4l2_dev;
-	struct video_device vdev;
-	struct v4l2_ctrl_handler hdl;
-	struct pardevice *pdev;
-	struct parport *pport;
-	int width, height;
-	int ccd_width, ccd_height;
-	int mode;
-	int contrast, brightness, whitebal;
-	int top, left;
-	unsigned int bidirectional;
-	struct mutex lock;
-};
-
-/* cameras maximum */
-#define MAX_CAMS 4
-
-/* The three possible QuickCam modes */
-#define QC_MILLIONS	0x18
-#define QC_BILLIONS	0x10
-#define QC_THOUSANDS	0x08	/* with VIDEC compression (not supported) */
-
-/* The three possible decimations */
-#define QC_DECIMATION_1		0
-#define QC_DECIMATION_2		2
-#define QC_DECIMATION_4		4
-
-#define BANNER "Colour QuickCam for Video4Linux v0.06"
-
-static int parport[MAX_CAMS] = { [1 ... MAX_CAMS-1] = -1 };
-static int probe = 2;
-static bool force_rgb;
-static int video_nr = -1;
-
-/* FIXME: parport=auto would never have worked, surely? --RR */
-MODULE_PARM_DESC(parport, "parport=<auto|n[,n]...> for port detection method\n"
-			  "probe=<0|1|2> for camera detection method\n"
-			  "force_rgb=<0|1> for RGB data format (default BGR)");
-module_param_array(parport, int, NULL, 0);
-module_param(probe, int, 0);
-module_param(force_rgb, bool, 0);
-module_param(video_nr, int, 0);
-
-static struct qcam *qcams[MAX_CAMS];
-static unsigned int num_cams;
-
-static inline void qcam_set_ack(struct qcam *qcam, unsigned int i)
-{
-	/* note: the QC specs refer to the PCAck pin by voltage, not
-	   software level.  PC ports have builtin inverters. */
-	parport_frob_control(qcam->pport, 8, i ? 8 : 0);
-}
-
-static inline unsigned int qcam_ready1(struct qcam *qcam)
-{
-	return (parport_read_status(qcam->pport) & 0x8) ? 1 : 0;
-}
-
-static inline unsigned int qcam_ready2(struct qcam *qcam)
-{
-	return (parport_read_data(qcam->pport) & 0x1) ? 1 : 0;
-}
-
-static unsigned int qcam_await_ready1(struct qcam *qcam, int value)
-{
-	struct v4l2_device *v4l2_dev = &qcam->v4l2_dev;
-	unsigned long oldjiffies = jiffies;
-	unsigned int i;
-
-	for (oldjiffies = jiffies;
-	     time_before(jiffies, oldjiffies + msecs_to_jiffies(40));)
-		if (qcam_ready1(qcam) == value)
-			return 0;
-
-	/* If the camera didn't respond within 1/25 second, poll slowly
-	   for a while. */
-	for (i = 0; i < 50; i++) {
-		if (qcam_ready1(qcam) == value)
-			return 0;
-		msleep_interruptible(100);
-	}
-
-	/* Probably somebody pulled the plug out.  Not much we can do. */
-	v4l2_err(v4l2_dev, "ready1 timeout (%d) %x %x\n", value,
-	       parport_read_status(qcam->pport),
-	       parport_read_control(qcam->pport));
-	return 1;
-}
-
-static unsigned int qcam_await_ready2(struct qcam *qcam, int value)
-{
-	struct v4l2_device *v4l2_dev = &qcam->v4l2_dev;
-	unsigned long oldjiffies = jiffies;
-	unsigned int i;
-
-	for (oldjiffies = jiffies;
-	     time_before(jiffies, oldjiffies + msecs_to_jiffies(40));)
-		if (qcam_ready2(qcam) == value)
-			return 0;
-
-	/* If the camera didn't respond within 1/25 second, poll slowly
-	   for a while. */
-	for (i = 0; i < 50; i++) {
-		if (qcam_ready2(qcam) == value)
-			return 0;
-		msleep_interruptible(100);
-	}
-
-	/* Probably somebody pulled the plug out.  Not much we can do. */
-	v4l2_err(v4l2_dev, "ready2 timeout (%d) %x %x %x\n", value,
-	       parport_read_status(qcam->pport),
-	       parport_read_control(qcam->pport),
-	       parport_read_data(qcam->pport));
-	return 1;
-}
-
-static int qcam_read_data(struct qcam *qcam)
-{
-	unsigned int idata;
-
-	qcam_set_ack(qcam, 0);
-	if (qcam_await_ready1(qcam, 1))
-		return -1;
-	idata = parport_read_status(qcam->pport) & 0xf0;
-	qcam_set_ack(qcam, 1);
-	if (qcam_await_ready1(qcam, 0))
-		return -1;
-	idata |= parport_read_status(qcam->pport) >> 4;
-	return idata;
-}
-
-static int qcam_write_data(struct qcam *qcam, unsigned int data)
-{
-	struct v4l2_device *v4l2_dev = &qcam->v4l2_dev;
-	unsigned int idata;
-
-	parport_write_data(qcam->pport, data);
-	idata = qcam_read_data(qcam);
-	if (data != idata) {
-		v4l2_warn(v4l2_dev, "sent %x but received %x\n", data,
-		       idata);
-		return 1;
-	}
-	return 0;
-}
-
-static inline int qcam_set(struct qcam *qcam, unsigned int cmd, unsigned int data)
-{
-	if (qcam_write_data(qcam, cmd))
-		return -1;
-	if (qcam_write_data(qcam, data))
-		return -1;
-	return 0;
-}
-
-static inline int qcam_get(struct qcam *qcam, unsigned int cmd)
-{
-	if (qcam_write_data(qcam, cmd))
-		return -1;
-	return qcam_read_data(qcam);
-}
-
-static int qc_detect(struct qcam *qcam)
-{
-	unsigned int stat, ostat, i, count = 0;
-
-	/* The probe routine below is not very reliable.  The IEEE-1284
-	   probe takes precedence. */
-	/* XXX Currently parport provides no way to distinguish between
-	   "the IEEE probe was not done" and "the probe was done, but
-	   no device was found".  Fix this one day. */
-	if (qcam->pport->probe_info[0].class == PARPORT_CLASS_MEDIA
-	    && qcam->pport->probe_info[0].model
-	    && !strcmp(qcam->pdev->port->probe_info[0].model,
-		       "Color QuickCam 2.0")) {
-		printk(KERN_DEBUG "QuickCam: Found by IEEE1284 probe.\n");
-		return 1;
-	}
-
-	if (probe < 2)
-		return 0;
-
-	parport_write_control(qcam->pport, 0xc);
-
-	/* look for a heartbeat */
-	ostat = stat = parport_read_status(qcam->pport);
-	for (i = 0; i < 250; i++) {
-		mdelay(1);
-		stat = parport_read_status(qcam->pport);
-		if (ostat != stat) {
-			if (++count >= 3)
-				return 1;
-			ostat = stat;
-		}
-	}
-
-	/* Reset the camera and try again */
-	parport_write_control(qcam->pport, 0xc);
-	parport_write_control(qcam->pport, 0x8);
-	mdelay(1);
-	parport_write_control(qcam->pport, 0xc);
-	mdelay(1);
-	count = 0;
-
-	ostat = stat = parport_read_status(qcam->pport);
-	for (i = 0; i < 250; i++) {
-		mdelay(1);
-		stat = parport_read_status(qcam->pport);
-		if (ostat != stat) {
-			if (++count >= 3)
-				return 1;
-			ostat = stat;
-		}
-	}
-
-	/* no (or flatline) camera, give up */
-	return 0;
-}
-
-static void qc_reset(struct qcam *qcam)
-{
-	parport_write_control(qcam->pport, 0xc);
-	parport_write_control(qcam->pport, 0x8);
-	mdelay(1);
-	parport_write_control(qcam->pport, 0xc);
-	mdelay(1);
-}
-
-/* Reset the QuickCam and program for brightness, contrast,
- * white-balance, and resolution. */
-
-static void qc_setup(struct qcam *qcam)
-{
-	qc_reset(qcam);
-
-	/* Set the brightness. */
-	qcam_set(qcam, 11, qcam->brightness);
-
-	/* Set the height and width.  These refer to the actual
-	   CCD area *before* applying the selected decimation.  */
-	qcam_set(qcam, 17, qcam->ccd_height);
-	qcam_set(qcam, 19, qcam->ccd_width / 2);
-
-	/* Set top and left.  */
-	qcam_set(qcam, 0xd, qcam->top);
-	qcam_set(qcam, 0xf, qcam->left);
-
-	/* Set contrast and white balance.  */
-	qcam_set(qcam, 0x19, qcam->contrast);
-	qcam_set(qcam, 0x1f, qcam->whitebal);
-
-	/* Set the speed.  */
-	qcam_set(qcam, 45, 2);
-}
-
-/* Read some bytes from the camera and put them in the buffer.
-   nbytes should be a multiple of 3, because bidirectional mode gives
-   us three bytes at a time.  */
-
-static unsigned int qcam_read_bytes(struct qcam *qcam, unsigned char *buf, unsigned int nbytes)
-{
-	unsigned int bytes = 0;
-
-	qcam_set_ack(qcam, 0);
-	if (qcam->bidirectional) {
-		/* It's a bidirectional port */
-		while (bytes < nbytes) {
-			unsigned int lo1, hi1, lo2, hi2;
-			unsigned char r, g, b;
-
-			if (qcam_await_ready2(qcam, 1))
-				return bytes;
-			lo1 = parport_read_data(qcam->pport) >> 1;
-			hi1 = ((parport_read_status(qcam->pport) >> 3) & 0x1f) ^ 0x10;
-			qcam_set_ack(qcam, 1);
-			if (qcam_await_ready2(qcam, 0))
-				return bytes;
-			lo2 = parport_read_data(qcam->pport) >> 1;
-			hi2 = ((parport_read_status(qcam->pport) >> 3) & 0x1f) ^ 0x10;
-			qcam_set_ack(qcam, 0);
-			r = lo1 | ((hi1 & 1) << 7);
-			g = ((hi1 & 0x1e) << 3) | ((hi2 & 0x1e) >> 1);
-			b = lo2 | ((hi2 & 1) << 7);
-			if (force_rgb) {
-				buf[bytes++] = r;
-				buf[bytes++] = g;
-				buf[bytes++] = b;
-			} else {
-				buf[bytes++] = b;
-				buf[bytes++] = g;
-				buf[bytes++] = r;
-			}
-		}
-	} else {
-		/* It's a unidirectional port */
-		int i = 0, n = bytes;
-		unsigned char rgb[3];
-
-		while (bytes < nbytes) {
-			unsigned int hi, lo;
-
-			if (qcam_await_ready1(qcam, 1))
-				return bytes;
-			hi = (parport_read_status(qcam->pport) & 0xf0);
-			qcam_set_ack(qcam, 1);
-			if (qcam_await_ready1(qcam, 0))
-				return bytes;
-			lo = (parport_read_status(qcam->pport) & 0xf0);
-			qcam_set_ack(qcam, 0);
-			/* flip some bits */
-			rgb[(i = bytes++ % 3)] = (hi | (lo >> 4)) ^ 0x88;
-			if (i >= 2) {
-get_fragment:
-				if (force_rgb) {
-					buf[n++] = rgb[0];
-					buf[n++] = rgb[1];
-					buf[n++] = rgb[2];
-				} else {
-					buf[n++] = rgb[2];
-					buf[n++] = rgb[1];
-					buf[n++] = rgb[0];
-				}
-			}
-		}
-		if (i) {
-			i = 0;
-			goto get_fragment;
-		}
-	}
-	return bytes;
-}
-
-#define BUFSZ	150
-
-static long qc_capture(struct qcam *qcam, char __user *buf, unsigned long len)
-{
-	struct v4l2_device *v4l2_dev = &qcam->v4l2_dev;
-	unsigned lines, pixelsperline;
-	unsigned int is_bi_dir = qcam->bidirectional;
-	size_t wantlen, outptr = 0;
-	char tmpbuf[BUFSZ];
-
-	if (!access_ok(VERIFY_WRITE, buf, len))
-		return -EFAULT;
-
-	/* Wait for camera to become ready */
-	for (;;) {
-		int i = qcam_get(qcam, 41);
-
-		if (i == -1) {
-			qc_setup(qcam);
-			return -EIO;
-		}
-		if ((i & 0x80) == 0)
-			break;
-		schedule();
-	}
-
-	if (qcam_set(qcam, 7, (qcam->mode | (is_bi_dir ? 1 : 0)) + 1))
-		return -EIO;
-
-	lines = qcam->height;
-	pixelsperline = qcam->width;
-
-	if (is_bi_dir) {
-		/* Turn the port around */
-		parport_data_reverse(qcam->pport);
-		mdelay(3);
-		qcam_set_ack(qcam, 0);
-		if (qcam_await_ready1(qcam, 1)) {
-			qc_setup(qcam);
-			return -EIO;
-		}
-		qcam_set_ack(qcam, 1);
-		if (qcam_await_ready1(qcam, 0)) {
-			qc_setup(qcam);
-			return -EIO;
-		}
-	}
-
-	wantlen = lines * pixelsperline * 24 / 8;
-
-	while (wantlen) {
-		size_t t, s;
-
-		s = (wantlen > BUFSZ) ? BUFSZ : wantlen;
-		t = qcam_read_bytes(qcam, tmpbuf, s);
-		if (outptr < len) {
-			size_t sz = len - outptr;
-
-			if (sz > t)
-				sz = t;
-			if (__copy_to_user(buf + outptr, tmpbuf, sz))
-				break;
-			outptr += sz;
-		}
-		wantlen -= t;
-		if (t < s)
-			break;
-		cond_resched();
-	}
-
-	len = outptr;
-
-	if (wantlen) {
-		v4l2_err(v4l2_dev, "short read.\n");
-		if (is_bi_dir)
-			parport_data_forward(qcam->pport);
-		qc_setup(qcam);
-		return len;
-	}
-
-	if (is_bi_dir) {
-		int l;
-
-		do {
-			l = qcam_read_bytes(qcam, tmpbuf, 3);
-			cond_resched();
-		} while (l && (tmpbuf[0] == 0x7e || tmpbuf[1] == 0x7e || tmpbuf[2] == 0x7e));
-		if (force_rgb) {
-			if (tmpbuf[0] != 0xe || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xf)
-				v4l2_err(v4l2_dev, "bad EOF\n");
-		} else {
-			if (tmpbuf[0] != 0xf || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xe)
-				v4l2_err(v4l2_dev, "bad EOF\n");
-		}
-		qcam_set_ack(qcam, 0);
-		if (qcam_await_ready1(qcam, 1)) {
-			v4l2_err(v4l2_dev, "no ack after EOF\n");
-			parport_data_forward(qcam->pport);
-			qc_setup(qcam);
-			return len;
-		}
-		parport_data_forward(qcam->pport);
-		mdelay(3);
-		qcam_set_ack(qcam, 1);
-		if (qcam_await_ready1(qcam, 0)) {
-			v4l2_err(v4l2_dev, "no ack to port turnaround\n");
-			qc_setup(qcam);
-			return len;
-		}
-	} else {
-		int l;
-
-		do {
-			l = qcam_read_bytes(qcam, tmpbuf, 1);
-			cond_resched();
-		} while (l && tmpbuf[0] == 0x7e);
-		l = qcam_read_bytes(qcam, tmpbuf + 1, 2);
-		if (force_rgb) {
-			if (tmpbuf[0] != 0xe || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xf)
-				v4l2_err(v4l2_dev, "bad EOF\n");
-		} else {
-			if (tmpbuf[0] != 0xf || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xe)
-				v4l2_err(v4l2_dev, "bad EOF\n");
-		}
-	}
-
-	qcam_write_data(qcam, 0);
-	return len;
-}
-
-/*
- *	Video4linux interfacing
- */
-
-static int qcam_querycap(struct file *file, void  *priv,
-					struct v4l2_capability *vcap)
-{
-	struct qcam *qcam = video_drvdata(file);
-
-	strlcpy(vcap->driver, qcam->v4l2_dev.name, sizeof(vcap->driver));
-	strlcpy(vcap->card, "Color Quickcam", sizeof(vcap->card));
-	strlcpy(vcap->bus_info, "parport", sizeof(vcap->bus_info));
-	vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
-	vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS;
-	return 0;
-}
-
-static int qcam_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
-{
-	if (vin->index > 0)
-		return -EINVAL;
-	strlcpy(vin->name, "Camera", sizeof(vin->name));
-	vin->type = V4L2_INPUT_TYPE_CAMERA;
-	vin->audioset = 0;
-	vin->tuner = 0;
-	vin->std = 0;
-	vin->status = 0;
-	return 0;
-}
-
-static int qcam_g_input(struct file *file, void *fh, unsigned int *inp)
-{
-	*inp = 0;
-	return 0;
-}
-
-static int qcam_s_input(struct file *file, void *fh, unsigned int inp)
-{
-	return (inp > 0) ? -EINVAL : 0;
-}
-
-static int qcam_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct qcam *qcam = video_drvdata(file);
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-
-	pix->width = qcam->width;
-	pix->height = qcam->height;
-	pix->pixelformat = V4L2_PIX_FMT_RGB24;
-	pix->field = V4L2_FIELD_NONE;
-	pix->bytesperline = 3 * qcam->width;
-	pix->sizeimage = 3 * qcam->width * qcam->height;
-	/* Just a guess */
-	pix->colorspace = V4L2_COLORSPACE_SRGB;
-	return 0;
-}
-
-static int qcam_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-
-	if (pix->height < 60 || pix->width < 80) {
-		pix->height = 60;
-		pix->width = 80;
-	} else if (pix->height < 120 || pix->width < 160) {
-		pix->height = 120;
-		pix->width = 160;
-	} else {
-		pix->height = 240;
-		pix->width = 320;
-	}
-	pix->pixelformat = V4L2_PIX_FMT_RGB24;
-	pix->field = V4L2_FIELD_NONE;
-	pix->bytesperline = 3 * pix->width;
-	pix->sizeimage = 3 * pix->width * pix->height;
-	/* Just a guess */
-	pix->colorspace = V4L2_COLORSPACE_SRGB;
-	return 0;
-}
-
-static int qcam_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct qcam *qcam = video_drvdata(file);
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-	int ret = qcam_try_fmt_vid_cap(file, fh, fmt);
-
-	if (ret)
-		return ret;
-	switch (pix->height) {
-	case 60:
-		qcam->mode = QC_DECIMATION_4;
-		break;
-	case 120:
-		qcam->mode = QC_DECIMATION_2;
-		break;
-	default:
-		qcam->mode = QC_DECIMATION_1;
-		break;
-	}
-
-	mutex_lock(&qcam->lock);
-	qcam->mode |= QC_MILLIONS;
-	qcam->height = pix->height;
-	qcam->width = pix->width;
-	parport_claim_or_block(qcam->pdev);
-	qc_setup(qcam);
-	parport_release(qcam->pdev);
-	mutex_unlock(&qcam->lock);
-	return 0;
-}
-
-static int qcam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt)
-{
-	static struct v4l2_fmtdesc formats[] = {
-		{ 0, 0, 0,
-		  "RGB 8:8:8", V4L2_PIX_FMT_RGB24,
-		  { 0, 0, 0, 0 }
-		},
-	};
-	enum v4l2_buf_type type = fmt->type;
-
-	if (fmt->index > 0)
-		return -EINVAL;
-
-	*fmt = formats[fmt->index];
-	fmt->type = type;
-	return 0;
-}
-
-static ssize_t qcam_read(struct file *file, char __user *buf,
-			 size_t count, loff_t *ppos)
-{
-	struct qcam *qcam = video_drvdata(file);
-	int len;
-
-	mutex_lock(&qcam->lock);
-	parport_claim_or_block(qcam->pdev);
-	/* Probably should have a semaphore against multiple users */
-	len = qc_capture(qcam, buf, count);
-	parport_release(qcam->pdev);
-	mutex_unlock(&qcam->lock);
-	return len;
-}
-
-static int qcam_s_ctrl(struct v4l2_ctrl *ctrl)
-{
-	struct qcam *qcam =
-		container_of(ctrl->handler, struct qcam, hdl);
-	int ret = 0;
-
-	mutex_lock(&qcam->lock);
-	switch (ctrl->id) {
-	case V4L2_CID_BRIGHTNESS:
-		qcam->brightness = ctrl->val;
-		break;
-	case V4L2_CID_CONTRAST:
-		qcam->contrast = ctrl->val;
-		break;
-	case V4L2_CID_GAMMA:
-		qcam->whitebal = ctrl->val;
-		break;
-	default:
-		ret = -EINVAL;
-		break;
-	}
-	if (ret == 0) {
-		parport_claim_or_block(qcam->pdev);
-		qc_setup(qcam);
-		parport_release(qcam->pdev);
-	}
-	mutex_unlock(&qcam->lock);
-	return ret;
-}
-
-static const struct v4l2_file_operations qcam_fops = {
-	.owner		= THIS_MODULE,
-	.open		= v4l2_fh_open,
-	.release	= v4l2_fh_release,
-	.poll		= v4l2_ctrl_poll,
-	.unlocked_ioctl	= video_ioctl2,
-	.read		= qcam_read,
-};
-
-static const struct v4l2_ioctl_ops qcam_ioctl_ops = {
-	.vidioc_querycap    		    = qcam_querycap,
-	.vidioc_g_input      		    = qcam_g_input,
-	.vidioc_s_input      		    = qcam_s_input,
-	.vidioc_enum_input   		    = qcam_enum_input,
-	.vidioc_enum_fmt_vid_cap	    = qcam_enum_fmt_vid_cap,
-	.vidioc_g_fmt_vid_cap 		    = qcam_g_fmt_vid_cap,
-	.vidioc_s_fmt_vid_cap  		    = qcam_s_fmt_vid_cap,
-	.vidioc_try_fmt_vid_cap  	    = qcam_try_fmt_vid_cap,
-	.vidioc_log_status		    = v4l2_ctrl_log_status,
-	.vidioc_subscribe_event		    = v4l2_ctrl_subscribe_event,
-	.vidioc_unsubscribe_event	    = v4l2_event_unsubscribe,
-};
-
-static const struct v4l2_ctrl_ops qcam_ctrl_ops = {
-	.s_ctrl = qcam_s_ctrl,
-};
-
-/* Initialize the QuickCam driver control structure. */
-
-static struct qcam *qcam_init(struct parport *port)
-{
-	struct qcam *qcam;
-	struct v4l2_device *v4l2_dev;
-
-	qcam = kzalloc(sizeof(*qcam), GFP_KERNEL);
-	if (qcam == NULL)
-		return NULL;
-
-	v4l2_dev = &qcam->v4l2_dev;
-	strlcpy(v4l2_dev->name, "c-qcam", sizeof(v4l2_dev->name));
-
-	if (v4l2_device_register(NULL, v4l2_dev) < 0) {
-		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
-		kfree(qcam);
-		return NULL;
-	}
-
-	v4l2_ctrl_handler_init(&qcam->hdl, 3);
-	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
-			  V4L2_CID_BRIGHTNESS, 0, 255, 1, 240);
-	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
-			  V4L2_CID_CONTRAST, 0, 255, 1, 192);
-	v4l2_ctrl_new_std(&qcam->hdl, &qcam_ctrl_ops,
-			  V4L2_CID_GAMMA, 0, 255, 1, 128);
-	if (qcam->hdl.error) {
-		v4l2_err(v4l2_dev, "couldn't register controls\n");
-		v4l2_ctrl_handler_free(&qcam->hdl);
-		kfree(qcam);
-		return NULL;
-	}
-
-	qcam->pport = port;
-	qcam->pdev = parport_register_device(port, "c-qcam", NULL, NULL,
-					  NULL, 0, NULL);
-
-	qcam->bidirectional = (qcam->pport->modes & PARPORT_MODE_TRISTATE) ? 1 : 0;
-
-	if (qcam->pdev == NULL) {
-		v4l2_err(v4l2_dev, "couldn't register for %s.\n", port->name);
-		v4l2_ctrl_handler_free(&qcam->hdl);
-		kfree(qcam);
-		return NULL;
-	}
-
-	strlcpy(qcam->vdev.name, "Colour QuickCam", sizeof(qcam->vdev.name));
-	qcam->vdev.v4l2_dev = v4l2_dev;
-	qcam->vdev.fops = &qcam_fops;
-	qcam->vdev.ioctl_ops = &qcam_ioctl_ops;
-	qcam->vdev.release = video_device_release_empty;
-	qcam->vdev.ctrl_handler = &qcam->hdl;
-	set_bit(V4L2_FL_USE_FH_PRIO, &qcam->vdev.flags);
-	video_set_drvdata(&qcam->vdev, qcam);
-
-	mutex_init(&qcam->lock);
-	qcam->width = qcam->ccd_width = 320;
-	qcam->height = qcam->ccd_height = 240;
-	qcam->mode = QC_MILLIONS | QC_DECIMATION_1;
-	qcam->contrast = 192;
-	qcam->brightness = 240;
-	qcam->whitebal = 128;
-	qcam->top = 1;
-	qcam->left = 14;
-	return qcam;
-}
-
-static int init_cqcam(struct parport *port)
-{
-	struct qcam *qcam;
-	struct v4l2_device *v4l2_dev;
-
-	if (parport[0] != -1) {
-		/* The user gave specific instructions */
-		int i, found = 0;
-
-		for (i = 0; i < MAX_CAMS && parport[i] != -1; i++) {
-			if (parport[0] == port->number)
-				found = 1;
-		}
-		if (!found)
-			return -ENODEV;
-	}
-
-	if (num_cams == MAX_CAMS)
-		return -ENOSPC;
-
-	qcam = qcam_init(port);
-	if (qcam == NULL)
-		return -ENODEV;
-
-	v4l2_dev = &qcam->v4l2_dev;
-
-	parport_claim_or_block(qcam->pdev);
-
-	qc_reset(qcam);
-
-	if (probe && qc_detect(qcam) == 0) {
-		parport_release(qcam->pdev);
-		parport_unregister_device(qcam->pdev);
-		kfree(qcam);
-		return -ENODEV;
-	}
-
-	qc_setup(qcam);
-
-	parport_release(qcam->pdev);
-
-	if (video_register_device(&qcam->vdev, VFL_TYPE_GRABBER, video_nr) < 0) {
-		v4l2_err(v4l2_dev, "Unable to register Colour QuickCam on %s\n",
-		       qcam->pport->name);
-		parport_unregister_device(qcam->pdev);
-		kfree(qcam);
-		return -ENODEV;
-	}
-
-	v4l2_info(v4l2_dev, "%s: Colour QuickCam found on %s\n",
-	       video_device_node_name(&qcam->vdev), qcam->pport->name);
-
-	qcams[num_cams++] = qcam;
-
-	return 0;
-}
-
-static void close_cqcam(struct qcam *qcam)
-{
-	video_unregister_device(&qcam->vdev);
-	v4l2_ctrl_handler_free(&qcam->hdl);
-	parport_unregister_device(qcam->pdev);
-	kfree(qcam);
-}
-
-static void cq_attach(struct parport *port)
-{
-	init_cqcam(port);
-}
-
-static void cq_detach(struct parport *port)
-{
-	/* Write this some day. */
-}
-
-static struct parport_driver cqcam_driver = {
-	.name = "cqcam",
-	.attach = cq_attach,
-	.detach = cq_detach,
-};
-
-static int __init cqcam_init(void)
-{
-	printk(KERN_INFO BANNER "\n");
-
-	return parport_register_driver(&cqcam_driver);
-}
-
-static void __exit cqcam_cleanup(void)
-{
-	unsigned int i;
-
-	for (i = 0; i < num_cams; i++)
-		close_cqcam(qcams[i]);
-
-	parport_unregister_driver(&cqcam_driver);
-}
-
-MODULE_AUTHOR("Philip Blundell <philb@gnu.org>");
-MODULE_DESCRIPTION(BANNER);
-MODULE_LICENSE("GPL");
-MODULE_VERSION("0.0.4");
-
-module_init(cqcam_init);
-module_exit(cqcam_cleanup);
diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c
deleted file mode 100644
index 77f9c92..0000000
--- a/drivers/media/video/pms.c
+++ /dev/null
@@ -1,1152 +0,0 @@
-/*
- *	Media Vision Pro Movie Studio
- *			or
- *	"all you need is an I2C bus some RAM and a prayer"
- *
- *	This draws heavily on code
- *
- *	(c) Wolfgang Koehler,  wolf@first.gmd.de, Dec. 1994
- *	Kiefernring 15
- *	14478 Potsdam, Germany
- *
- *	Most of this code is directly derived from his userspace driver.
- *	His driver works so send any reports to alan@lxorguk.ukuu.org.uk
- *	unless the userspace driver also doesn't work for you...
- *
- *      Changes:
- *	25-11-2009 	Hans Verkuil <hverkuil@xs4all.nl>
- * 			- converted to version 2 of the V4L API.
- *      08/07/2003      Daniele Bellucci <bellucda@tiscali.it>
- *                      - pms_capture: report back -EFAULT
- */
-
-#include <linux/module.h>
-#include <linux/delay.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/mutex.h>
-#include <linux/uaccess.h>
-#include <linux/isa.h>
-#include <asm/io.h>
-
-#include <linux/videodev2.h>
-#include <media/v4l2-common.h>
-#include <media/v4l2-ioctl.h>
-#include <media/v4l2-ctrls.h>
-#include <media/v4l2-fh.h>
-#include <media/v4l2-event.h>
-#include <media/v4l2-device.h>
-
-MODULE_LICENSE("GPL");
-MODULE_VERSION("0.0.5");
-
-#define MOTOROLA	1
-#define PHILIPS2	2               /* SAA7191 */
-#define PHILIPS1	3
-#define MVVMEMORYWIDTH	0x40		/* 512 bytes */
-
-struct i2c_info {
-	u8 slave;
-	u8 sub;
-	u8 data;
-	u8 hits;
-};
-
-struct pms {
-	struct v4l2_device v4l2_dev;
-	struct video_device vdev;
-	struct v4l2_ctrl_handler hdl;
-	int height;
-	int width;
-	int depth;
-	int input;
-	struct mutex lock;
-	int i2c_count;
-	struct i2c_info i2cinfo[64];
-
-	int decoder;
-	int standard;	/* 0 - auto 1 - ntsc 2 - pal 3 - secam */
-	v4l2_std_id std;
-	int io;
-	int data;
-	void __iomem *mem;
-};
-
-/*
- *	I/O ports and Shared Memory
- */
-
-static int io_port = 0x250;
-module_param(io_port, int, 0);
-
-static int mem_base = 0xc8000;
-module_param(mem_base, int, 0);
-
-static int video_nr = -1;
-module_param(video_nr, int, 0);
-
-
-static inline void mvv_write(struct pms *dev, u8 index, u8 value)
-{
-	outw(index | (value << 8), dev->io);
-}
-
-static inline u8 mvv_read(struct pms *dev, u8 index)
-{
-	outb(index, dev->io);
-	return inb(dev->data);
-}
-
-static int pms_i2c_stat(struct pms *dev, u8 slave)
-{
-	int counter = 0;
-	int i;
-
-	outb(0x28, dev->io);
-
-	while ((inb(dev->data) & 0x01) == 0)
-		if (counter++ == 256)
-			break;
-
-	while ((inb(dev->data) & 0x01) != 0)
-		if (counter++ == 256)
-			break;
-
-	outb(slave, dev->io);
-
-	counter = 0;
-	while ((inb(dev->data) & 0x01) == 0)
-		if (counter++ == 256)
-			break;
-
-	while ((inb(dev->data) & 0x01) != 0)
-		if (counter++ == 256)
-			break;
-
-	for (i = 0; i < 12; i++) {
-		char st = inb(dev->data);
-
-		if ((st & 2) != 0)
-			return -1;
-		if ((st & 1) == 0)
-			break;
-	}
-	outb(0x29, dev->io);
-	return inb(dev->data);
-}
-
-static int pms_i2c_write(struct pms *dev, u16 slave, u16 sub, u16 data)
-{
-	int skip = 0;
-	int count;
-	int i;
-
-	for (i = 0; i < dev->i2c_count; i++) {
-		if ((dev->i2cinfo[i].slave == slave) &&
-		    (dev->i2cinfo[i].sub == sub)) {
-			if (dev->i2cinfo[i].data == data)
-				skip = 1;
-			dev->i2cinfo[i].data = data;
-			i = dev->i2c_count + 1;
-		}
-	}
-
-	if (i == dev->i2c_count && dev->i2c_count < 64) {
-		dev->i2cinfo[dev->i2c_count].slave = slave;
-		dev->i2cinfo[dev->i2c_count].sub = sub;
-		dev->i2cinfo[dev->i2c_count].data = data;
-		dev->i2c_count++;
-	}
-
-	if (skip)
-		return 0;
-
-	mvv_write(dev, 0x29, sub);
-	mvv_write(dev, 0x2A, data);
-	mvv_write(dev, 0x28, slave);
-
-	outb(0x28, dev->io);
-
-	count = 0;
-	while ((inb(dev->data) & 1) == 0)
-		if (count > 255)
-			break;
-	while ((inb(dev->data) & 1) != 0)
-		if (count > 255)
-			break;
-
-	count = inb(dev->data);
-
-	if (count & 2)
-		return -1;
-	return count;
-}
-
-static int pms_i2c_read(struct pms *dev, int slave, int sub)
-{
-	int i;
-
-	for (i = 0; i < dev->i2c_count; i++) {
-		if (dev->i2cinfo[i].slave == slave && dev->i2cinfo[i].sub == sub)
-			return dev->i2cinfo[i].data;
-	}
-	return 0;
-}
-
-
-static void pms_i2c_andor(struct pms *dev, int slave, int sub, int and, int or)
-{
-	u8 tmp;
-
-	tmp = pms_i2c_read(dev, slave, sub);
-	tmp = (tmp & and) | or;
-	pms_i2c_write(dev, slave, sub, tmp);
-}
-
-/*
- *	Control functions
- */
-
-
-static void pms_videosource(struct pms *dev, short source)
-{
-	switch (dev->decoder) {
-	case MOTOROLA:
-		break;
-	case PHILIPS2:
-		pms_i2c_andor(dev, 0x8a, 0x06, 0x7f, source ? 0x80 : 0);
-		break;
-	case PHILIPS1:
-		break;
-	}
-	mvv_write(dev, 0x2E, 0x31);
-	/* Was: mvv_write(dev, 0x2E, source ? 0x31 : 0x30);
-	   But could not make this work correctly. Only Composite input
-	   worked for me. */
-}
-
-static void pms_hue(struct pms *dev, short hue)
-{
-	switch (dev->decoder) {
-	case MOTOROLA:
-		pms_i2c_write(dev, 0x8a, 0x00, hue);
-		break;
-	case PHILIPS2:
-		pms_i2c_write(dev, 0x8a, 0x07, hue);
-		break;
-	case PHILIPS1:
-		pms_i2c_write(dev, 0x42, 0x07, hue);
-		break;
-	}
-}
-
-static void pms_saturation(struct pms *dev, short sat)
-{
-	switch (dev->decoder) {
-	case MOTOROLA:
-		pms_i2c_write(dev, 0x8a, 0x00, sat);
-		break;
-	case PHILIPS1:
-		pms_i2c_write(dev, 0x42, 0x12, sat);
-		break;
-	}
-}
-
-
-static void pms_contrast(struct pms *dev, short contrast)
-{
-	switch (dev->decoder) {
-	case MOTOROLA:
-		pms_i2c_write(dev, 0x8a, 0x00, contrast);
-		break;
-	case PHILIPS1:
-		pms_i2c_write(dev, 0x42, 0x13, contrast);
-		break;
-	}
-}
-
-static void pms_brightness(struct pms *dev, short brightness)
-{
-	switch (dev->decoder) {
-	case MOTOROLA:
-		pms_i2c_write(dev, 0x8a, 0x00, brightness);
-		pms_i2c_write(dev, 0x8a, 0x00, brightness);
-		pms_i2c_write(dev, 0x8a, 0x00, brightness);
-		break;
-	case PHILIPS1:
-		pms_i2c_write(dev, 0x42, 0x19, brightness);
-		break;
-	}
-}
-
-
-static void pms_format(struct pms *dev, short format)
-{
-	int target;
-
-	dev->standard = format;
-
-	if (dev->decoder == PHILIPS1)
-		target = 0x42;
-	else if (dev->decoder == PHILIPS2)
-		target = 0x8a;
-	else
-		return;
-
-	switch (format) {
-	case 0:	/* Auto */
-		pms_i2c_andor(dev, target, 0x0d, 0xfe, 0x00);
-		pms_i2c_andor(dev, target, 0x0f, 0x3f, 0x80);
-		break;
-	case 1: /* NTSC */
-		pms_i2c_andor(dev, target, 0x0d, 0xfe, 0x00);
-		pms_i2c_andor(dev, target, 0x0f, 0x3f, 0x40);
-		break;
-	case 2: /* PAL */
-		pms_i2c_andor(dev, target, 0x0d, 0xfe, 0x00);
-		pms_i2c_andor(dev, target, 0x0f, 0x3f, 0x00);
-		break;
-	case 3:	/* SECAM */
-		pms_i2c_andor(dev, target, 0x0d, 0xfe, 0x01);
-		pms_i2c_andor(dev, target, 0x0f, 0x3f, 0x00);
-		break;
-	}
-}
-
-#ifdef FOR_FUTURE_EXPANSION
-
-/*
- *	These features of the PMS card are not currently exposes. They
- *	could become a private v4l ioctl for PMSCONFIG or somesuch if
- *	people need it. We also don't yet use the PMS interrupt.
- */
-
-static void pms_hstart(struct pms *dev, short start)
-{
-	switch (dev->decoder) {
-	case PHILIPS1:
-		pms_i2c_write(dev, 0x8a, 0x05, start);
-		pms_i2c_write(dev, 0x8a, 0x18, start);
-		break;
-	case PHILIPS2:
-		pms_i2c_write(dev, 0x42, 0x05, start);
-		pms_i2c_write(dev, 0x42, 0x18, start);
-		break;
-	}
-}
-
-/*
- *	Bandpass filters
- */
-
-static void pms_bandpass(struct pms *dev, short pass)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0x8a, 0x06, 0xcf, (pass & 0x03) << 4);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x06, 0xcf, (pass & 0x03) << 4);
-}
-
-static void pms_antisnow(struct pms *dev, short snow)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0x8a, 0x06, 0xf3, (snow & 0x03) << 2);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x06, 0xf3, (snow & 0x03) << 2);
-}
-
-static void pms_sharpness(struct pms *dev, short sharp)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0x8a, 0x06, 0xfc, sharp & 0x03);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x06, 0xfc, sharp & 0x03);
-}
-
-static void pms_chromaagc(struct pms *dev, short agc)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0x8a, 0x0c, 0x9f, (agc & 0x03) << 5);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x0c, 0x9f, (agc & 0x03) << 5);
-}
-
-static void pms_vertnoise(struct pms *dev, short noise)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0x8a, 0x10, 0xfc, noise & 3);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x10, 0xfc, noise & 3);
-}
-
-static void pms_forcecolour(struct pms *dev, short colour)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0x8a, 0x0c, 0x7f, (colour & 1) << 7);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x0c, 0x7, (colour & 1) << 7);
-}
-
-static void pms_antigamma(struct pms *dev, short gamma)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0xb8, 0x00, 0x7f, (gamma & 1) << 7);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x20, 0x7, (gamma & 1) << 7);
-}
-
-static void pms_prefilter(struct pms *dev, short filter)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0x8a, 0x06, 0xbf, (filter & 1) << 6);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x06, 0xbf, (filter & 1) << 6);
-}
-
-static void pms_hfilter(struct pms *dev, short filter)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0xb8, 0x04, 0x1f, (filter & 7) << 5);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x24, 0x1f, (filter & 7) << 5);
-}
-
-static void pms_vfilter(struct pms *dev, short filter)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0xb8, 0x08, 0x9f, (filter & 3) << 5);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x28, 0x9f, (filter & 3) << 5);
-}
-
-static void pms_killcolour(struct pms *dev, short colour)
-{
-	if (dev->decoder == PHILIPS2) {
-		pms_i2c_andor(dev, 0x8a, 0x08, 0x07, (colour & 0x1f) << 3);
-		pms_i2c_andor(dev, 0x8a, 0x09, 0x07, (colour & 0x1f) << 3);
-	} else if (dev->decoder == PHILIPS1) {
-		pms_i2c_andor(dev, 0x42, 0x08, 0x07, (colour & 0x1f) << 3);
-		pms_i2c_andor(dev, 0x42, 0x09, 0x07, (colour & 0x1f) << 3);
-	}
-}
-
-static void pms_chromagain(struct pms *dev, short chroma)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_write(dev, 0x8a, 0x11, chroma);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_write(dev, 0x42, 0x11, chroma);
-}
-
-
-static void pms_spacialcompl(struct pms *dev, short data)
-{
-	mvv_write(dev, 0x3b, data);
-}
-
-static void pms_spacialcomph(struct pms *dev, short data)
-{
-	mvv_write(dev, 0x3a, data);
-}
-
-static void pms_vstart(struct pms *dev, short start)
-{
-	mvv_write(dev, 0x16, start);
-	mvv_write(dev, 0x17, (start >> 8) & 0x01);
-}
-
-#endif
-
-static void pms_secamcross(struct pms *dev, short cross)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0x8a, 0x0f, 0xdf, (cross & 1) << 5);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x0f, 0xdf, (cross & 1) << 5);
-}
-
-
-static void pms_swsense(struct pms *dev, short sense)
-{
-	if (dev->decoder == PHILIPS2) {
-		pms_i2c_write(dev, 0x8a, 0x0a, sense);
-		pms_i2c_write(dev, 0x8a, 0x0b, sense);
-	} else if (dev->decoder == PHILIPS1) {
-		pms_i2c_write(dev, 0x42, 0x0a, sense);
-		pms_i2c_write(dev, 0x42, 0x0b, sense);
-	}
-}
-
-
-static void pms_framerate(struct pms *dev, short frr)
-{
-	int fps = (dev->std & V4L2_STD_525_60) ? 30 : 25;
-
-	if (frr == 0)
-		return;
-	fps = fps/frr;
-	mvv_write(dev, 0x14, 0x80 | fps);
-	mvv_write(dev, 0x15, 1);
-}
-
-static void pms_vert(struct pms *dev, u8 deciden, u8 decinum)
-{
-	mvv_write(dev, 0x1c, deciden);	/* Denominator */
-	mvv_write(dev, 0x1d, decinum);	/* Numerator */
-}
-
-/*
- *	Turn 16bit ratios into best small ratio the chipset can grok
- */
-
-static void pms_vertdeci(struct pms *dev, unsigned short decinum, unsigned short deciden)
-{
-	/* Knock it down by / 5 once */
-	if (decinum % 5 == 0) {
-		deciden /= 5;
-		decinum /= 5;
-	}
-	/*
-	 *	3's
-	 */
-	while (decinum % 3 == 0 && deciden % 3 == 0) {
-		deciden /= 3;
-		decinum /= 3;
-	}
-	/*
-	 *	2's
-	 */
-	while (decinum % 2 == 0 && deciden % 2 == 0) {
-		decinum /= 2;
-		deciden /= 2;
-	}
-	/*
-	 *	Fudgyify
-	 */
-	while (deciden > 32) {
-		deciden /= 2;
-		decinum = (decinum + 1) / 2;
-	}
-	if (deciden == 32)
-		deciden--;
-	pms_vert(dev, deciden, decinum);
-}
-
-static void pms_horzdeci(struct pms *dev, short decinum, short deciden)
-{
-	if (decinum <= 512) {
-		if (decinum % 5 == 0) {
-			decinum /= 5;
-			deciden /= 5;
-		}
-	} else {
-		decinum = 512;
-		deciden = 640;	/* 768 would be ideal */
-	}
-
-	while (((decinum | deciden) & 1) == 0) {
-		decinum >>= 1;
-		deciden >>= 1;
-	}
-	while (deciden > 32) {
-		deciden >>= 1;
-		decinum = (decinum + 1) >> 1;
-	}
-	if (deciden == 32)
-		deciden--;
-
-	mvv_write(dev, 0x24, 0x80 | deciden);
-	mvv_write(dev, 0x25, decinum);
-}
-
-static void pms_resolution(struct pms *dev, short width, short height)
-{
-	int fg_height;
-
-	fg_height = height;
-	if (fg_height > 280)
-		fg_height = 280;
-
-	mvv_write(dev, 0x18, fg_height);
-	mvv_write(dev, 0x19, fg_height >> 8);
-
-	if (dev->std & V4L2_STD_525_60) {
-		mvv_write(dev, 0x1a, 0xfc);
-		mvv_write(dev, 0x1b, 0x00);
-		if (height > fg_height)
-			pms_vertdeci(dev, 240, 240);
-		else
-			pms_vertdeci(dev, fg_height, 240);
-	} else {
-		mvv_write(dev, 0x1a, 0x1a);
-		mvv_write(dev, 0x1b, 0x01);
-		if (fg_height > 256)
-			pms_vertdeci(dev, 270, 270);
-		else
-			pms_vertdeci(dev, fg_height, 270);
-	}
-	mvv_write(dev, 0x12, 0);
-	mvv_write(dev, 0x13, MVVMEMORYWIDTH);
-	mvv_write(dev, 0x42, 0x00);
-	mvv_write(dev, 0x43, 0x00);
-	mvv_write(dev, 0x44, MVVMEMORYWIDTH);
-
-	mvv_write(dev, 0x22, width + 8);
-	mvv_write(dev, 0x23, (width + 8) >> 8);
-
-	if (dev->std & V4L2_STD_525_60)
-		pms_horzdeci(dev, width, 640);
-	else
-		pms_horzdeci(dev, width + 8, 768);
-
-	mvv_write(dev, 0x30, mvv_read(dev, 0x30) & 0xfe);
-	mvv_write(dev, 0x08, mvv_read(dev, 0x08) | 0x01);
-	mvv_write(dev, 0x01, mvv_read(dev, 0x01) & 0xfd);
-	mvv_write(dev, 0x32, 0x00);
-	mvv_write(dev, 0x33, MVVMEMORYWIDTH);
-}
-
-
-/*
- *	Set Input
- */
-
-static void pms_vcrinput(struct pms *dev, short input)
-{
-	if (dev->decoder == PHILIPS2)
-		pms_i2c_andor(dev, 0x8a, 0x0d, 0x7f, (input & 1) << 7);
-	else if (dev->decoder == PHILIPS1)
-		pms_i2c_andor(dev, 0x42, 0x0d, 0x7f, (input & 1) << 7);
-}
-
-
-static int pms_capture(struct pms *dev, char __user *buf, int rgb555, int count)
-{
-	int y;
-	int dw = 2 * dev->width;
-	char tmp[dw + 32]; /* using a temp buffer is faster than direct  */
-	int cnt = 0;
-	int len = 0;
-	unsigned char r8 = 0x5;  /* value for reg8  */
-
-	if (rgb555)
-		r8 |= 0x20; /* else use untranslated rgb = 565 */
-	mvv_write(dev, 0x08, r8); /* capture rgb555/565, init DRAM, PC enable */
-
-/*	printf("%d %d %d %d %d %x %x\n",width,height,voff,nom,den,mvv_buf); */
-
-	for (y = 0; y < dev->height; y++) {
-		writeb(0, dev->mem);  /* synchronisiert neue Zeile */
-
-		/*
-		 *	This is in truth a fifo, be very careful as if you
-		 *	forgot this odd things will occur 8)
-		 */
-
-		memcpy_fromio(tmp, dev->mem, dw + 32); /* discard 16 word   */
-		cnt -= dev->height;
-		while (cnt <= 0) {
-			/*
-			 *	Don't copy too far
-			 */
-			int dt = dw;
-			if (dt + len > count)
-				dt = count - len;
-			cnt += dev->height;
-			if (copy_to_user(buf, tmp + 32, dt))
-				return len ? len : -EFAULT;
-			buf += dt;
-			len += dt;
-		}
-	}
-	return len;
-}
-
-
-/*
- *	Video4linux interfacing
- */
-
-static int pms_querycap(struct file *file, void  *priv,
-					struct v4l2_capability *vcap)
-{
-	struct pms *dev = video_drvdata(file);
-
-	strlcpy(vcap->driver, dev->v4l2_dev.name, sizeof(vcap->driver));
-	strlcpy(vcap->card, "Mediavision PMS", sizeof(vcap->card));
-	snprintf(vcap->bus_info, sizeof(vcap->bus_info),
-			"ISA:%s", dev->v4l2_dev.name);
-	vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
-	vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS;
-	return 0;
-}
-
-static int pms_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
-{
-	static const char *inputs[4] = {
-		"Composite",
-		"S-Video",
-		"Composite (VCR)",
-		"S-Video (VCR)"
-	};
-
-	if (vin->index > 3)
-		return -EINVAL;
-	strlcpy(vin->name, inputs[vin->index], sizeof(vin->name));
-	vin->type = V4L2_INPUT_TYPE_CAMERA;
-	vin->audioset = 0;
-	vin->tuner = 0;
-	vin->std = V4L2_STD_ALL;
-	vin->status = 0;
-	return 0;
-}
-
-static int pms_g_input(struct file *file, void *fh, unsigned int *inp)
-{
-	struct pms *dev = video_drvdata(file);
-
-	*inp = dev->input;
-	return 0;
-}
-
-static int pms_s_input(struct file *file, void *fh, unsigned int inp)
-{
-	struct pms *dev = video_drvdata(file);
-
-	if (inp > 3)
-		return -EINVAL;
-
-	dev->input = inp;
-	pms_videosource(dev, inp & 1);
-	pms_vcrinput(dev, inp >> 1);
-	return 0;
-}
-
-static int pms_g_std(struct file *file, void *fh, v4l2_std_id *std)
-{
-	struct pms *dev = video_drvdata(file);
-
-	*std = dev->std;
-	return 0;
-}
-
-static int pms_s_std(struct file *file, void *fh, v4l2_std_id *std)
-{
-	struct pms *dev = video_drvdata(file);
-	int ret = 0;
-
-	dev->std = *std;
-	if (dev->std & V4L2_STD_NTSC) {
-		pms_framerate(dev, 30);
-		pms_secamcross(dev, 0);
-		pms_format(dev, 1);
-	} else if (dev->std & V4L2_STD_PAL) {
-		pms_framerate(dev, 25);
-		pms_secamcross(dev, 0);
-		pms_format(dev, 2);
-	} else if (dev->std & V4L2_STD_SECAM) {
-		pms_framerate(dev, 25);
-		pms_secamcross(dev, 1);
-		pms_format(dev, 2);
-	} else {
-		ret = -EINVAL;
-	}
-	/*
-	switch (v->mode) {
-	case VIDEO_MODE_AUTO:
-		pms_framerate(dev, 25);
-		pms_secamcross(dev, 0);
-		pms_format(dev, 0);
-		break;
-	}*/
-	return ret;
-}
-
-static int pms_s_ctrl(struct v4l2_ctrl *ctrl)
-{
-	struct pms *dev = container_of(ctrl->handler, struct pms, hdl);
-	int ret = 0;
-
-	switch (ctrl->id) {
-	case V4L2_CID_BRIGHTNESS:
-		pms_brightness(dev, ctrl->val);
-		break;
-	case V4L2_CID_CONTRAST:
-		pms_contrast(dev, ctrl->val);
-		break;
-	case V4L2_CID_SATURATION:
-		pms_saturation(dev, ctrl->val);
-		break;
-	case V4L2_CID_HUE:
-		pms_hue(dev, ctrl->val);
-		break;
-	default:
-		ret = -EINVAL;
-		break;
-	}
-	return ret;
-}
-
-static int pms_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct pms *dev = video_drvdata(file);
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-
-	pix->width = dev->width;
-	pix->height = dev->height;
-	pix->pixelformat = dev->width == 15 ?
-			    V4L2_PIX_FMT_RGB555 : V4L2_PIX_FMT_RGB565;
-	pix->field = V4L2_FIELD_NONE;
-	pix->bytesperline = 2 * dev->width;
-	pix->sizeimage = 2 * dev->width * dev->height;
-	/* Just a guess */
-	pix->colorspace = V4L2_COLORSPACE_SRGB;
-	return 0;
-}
-
-static int pms_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-
-	if (pix->height < 16 || pix->height > 480)
-		return -EINVAL;
-	if (pix->width < 16 || pix->width > 640)
-		return -EINVAL;
-	if (pix->pixelformat != V4L2_PIX_FMT_RGB555 &&
-	    pix->pixelformat != V4L2_PIX_FMT_RGB565)
-		return -EINVAL;
-	pix->field = V4L2_FIELD_NONE;
-	pix->bytesperline = 2 * pix->width;
-	pix->sizeimage = 2 * pix->width * pix->height;
-	/* Just a guess */
-	pix->colorspace = V4L2_COLORSPACE_SRGB;
-	return 0;
-}
-
-static int pms_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct pms *dev = video_drvdata(file);
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-	int ret = pms_try_fmt_vid_cap(file, fh, fmt);
-
-	if (ret)
-		return ret;
-	dev->width = pix->width;
-	dev->height = pix->height;
-	dev->depth = (pix->pixelformat == V4L2_PIX_FMT_RGB555) ? 15 : 16;
-	pms_resolution(dev, dev->width, dev->height);
-	/* Ok we figured out what to use from our wide choice */
-	return 0;
-}
-
-static int pms_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt)
-{
-	static struct v4l2_fmtdesc formats[] = {
-		{ 0, 0, 0,
-		  "RGB 5:5:5", V4L2_PIX_FMT_RGB555,
-		  { 0, 0, 0, 0 }
-		},
-		{ 1, 0, 0,
-		  "RGB 5:6:5", V4L2_PIX_FMT_RGB565,
-		  { 0, 0, 0, 0 }
-		},
-	};
-	enum v4l2_buf_type type = fmt->type;
-
-	if (fmt->index > 1)
-		return -EINVAL;
-
-	*fmt = formats[fmt->index];
-	fmt->type = type;
-	return 0;
-}
-
-static ssize_t pms_read(struct file *file, char __user *buf,
-		    size_t count, loff_t *ppos)
-{
-	struct pms *dev = video_drvdata(file);
-	int len;
-
-	len = pms_capture(dev, buf, (dev->depth == 15), count);
-	return len;
-}
-
-static unsigned int pms_poll(struct file *file, struct poll_table_struct *wait)
-{
-	struct v4l2_fh *fh = file->private_data;
-	unsigned int res = POLLIN | POLLRDNORM;
-
-	if (v4l2_event_pending(fh))
-		res |= POLLPRI;
-	poll_wait(file, &fh->wait, wait);
-	return res;
-}
-
-static const struct v4l2_file_operations pms_fops = {
-	.owner		= THIS_MODULE,
-	.open           = v4l2_fh_open,
-	.release        = v4l2_fh_release,
-	.poll           = pms_poll,
-	.unlocked_ioctl	= video_ioctl2,
-	.read           = pms_read,
-};
-
-static const struct v4l2_ioctl_ops pms_ioctl_ops = {
-	.vidioc_querycap	    = pms_querycap,
-	.vidioc_g_input		    = pms_g_input,
-	.vidioc_s_input		    = pms_s_input,
-	.vidioc_enum_input	    = pms_enum_input,
-	.vidioc_g_std		    = pms_g_std,
-	.vidioc_s_std		    = pms_s_std,
-	.vidioc_enum_fmt_vid_cap    = pms_enum_fmt_vid_cap,
-	.vidioc_g_fmt_vid_cap	    = pms_g_fmt_vid_cap,
-	.vidioc_s_fmt_vid_cap	    = pms_s_fmt_vid_cap,
-	.vidioc_try_fmt_vid_cap     = pms_try_fmt_vid_cap,
-	.vidioc_subscribe_event     = v4l2_ctrl_subscribe_event,
-	.vidioc_unsubscribe_event   = v4l2_event_unsubscribe,
-};
-
-/*
- *	Probe for and initialise the Mediavision PMS
- */
-
-static int init_mediavision(struct pms *dev)
-{
-	int idec, decst;
-	int i;
-	static const unsigned char i2c_defs[] = {
-		0x4c, 0x30, 0x00, 0xe8,
-		0xb6, 0xe2, 0x00, 0x00,
-		0xff, 0xff, 0x00, 0x00,
-		0x00, 0x00, 0x78, 0x98,
-		0x00, 0x00, 0x00, 0x00,
-		0x34, 0x0a, 0xf4, 0xce,
-		0xe4
-	};
-
-	dev->mem = ioremap(mem_base, 0x800);
-	if (!dev->mem)
-		return -ENOMEM;
-
-	if (!request_region(0x9a01, 1, "Mediavision PMS config")) {
-		printk(KERN_WARNING "mediavision: unable to detect: 0x9a01 in use.\n");
-		iounmap(dev->mem);
-		return -EBUSY;
-	}
-	if (!request_region(dev->io, 3, "Mediavision PMS")) {
-		printk(KERN_WARNING "mediavision: I/O port %d in use.\n", dev->io);
-		release_region(0x9a01, 1);
-		iounmap(dev->mem);
-		return -EBUSY;
-	}
-	outb(0xb8, 0x9a01);		/* Unlock */
-	outb(dev->io >> 4, 0x9a01);	/* Set IO port */
-
-
-	decst = pms_i2c_stat(dev, 0x43);
-
-	if (decst != -1)
-		idec = 2;
-	else if (pms_i2c_stat(dev, 0xb9) != -1)
-		idec = 3;
-	else if (pms_i2c_stat(dev, 0x8b) != -1)
-		idec = 1;
-	else
-		idec = 0;
-
-	printk(KERN_INFO "PMS type is %d\n", idec);
-	if (idec == 0) {
-		release_region(dev->io, 3);
-		release_region(0x9a01, 1);
-		iounmap(dev->mem);
-		return -ENODEV;
-	}
-
-	/*
-	 *	Ok we have a PMS of some sort
-	 */
-
-	mvv_write(dev, 0x04, mem_base >> 12);	/* Set the memory area */
-
-	/* Ok now load the defaults */
-
-	for (i = 0; i < 0x19; i++) {
-		if (i2c_defs[i] == 0xff)
-			pms_i2c_andor(dev, 0x8a, i, 0x07, 0x00);
-		else
-			pms_i2c_write(dev, 0x8a, i, i2c_defs[i]);
-	}
-
-	pms_i2c_write(dev, 0xb8, 0x00, 0x12);
-	pms_i2c_write(dev, 0xb8, 0x04, 0x00);
-	pms_i2c_write(dev, 0xb8, 0x07, 0x00);
-	pms_i2c_write(dev, 0xb8, 0x08, 0x00);
-	pms_i2c_write(dev, 0xb8, 0x09, 0xff);
-	pms_i2c_write(dev, 0xb8, 0x0a, 0x00);
-	pms_i2c_write(dev, 0xb8, 0x0b, 0x10);
-	pms_i2c_write(dev, 0xb8, 0x10, 0x03);
-
-	mvv_write(dev, 0x01, 0x00);
-	mvv_write(dev, 0x05, 0xa0);
-	mvv_write(dev, 0x08, 0x25);
-	mvv_write(dev, 0x09, 0x00);
-	mvv_write(dev, 0x0a, 0x20 | MVVMEMORYWIDTH);
-
-	mvv_write(dev, 0x10, 0x02);
-	mvv_write(dev, 0x1e, 0x0c);
-	mvv_write(dev, 0x1f, 0x03);
-	mvv_write(dev, 0x26, 0x06);
-
-	mvv_write(dev, 0x2b, 0x00);
-	mvv_write(dev, 0x2c, 0x20);
-	mvv_write(dev, 0x2d, 0x00);
-	mvv_write(dev, 0x2f, 0x70);
-	mvv_write(dev, 0x32, 0x00);
-	mvv_write(dev, 0x33, MVVMEMORYWIDTH);
-	mvv_write(dev, 0x34, 0x00);
-	mvv_write(dev, 0x35, 0x00);
-	mvv_write(dev, 0x3a, 0x80);
-	mvv_write(dev, 0x3b, 0x10);
-	mvv_write(dev, 0x20, 0x00);
-	mvv_write(dev, 0x21, 0x00);
-	mvv_write(dev, 0x30, 0x22);
-	return 0;
-}
-
-/*
- *	Initialization and module stuff
- */
-
-#ifndef MODULE
-static int enable;
-module_param(enable, int, 0);
-#endif
-
-static const struct v4l2_ctrl_ops pms_ctrl_ops = {
-	.s_ctrl = pms_s_ctrl,
-};
-
-static int pms_probe(struct device *pdev, unsigned int card)
-{
-	struct pms *dev;
-	struct v4l2_device *v4l2_dev;
-	struct v4l2_ctrl_handler *hdl;
-	int res;
-
-#ifndef MODULE
-	if (!enable) {
-		pr_err("PMS: not enabled, use pms.enable=1 to probe\n");
-		return -ENODEV;
-	}
-#endif
-
-	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-	if (dev == NULL)
-		return -ENOMEM;
-
-	dev->decoder = PHILIPS2;
-	dev->io = io_port;
-	dev->data = io_port + 1;
-	v4l2_dev = &dev->v4l2_dev;
-	hdl = &dev->hdl;
-
-	res = v4l2_device_register(pdev, v4l2_dev);
-	if (res < 0) {
-		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
-		goto free_dev;
-	}
-	v4l2_info(v4l2_dev, "Mediavision Pro Movie Studio driver 0.05\n");
-
-	res = init_mediavision(dev);
-	if (res) {
-		v4l2_err(v4l2_dev, "Board not found.\n");
-		goto free_io;
-	}
-
-	v4l2_ctrl_handler_init(hdl, 4);
-	v4l2_ctrl_new_std(hdl, &pms_ctrl_ops,
-			V4L2_CID_BRIGHTNESS, 0, 255, 1, 139);
-	v4l2_ctrl_new_std(hdl, &pms_ctrl_ops,
-			V4L2_CID_CONTRAST, 0, 255, 1, 70);
-	v4l2_ctrl_new_std(hdl, &pms_ctrl_ops,
-			V4L2_CID_SATURATION, 0, 255, 1, 64);
-	v4l2_ctrl_new_std(hdl, &pms_ctrl_ops,
-			V4L2_CID_HUE, 0, 255, 1, 0);
-	if (hdl->error) {
-		res = hdl->error;
-		goto free_hdl;
-	}
-
-	mutex_init(&dev->lock);
-	strlcpy(dev->vdev.name, v4l2_dev->name, sizeof(dev->vdev.name));
-	dev->vdev.v4l2_dev = v4l2_dev;
-	dev->vdev.ctrl_handler = hdl;
-	dev->vdev.fops = &pms_fops;
-	dev->vdev.ioctl_ops = &pms_ioctl_ops;
-	dev->vdev.release = video_device_release_empty;
-	dev->vdev.lock = &dev->lock;
-	dev->vdev.tvnorms = V4L2_STD_NTSC | V4L2_STD_PAL | V4L2_STD_SECAM;
-	set_bit(V4L2_FL_USE_FH_PRIO, &dev->vdev.flags);
-	video_set_drvdata(&dev->vdev, dev);
-	dev->std = V4L2_STD_NTSC_M;
-	dev->height = 240;
-	dev->width = 320;
-	dev->depth = 16;
-	pms_swsense(dev, 75);
-	pms_resolution(dev, 320, 240);
-	pms_videosource(dev, 0);
-	pms_vcrinput(dev, 0);
-	v4l2_ctrl_handler_setup(hdl);
-	res = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, video_nr);
-	if (res >= 0)
-		return 0;
-
-free_hdl:
-	v4l2_ctrl_handler_free(hdl);
-	v4l2_device_unregister(&dev->v4l2_dev);
-free_io:
-	release_region(dev->io, 3);
-	release_region(0x9a01, 1);
-	iounmap(dev->mem);
-free_dev:
-	kfree(dev);
-	return res;
-}
-
-static int pms_remove(struct device *pdev, unsigned int card)
-{
-	struct pms *dev = dev_get_drvdata(pdev);
-
-	video_unregister_device(&dev->vdev);
-	v4l2_ctrl_handler_free(&dev->hdl);
-	release_region(dev->io, 3);
-	release_region(0x9a01, 1);
-	iounmap(dev->mem);
-	return 0;
-}
-
-static struct isa_driver pms_driver = {
-	.probe		= pms_probe,
-	.remove		= pms_remove,
-	.driver		= {
-		.name	= "pms",
-	},
-};
-
-static int __init pms_init(void)
-{
-	return isa_register_driver(&pms_driver, 1);
-}
-
-static void __exit pms_exit(void)
-{
-	isa_unregister_driver(&pms_driver);
-}
-
-module_init(pms_init);
-module_exit(pms_exit);
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c
deleted file mode 100644
index db2a600..0000000
--- a/drivers/media/video/w9966.c
+++ /dev/null
@@ -1,981 +0,0 @@
-/*
-	Winbond w9966cf Webcam parport driver.
-
-	Version 0.33
-
-	Copyright (C) 2001 Jakob Kemi <jakob.kemi@post.utfors.se>
-
-	This program is free software; you can redistribute it and/or modify
-	it under the terms of the GNU General Public License as published by
-	the Free Software Foundation; either version 2 of the License, or
-	(at your option) any later version.
-
-	This program is distributed in the hope that it will be useful,
-	but WITHOUT ANY WARRANTY; without even the implied warranty of
-	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-	GNU General Public License for more details.
-
-	You should have received a copy of the GNU General Public License
-	along with this program; if not, write to the Free Software
-	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/*
-	Supported devices:
-	*Lifeview FlyCam Supra (using the Philips saa7111a chip)
-
-	Does any other model using the w9966 interface chip exist ?
-
-	Todo:
-
-	*Add a working EPP mode, since DMA ECP read isn't implemented
-	in the parport drivers. (That's why it's so sloow)
-
-	*Add support for other ccd-control chips than the saa7111
-	please send me feedback on what kind of chips you have.
-
-	*Add proper probing. I don't know what's wrong with the IEEE1284
-	parport drivers but (IEEE1284_MODE_NIBBLE|IEEE1284_DEVICE_ID)
-	and nibble read seems to be broken for some peripherals.
-
-	*Add probing for onboard SRAM, port directions etc. (if possible)
-
-	*Add support for the hardware compressed modes (maybe using v4l2)
-
-	*Fix better support for the capture window (no skewed images, v4l
-	interface to capt. window)
-
-	*Probably some bugs that I don't know of
-
-	Please support me by sending feedback!
-
-	Changes:
-
-	Alan Cox:	Removed RGB mode for kernel merge, added THIS_MODULE
-			and owner support for newer module locks
-*/
-
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/videodev2.h>
-#include <linux/slab.h>
-#include <media/v4l2-common.h>
-#include <media/v4l2-ioctl.h>
-#include <media/v4l2-device.h>
-#include <media/v4l2-fh.h>
-#include <media/v4l2-ctrls.h>
-#include <media/v4l2-event.h>
-#include <linux/parport.h>
-
-/*#define DEBUG*/				/* Undef me for production */
-
-#ifdef DEBUG
-#define DPRINTF(x, a...) printk(KERN_DEBUG "W9966: %s(): "x, __func__ , ##a)
-#else
-#define DPRINTF(x...)
-#endif
-
-/*
- *	Defines, simple typedefs etc.
- */
-
-#define W9966_DRIVERNAME	"W9966CF Webcam"
-#define W9966_MAXCAMS		4	/* Maximum number of cameras */
-#define W9966_RBUFFER		2048	/* Read buffer (must be an even number) */
-#define W9966_SRAMSIZE		131072	/* 128kb */
-#define W9966_SRAMID		0x02	/* check w9966cf.pdf */
-
-/* Empirically determined window limits */
-#define W9966_WND_MIN_X		16
-#define W9966_WND_MIN_Y		14
-#define W9966_WND_MAX_X		705
-#define W9966_WND_MAX_Y		253
-#define W9966_WND_MAX_W		(W9966_WND_MAX_X - W9966_WND_MIN_X)
-#define W9966_WND_MAX_H		(W9966_WND_MAX_Y - W9966_WND_MIN_Y)
-
-/* Keep track of our current state */
-#define W9966_STATE_PDEV	0x01
-#define W9966_STATE_CLAIMED	0x02
-#define W9966_STATE_VDEV	0x04
-
-#define W9966_I2C_W_ID		0x48
-#define W9966_I2C_R_ID		0x49
-#define W9966_I2C_R_DATA	0x08
-#define W9966_I2C_R_CLOCK	0x04
-#define W9966_I2C_W_DATA	0x02
-#define W9966_I2C_W_CLOCK	0x01
-
-struct w9966 {
-	struct v4l2_device v4l2_dev;
-	struct v4l2_ctrl_handler hdl;
-	unsigned char dev_state;
-	unsigned char i2c_state;
-	unsigned short ppmode;
-	struct parport *pport;
-	struct pardevice *pdev;
-	struct video_device vdev;
-	unsigned short width;
-	unsigned short height;
-	unsigned char brightness;
-	signed char contrast;
-	signed char color;
-	signed char hue;
-	struct mutex lock;
-};
-
-/*
- *	Module specific properties
- */
-
-MODULE_AUTHOR("Jakob Kemi <jakob.kemi@post.utfors.se>");
-MODULE_DESCRIPTION("Winbond w9966cf WebCam driver (0.32)");
-MODULE_LICENSE("GPL");
-MODULE_VERSION("0.33.1");
-
-#ifdef MODULE
-static char *pardev[] = {[0 ... W9966_MAXCAMS] = ""};
-#else
-static char *pardev[] = {[0 ... W9966_MAXCAMS] = "aggressive"};
-#endif
-module_param_array(pardev, charp, NULL, 0);
-MODULE_PARM_DESC(pardev, "pardev: where to search for\n"
-		"\teach camera. 'aggressive' means brute-force search.\n"
-		"\tEg: >pardev=parport3,aggressive,parport2,parport1< would assign\n"
-		"\tcam 1 to parport3 and search every parport for cam 2 etc...");
-
-static int parmode;
-module_param(parmode, int, 0);
-MODULE_PARM_DESC(parmode, "parmode: transfer mode (0=auto, 1=ecp, 2=epp");
-
-static int video_nr = -1;
-module_param(video_nr, int, 0);
-
-static struct w9966 w9966_cams[W9966_MAXCAMS];
-
-/*
- *	Private function defines
- */
-
-
-/* Set camera phase flags, so we know what to uninit when terminating */
-static inline void w9966_set_state(struct w9966 *cam, int mask, int val)
-{
-	cam->dev_state = (cam->dev_state & ~mask) ^ val;
-}
-
-/* Get camera phase flags */
-static inline int w9966_get_state(struct w9966 *cam, int mask, int val)
-{
-	return ((cam->dev_state & mask) == val);
-}
-
-/* Claim parport for ourself */
-static void w9966_pdev_claim(struct w9966 *cam)
-{
-	if (w9966_get_state(cam, W9966_STATE_CLAIMED, W9966_STATE_CLAIMED))
-		return;
-	parport_claim_or_block(cam->pdev);
-	w9966_set_state(cam, W9966_STATE_CLAIMED, W9966_STATE_CLAIMED);
-}
-
-/* Release parport for others to use */
-static void w9966_pdev_release(struct w9966 *cam)
-{
-	if (w9966_get_state(cam, W9966_STATE_CLAIMED, 0))
-		return;
-	parport_release(cam->pdev);
-	w9966_set_state(cam, W9966_STATE_CLAIMED, 0);
-}
-
-/* Read register from W9966 interface-chip
-   Expects a claimed pdev
-   -1 on error, else register data (byte) */
-static int w9966_read_reg(struct w9966 *cam, int reg)
-{
-	/* ECP, read, regtransfer, REG, REG, REG, REG, REG */
-	const unsigned char addr = 0x80 | (reg & 0x1f);
-	unsigned char val;
-
-	if (parport_negotiate(cam->pport, cam->ppmode | IEEE1284_ADDR) != 0)
-		return -1;
-	if (parport_write(cam->pport, &addr, 1) != 1)
-		return -1;
-	if (parport_negotiate(cam->pport, cam->ppmode | IEEE1284_DATA) != 0)
-		return -1;
-	if (parport_read(cam->pport, &val, 1) != 1)
-		return -1;
-
-	return val;
-}
-
-/* Write register to W9966 interface-chip
-   Expects a claimed pdev
-   -1 on error */
-static int w9966_write_reg(struct w9966 *cam, int reg, int data)
-{
-	/* ECP, write, regtransfer, REG, REG, REG, REG, REG */
-	const unsigned char addr = 0xc0 | (reg & 0x1f);
-	const unsigned char val = data;
-
-	if (parport_negotiate(cam->pport, cam->ppmode | IEEE1284_ADDR) != 0)
-		return -1;
-	if (parport_write(cam->pport, &addr, 1) != 1)
-		return -1;
-	if (parport_negotiate(cam->pport, cam->ppmode | IEEE1284_DATA) != 0)
-		return -1;
-	if (parport_write(cam->pport, &val, 1) != 1)
-		return -1;
-
-	return 0;
-}
-
-/*
- *	Ugly and primitive i2c protocol functions
- */
-
-/* Sets the data line on the i2c bus.
-   Expects a claimed pdev. */
-static void w9966_i2c_setsda(struct w9966 *cam, int state)
-{
-	if (state)
-		cam->i2c_state |= W9966_I2C_W_DATA;
-	else
-		cam->i2c_state &= ~W9966_I2C_W_DATA;
-
-	w9966_write_reg(cam, 0x18, cam->i2c_state);
-	udelay(5);
-}
-
-/* Get peripheral clock line
-   Expects a claimed pdev. */
-static int w9966_i2c_getscl(struct w9966 *cam)
-{
-	const unsigned char state = w9966_read_reg(cam, 0x18);
-	return ((state & W9966_I2C_R_CLOCK) > 0);
-}
-
-/* Sets the clock line on the i2c bus.
-   Expects a claimed pdev. -1 on error */
-static int w9966_i2c_setscl(struct w9966 *cam, int state)
-{
-	unsigned long timeout;
-
-	if (state)
-		cam->i2c_state |= W9966_I2C_W_CLOCK;
-	else
-		cam->i2c_state &= ~W9966_I2C_W_CLOCK;
-
-	w9966_write_reg(cam, 0x18, cam->i2c_state);
-	udelay(5);
-
-	/* we go to high, we also expect the peripheral to ack. */
-	if (state) {
-		timeout = jiffies + 100;
-		while (!w9966_i2c_getscl(cam)) {
-			if (time_after(jiffies, timeout))
-				return -1;
-		}
-	}
-	return 0;
-}
-
-#if 0
-/* Get peripheral data line
-   Expects a claimed pdev. */
-static int w9966_i2c_getsda(struct w9966 *cam)
-{
-	const unsigned char state = w9966_read_reg(cam, 0x18);
-	return ((state & W9966_I2C_R_DATA) > 0);
-}
-#endif
-
-/* Write a byte with ack to the i2c bus.
-   Expects a claimed pdev. -1 on error */
-static int w9966_i2c_wbyte(struct w9966 *cam, int data)
-{
-	int i;
-
-	for (i = 7; i >= 0; i--) {
-		w9966_i2c_setsda(cam, (data >> i) & 0x01);
-
-		if (w9966_i2c_setscl(cam, 1) == -1)
-			return -1;
-		w9966_i2c_setscl(cam, 0);
-	}
-
-	w9966_i2c_setsda(cam, 1);
-
-	if (w9966_i2c_setscl(cam, 1) == -1)
-		return -1;
-	w9966_i2c_setscl(cam, 0);
-
-	return 0;
-}
-
-/* Read a data byte with ack from the i2c-bus
-   Expects a claimed pdev. -1 on error */
-#if 0
-static int w9966_i2c_rbyte(struct w9966 *cam)
-{
-	unsigned char data = 0x00;
-	int i;
-
-	w9966_i2c_setsda(cam, 1);
-
-	for (i = 0; i < 8; i++) {
-		if (w9966_i2c_setscl(cam, 1) == -1)
-			return -1;
-		data = data << 1;
-		if (w9966_i2c_getsda(cam))
-			data |= 0x01;
-
-		w9966_i2c_setscl(cam, 0);
-	}
-	return data;
-}
-#endif
-
-/* Read a register from the i2c device.
-   Expects claimed pdev. -1 on error */
-#if 0
-static int w9966_read_reg_i2c(struct w9966 *cam, int reg)
-{
-	int data;
-
-	w9966_i2c_setsda(cam, 0);
-	w9966_i2c_setscl(cam, 0);
-
-	if (w9966_i2c_wbyte(cam, W9966_I2C_W_ID) == -1 ||
-	    w9966_i2c_wbyte(cam, reg) == -1)
-		return -1;
-
-	w9966_i2c_setsda(cam, 1);
-	if (w9966_i2c_setscl(cam, 1) == -1)
-		return -1;
-	w9966_i2c_setsda(cam, 0);
-	w9966_i2c_setscl(cam, 0);
-
-	if (w9966_i2c_wbyte(cam, W9966_I2C_R_ID) == -1)
-		return -1;
-	data = w9966_i2c_rbyte(cam);
-	if (data == -1)
-		return -1;
-
-	w9966_i2c_setsda(cam, 0);
-
-	if (w9966_i2c_setscl(cam, 1) == -1)
-		return -1;
-	w9966_i2c_setsda(cam, 1);
-
-	return data;
-}
-#endif
-
-/* Write a register to the i2c device.
-   Expects claimed pdev. -1 on error */
-static int w9966_write_reg_i2c(struct w9966 *cam, int reg, int data)
-{
-	w9966_i2c_setsda(cam, 0);
-	w9966_i2c_setscl(cam, 0);
-
-	if (w9966_i2c_wbyte(cam, W9966_I2C_W_ID) == -1 ||
-			w9966_i2c_wbyte(cam, reg) == -1 ||
-			w9966_i2c_wbyte(cam, data) == -1)
-		return -1;
-
-	w9966_i2c_setsda(cam, 0);
-	if (w9966_i2c_setscl(cam, 1) == -1)
-		return -1;
-
-	w9966_i2c_setsda(cam, 1);
-
-	return 0;
-}
-
-/* Find a good length for capture window (used both for W and H)
-   A bit ugly but pretty functional. The capture length
-   have to match the downscale */
-static int w9966_findlen(int near, int size, int maxlen)
-{
-	int bestlen = size;
-	int besterr = abs(near - bestlen);
-	int len;
-
-	for (len = size + 1; len < maxlen; len++) {
-		int err;
-		if (((64 * size) % len) != 0)
-			continue;
-
-		err = abs(near - len);
-
-		/* Only continue as long as we keep getting better values */
-		if (err > besterr)
-			break;
-
-		besterr = err;
-		bestlen = len;
-	}
-
-	return bestlen;
-}
-
-/* Modify capture window (if necessary)
-   and calculate downscaling
-   Return -1 on error */
-static int w9966_calcscale(int size, int min, int max, int *beg, int *end, unsigned char *factor)
-{
-	int maxlen = max - min;
-	int len = *end - *beg + 1;
-	int newlen = w9966_findlen(len, size, maxlen);
-	int err = newlen - len;
-
-	/* Check for bad format */
-	if (newlen > maxlen || newlen < size)
-		return -1;
-
-	/* Set factor (6 bit fixed) */
-	*factor = (64 * size) / newlen;
-	if (*factor == 64)
-		*factor = 0x00;	/* downscale is disabled */
-	else
-		*factor |= 0x80; /* set downscale-enable bit */
-
-	/* Modify old beginning and end */
-	*beg -= err / 2;
-	*end += err - (err / 2);
-
-	/* Move window if outside borders */
-	if (*beg < min) {
-		*end += min - *beg;
-		*beg += min - *beg;
-	}
-	if (*end > max) {
-		*beg -= *end - max;
-		*end -= *end - max;
-	}
-
-	return 0;
-}
-
-/* Setup the cameras capture window etc.
-   Expects a claimed pdev
-   return -1 on error */
-static int w9966_setup(struct w9966 *cam, int x1, int y1, int x2, int y2, int w, int h)
-{
-	unsigned int i;
-	unsigned int enh_s, enh_e;
-	unsigned char scale_x, scale_y;
-	unsigned char regs[0x1c];
-	unsigned char saa7111_regs[] = {
-		0x21, 0x00, 0xd8, 0x23, 0x00, 0x80, 0x80, 0x00,
-		0x88, 0x10, 0x80, 0x40, 0x40, 0x00, 0x01, 0x00,
-		0x48, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x71, 0xe7, 0x00, 0x00, 0xc0
-	};
-
-
-	if (w * h * 2 > W9966_SRAMSIZE) {
-		DPRINTF("capture window exceeds SRAM size!.\n");
-		w = 200; h = 160;	/* Pick default values */
-	}
-
-	w &= ~0x1;
-	if (w < 2)
-		w = 2;
-	if (h < 1)
-		h = 1;
-	if (w > W9966_WND_MAX_W)
-		w = W9966_WND_MAX_W;
-	if (h > W9966_WND_MAX_H)
-		h = W9966_WND_MAX_H;
-
-	cam->width = w;
-	cam->height = h;
-
-	enh_s = 0;
-	enh_e = w * h * 2;
-
-	/* Modify capture window if necessary and calculate downscaling */
-	if (w9966_calcscale(w, W9966_WND_MIN_X, W9966_WND_MAX_X, &x1, &x2, &scale_x) != 0 ||
-			w9966_calcscale(h, W9966_WND_MIN_Y, W9966_WND_MAX_Y, &y1, &y2, &scale_y) != 0)
-		return -1;
-
-	DPRINTF("%dx%d, x: %d<->%d, y: %d<->%d, sx: %d/64, sy: %d/64.\n",
-			w, h, x1, x2, y1, y2, scale_x & ~0x80, scale_y & ~0x80);
-
-	/* Setup registers */
-	regs[0x00] = 0x00;			/* Set normal operation */
-	regs[0x01] = 0x18;			/* Capture mode */
-	regs[0x02] = scale_y;			/* V-scaling */
-	regs[0x03] = scale_x;			/* H-scaling */
-
-	/* Capture window */
-	regs[0x04] = (x1 & 0x0ff);		/* X-start (8 low bits) */
-	regs[0x05] = (x1 & 0x300)>>8;		/* X-start (2 high bits) */
-	regs[0x06] = (y1 & 0x0ff);		/* Y-start (8 low bits) */
-	regs[0x07] = (y1 & 0x300)>>8;		/* Y-start (2 high bits) */
-	regs[0x08] = (x2 & 0x0ff);		/* X-end (8 low bits) */
-	regs[0x09] = (x2 & 0x300)>>8;		/* X-end (2 high bits) */
-	regs[0x0a] = (y2 & 0x0ff);		/* Y-end (8 low bits) */
-
-	regs[0x0c] = W9966_SRAMID;		/* SRAM-banks (1x 128kb) */
-
-	/* Enhancement layer */
-	regs[0x0d] = (enh_s & 0x000ff);		/* Enh. start (0-7) */
-	regs[0x0e] = (enh_s & 0x0ff00) >> 8;	/* Enh. start (8-15) */
-	regs[0x0f] = (enh_s & 0x70000) >> 16;	/* Enh. start (16-17/18??) */
-	regs[0x10] = (enh_e & 0x000ff);		/* Enh. end (0-7) */
-	regs[0x11] = (enh_e & 0x0ff00) >> 8;	/* Enh. end (8-15) */
-	regs[0x12] = (enh_e & 0x70000) >> 16;	/* Enh. end (16-17/18??) */
-
-	/* Misc */
-	regs[0x13] = 0x40;			/* VEE control (raw 4:2:2) */
-	regs[0x17] = 0x00;			/* ??? */
-	regs[0x18] = cam->i2c_state = 0x00;	/* Serial bus */
-	regs[0x19] = 0xff;			/* I/O port direction control */
-	regs[0x1a] = 0xff;			/* I/O port data register */
-	regs[0x1b] = 0x10;			/* ??? */
-
-	/* SAA7111 chip settings */
-	saa7111_regs[0x0a] = cam->brightness;
-	saa7111_regs[0x0b] = cam->contrast;
-	saa7111_regs[0x0c] = cam->color;
-	saa7111_regs[0x0d] = cam->hue;
-
-	/* Reset (ECP-fifo & serial-bus) */
-	if (w9966_write_reg(cam, 0x00, 0x03) == -1)
-		return -1;
-
-	/* Write regs to w9966cf chip */
-	for (i = 0; i < 0x1c; i++)
-		if (w9966_write_reg(cam, i, regs[i]) == -1)
-			return -1;
-
-	/* Write regs to saa7111 chip */
-	for (i = 0; i < 0x20; i++)
-		if (w9966_write_reg_i2c(cam, i, saa7111_regs[i]) == -1)
-			return -1;
-
-	return 0;
-}
-
-/*
- *	Video4linux interfacing
- */
-
-static int cam_querycap(struct file *file, void  *priv,
-					struct v4l2_capability *vcap)
-{
-	struct w9966 *cam = video_drvdata(file);
-
-	strlcpy(vcap->driver, cam->v4l2_dev.name, sizeof(vcap->driver));
-	strlcpy(vcap->card, W9966_DRIVERNAME, sizeof(vcap->card));
-	strlcpy(vcap->bus_info, "parport", sizeof(vcap->bus_info));
-	vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
-	vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS;
-	return 0;
-}
-
-static int cam_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
-{
-	if (vin->index > 0)
-		return -EINVAL;
-	strlcpy(vin->name, "Camera", sizeof(vin->name));
-	vin->type = V4L2_INPUT_TYPE_CAMERA;
-	vin->audioset = 0;
-	vin->tuner = 0;
-	vin->std = 0;
-	vin->status = 0;
-	return 0;
-}
-
-static int cam_g_input(struct file *file, void *fh, unsigned int *inp)
-{
-	*inp = 0;
-	return 0;
-}
-
-static int cam_s_input(struct file *file, void *fh, unsigned int inp)
-{
-	return (inp > 0) ? -EINVAL : 0;
-}
-
-static int cam_s_ctrl(struct v4l2_ctrl *ctrl)
-{
-	struct w9966 *cam =
-		container_of(ctrl->handler, struct w9966, hdl);
-	int ret = 0;
-
-	mutex_lock(&cam->lock);
-	switch (ctrl->id) {
-	case V4L2_CID_BRIGHTNESS:
-		cam->brightness = ctrl->val;
-		break;
-	case V4L2_CID_CONTRAST:
-		cam->contrast = ctrl->val;
-		break;
-	case V4L2_CID_SATURATION:
-		cam->color = ctrl->val;
-		break;
-	case V4L2_CID_HUE:
-		cam->hue = ctrl->val;
-		break;
-	default:
-		ret = -EINVAL;
-		break;
-	}
-
-	if (ret == 0) {
-		w9966_pdev_claim(cam);
-
-		if (w9966_write_reg_i2c(cam, 0x0a, cam->brightness) == -1 ||
-		    w9966_write_reg_i2c(cam, 0x0b, cam->contrast) == -1 ||
-		    w9966_write_reg_i2c(cam, 0x0c, cam->color) == -1 ||
-		    w9966_write_reg_i2c(cam, 0x0d, cam->hue) == -1) {
-			ret = -EIO;
-		}
-
-		w9966_pdev_release(cam);
-	}
-	mutex_unlock(&cam->lock);
-	return ret;
-}
-
-static int cam_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct w9966 *cam = video_drvdata(file);
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-
-	pix->width = cam->width;
-	pix->height = cam->height;
-	pix->pixelformat = V4L2_PIX_FMT_YUYV;
-	pix->field = V4L2_FIELD_NONE;
-	pix->bytesperline = 2 * cam->width;
-	pix->sizeimage = 2 * cam->width * cam->height;
-	/* Just a guess */
-	pix->colorspace = V4L2_COLORSPACE_SMPTE170M;
-	return 0;
-}
-
-static int cam_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-
-	if (pix->width < 2)
-		pix->width = 2;
-	if (pix->height < 1)
-		pix->height = 1;
-	if (pix->width > W9966_WND_MAX_W)
-		pix->width = W9966_WND_MAX_W;
-	if (pix->height > W9966_WND_MAX_H)
-		pix->height = W9966_WND_MAX_H;
-	pix->pixelformat = V4L2_PIX_FMT_YUYV;
-	pix->field = V4L2_FIELD_NONE;
-	pix->bytesperline = 2 * pix->width;
-	pix->sizeimage = 2 * pix->width * pix->height;
-	/* Just a guess */
-	pix->colorspace = V4L2_COLORSPACE_SMPTE170M;
-	return 0;
-}
-
-static int cam_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt)
-{
-	struct w9966 *cam = video_drvdata(file);
-	struct v4l2_pix_format *pix = &fmt->fmt.pix;
-	int ret = cam_try_fmt_vid_cap(file, fh, fmt);
-
-	if (ret)
-		return ret;
-
-	mutex_lock(&cam->lock);
-	/* Update camera regs */
-	w9966_pdev_claim(cam);
-	ret = w9966_setup(cam, 0, 0, 1023, 1023, pix->width, pix->height);
-	w9966_pdev_release(cam);
-	mutex_unlock(&cam->lock);
-	return ret;
-}
-
-static int cam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt)
-{
-	static struct v4l2_fmtdesc formats[] = {
-		{ 0, 0, 0,
-		  "YUV 4:2:2", V4L2_PIX_FMT_YUYV,
-		  { 0, 0, 0, 0 }
-		},
-	};
-	enum v4l2_buf_type type = fmt->type;
-
-	if (fmt->index > 0)
-		return -EINVAL;
-
-	*fmt = formats[fmt->index];
-	fmt->type = type;
-	return 0;
-}
-
-/* Capture data */
-static ssize_t w9966_v4l_read(struct file *file, char  __user *buf,
-		size_t count, loff_t *ppos)
-{
-	struct w9966 *cam = video_drvdata(file);
-	unsigned char addr = 0xa0;	/* ECP, read, CCD-transfer, 00000 */
-	unsigned char __user *dest = (unsigned char __user *)buf;
-	unsigned long dleft = count;
-	unsigned char *tbuf;
-
-	/* Why would anyone want more than this?? */
-	if (count > cam->width * cam->height * 2)
-		return -EINVAL;
-
-	mutex_lock(&cam->lock);
-	w9966_pdev_claim(cam);
-	w9966_write_reg(cam, 0x00, 0x02);	/* Reset ECP-FIFO buffer */
-	w9966_write_reg(cam, 0x00, 0x00);	/* Return to normal operation */
-	w9966_write_reg(cam, 0x01, 0x98);	/* Enable capture */
-
-	/* write special capture-addr and negotiate into data transfer */
-	if ((parport_negotiate(cam->pport, cam->ppmode|IEEE1284_ADDR) != 0) ||
-			(parport_write(cam->pport, &addr, 1) != 1) ||
-			(parport_negotiate(cam->pport, cam->ppmode|IEEE1284_DATA) != 0)) {
-		w9966_pdev_release(cam);
-		mutex_unlock(&cam->lock);
-		return -EFAULT;
-	}
-
-	tbuf = kmalloc(W9966_RBUFFER, GFP_KERNEL);
-	if (tbuf == NULL) {
-		count = -ENOMEM;
-		goto out;
-	}
-
-	while (dleft > 0) {
-		unsigned long tsize = (dleft > W9966_RBUFFER) ? W9966_RBUFFER : dleft;
-
-		if (parport_read(cam->pport, tbuf, tsize) < tsize) {
-			count = -EFAULT;
-			goto out;
-		}
-		if (copy_to_user(dest, tbuf, tsize) != 0) {
-			count = -EFAULT;
-			goto out;
-		}
-		dest += tsize;
-		dleft -= tsize;
-	}
-
-	w9966_write_reg(cam, 0x01, 0x18);	/* Disable capture */
-
-out:
-	kfree(tbuf);
-	w9966_pdev_release(cam);
-	mutex_unlock(&cam->lock);
-
-	return count;
-}
-
-static const struct v4l2_file_operations w9966_fops = {
-	.owner		= THIS_MODULE,
-	.open		= v4l2_fh_open,
-	.release	= v4l2_fh_release,
-	.poll		= v4l2_ctrl_poll,
-	.unlocked_ioctl = video_ioctl2,
-	.read           = w9966_v4l_read,
-};
-
-static const struct v4l2_ioctl_ops w9966_ioctl_ops = {
-	.vidioc_querycap    		    = cam_querycap,
-	.vidioc_g_input      		    = cam_g_input,
-	.vidioc_s_input      		    = cam_s_input,
-	.vidioc_enum_input   		    = cam_enum_input,
-	.vidioc_enum_fmt_vid_cap 	    = cam_enum_fmt_vid_cap,
-	.vidioc_g_fmt_vid_cap 		    = cam_g_fmt_vid_cap,
-	.vidioc_s_fmt_vid_cap  		    = cam_s_fmt_vid_cap,
-	.vidioc_try_fmt_vid_cap  	    = cam_try_fmt_vid_cap,
-	.vidioc_log_status		    = v4l2_ctrl_log_status,
-	.vidioc_subscribe_event		    = v4l2_ctrl_subscribe_event,
-	.vidioc_unsubscribe_event	    = v4l2_event_unsubscribe,
-};
-
-static const struct v4l2_ctrl_ops cam_ctrl_ops = {
-	.s_ctrl = cam_s_ctrl,
-};
-
-
-/* Initialize camera device. Setup all internal flags, set a
-   default video mode, setup ccd-chip, register v4l device etc..
-   Also used for 'probing' of hardware.
-   -1 on error */
-static int w9966_init(struct w9966 *cam, struct parport *port)
-{
-	struct v4l2_device *v4l2_dev = &cam->v4l2_dev;
-
-	if (cam->dev_state != 0)
-		return -1;
-
-	strlcpy(v4l2_dev->name, "w9966", sizeof(v4l2_dev->name));
-
-	if (v4l2_device_register(NULL, v4l2_dev) < 0) {
-		v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
-		return -1;
-	}
-
-	v4l2_ctrl_handler_init(&cam->hdl, 4);
-	v4l2_ctrl_new_std(&cam->hdl, &cam_ctrl_ops,
-			  V4L2_CID_BRIGHTNESS, 0, 255, 1, 128);
-	v4l2_ctrl_new_std(&cam->hdl, &cam_ctrl_ops,
-			  V4L2_CID_CONTRAST, -64, 64, 1, 64);
-	v4l2_ctrl_new_std(&cam->hdl, &cam_ctrl_ops,
-			  V4L2_CID_SATURATION, -64, 64, 1, 64);
-	v4l2_ctrl_new_std(&cam->hdl, &cam_ctrl_ops,
-			  V4L2_CID_HUE, -128, 127, 1, 0);
-	if (cam->hdl.error) {
-		v4l2_err(v4l2_dev, "couldn't register controls\n");
-		return -1;
-	}
-	cam->pport = port;
-	cam->brightness = 128;
-	cam->contrast = 64;
-	cam->color = 64;
-	cam->hue = 0;
-
-	/* Select requested transfer mode */
-	switch (parmode) {
-	default:	/* Auto-detect (priority: hw-ecp, hw-epp, sw-ecp) */
-	case 0:
-		if (port->modes & PARPORT_MODE_ECP)
-			cam->ppmode = IEEE1284_MODE_ECP;
-		else if (port->modes & PARPORT_MODE_EPP)
-			cam->ppmode = IEEE1284_MODE_EPP;
-		else
-			cam->ppmode = IEEE1284_MODE_ECP;
-		break;
-	case 1:		/* hw- or sw-ecp */
-		cam->ppmode = IEEE1284_MODE_ECP;
-		break;
-	case 2:		/* hw- or sw-epp */
-		cam->ppmode = IEEE1284_MODE_EPP;
-		break;
-	}
-
-	/* Tell the parport driver that we exists */
-	cam->pdev = parport_register_device(port, "w9966", NULL, NULL, NULL, 0, NULL);
-	if (cam->pdev == NULL) {
-		DPRINTF("parport_register_device() failed\n");
-		return -1;
-	}
-	w9966_set_state(cam, W9966_STATE_PDEV, W9966_STATE_PDEV);
-
-	w9966_pdev_claim(cam);
-
-	/* Setup a default capture mode */
-	if (w9966_setup(cam, 0, 0, 1023, 1023, 200, 160) != 0) {
-		DPRINTF("w9966_setup() failed.\n");
-		return -1;
-	}
-
-	w9966_pdev_release(cam);
-
-	/* Fill in the video_device struct and register us to v4l */
-	strlcpy(cam->vdev.name, W9966_DRIVERNAME, sizeof(cam->vdev.name));
-	cam->vdev.v4l2_dev = v4l2_dev;
-	cam->vdev.fops = &w9966_fops;
-	cam->vdev.ioctl_ops = &w9966_ioctl_ops;
-	cam->vdev.release = video_device_release_empty;
-	cam->vdev.ctrl_handler = &cam->hdl;
-	set_bit(V4L2_FL_USE_FH_PRIO, &cam->vdev.flags);
-	video_set_drvdata(&cam->vdev, cam);
-
-	mutex_init(&cam->lock);
-
-	if (video_register_device(&cam->vdev, VFL_TYPE_GRABBER, video_nr) < 0)
-		return -1;
-
-	w9966_set_state(cam, W9966_STATE_VDEV, W9966_STATE_VDEV);
-
-	/* All ok */
-	v4l2_info(v4l2_dev, "Found and initialized a webcam on %s.\n",
-			cam->pport->name);
-	return 0;
-}
-
-
-/* Terminate everything gracefully */
-static void w9966_term(struct w9966 *cam)
-{
-	/* Unregister from v4l */
-	if (w9966_get_state(cam, W9966_STATE_VDEV, W9966_STATE_VDEV)) {
-		video_unregister_device(&cam->vdev);
-		w9966_set_state(cam, W9966_STATE_VDEV, 0);
-	}
-
-	v4l2_ctrl_handler_free(&cam->hdl);
-
-	/* Terminate from IEEE1284 mode and release pdev block */
-	if (w9966_get_state(cam, W9966_STATE_PDEV, W9966_STATE_PDEV)) {
-		w9966_pdev_claim(cam);
-		parport_negotiate(cam->pport, IEEE1284_MODE_COMPAT);
-		w9966_pdev_release(cam);
-	}
-
-	/* Unregister from parport */
-	if (w9966_get_state(cam, W9966_STATE_PDEV, W9966_STATE_PDEV)) {
-		parport_unregister_device(cam->pdev);
-		w9966_set_state(cam, W9966_STATE_PDEV, 0);
-	}
-	memset(cam, 0, sizeof(*cam));
-}
-
-
-/* Called once for every parport on init */
-static void w9966_attach(struct parport *port)
-{
-	int i;
-
-	for (i = 0; i < W9966_MAXCAMS; i++) {
-		if (w9966_cams[i].dev_state != 0)	/* Cam is already assigned */
-			continue;
-		if (strcmp(pardev[i], "aggressive") == 0 || strcmp(pardev[i], port->name) == 0) {
-			if (w9966_init(&w9966_cams[i], port) != 0)
-				w9966_term(&w9966_cams[i]);
-			break;	/* return */
-		}
-	}
-}
-
-/* Called once for every parport on termination */
-static void w9966_detach(struct parport *port)
-{
-	int i;
-
-	for (i = 0; i < W9966_MAXCAMS; i++)
-		if (w9966_cams[i].dev_state != 0 && w9966_cams[i].pport == port)
-			w9966_term(&w9966_cams[i]);
-}
-
-
-static struct parport_driver w9966_ppd = {
-	.name = W9966_DRIVERNAME,
-	.attach = w9966_attach,
-	.detach = w9966_detach,
-};
-
-/* Module entry point */
-static int __init w9966_mod_init(void)
-{
-	int i;
-
-	for (i = 0; i < W9966_MAXCAMS; i++)
-		w9966_cams[i].dev_state = 0;
-
-	return parport_register_driver(&w9966_ppd);
-}
-
-/* Module cleanup */
-static void __exit w9966_mod_term(void)
-{
-	parport_unregister_driver(&w9966_ppd);
-}
-
-module_init(w9966_mod_init);
-module_exit(w9966_mod_term);
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver
  2012-08-14 20:55 [PATCH 00/12] media tree reorganization part 2 (second version) Mauro Carvalho Chehab
                   ` (2 preceding siblings ...)
  2012-08-14 20:55 ` [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/ Mauro Carvalho Chehab
@ 2012-08-14 20:55 ` Mauro Carvalho Chehab
  2012-08-14 20:55 ` [PATCH 09/12] [media] reorganize the API core items Mauro Carvalho Chehab
  2012-08-14 21:17 ` [PATCH 00/12] media tree reorganization part 2 (second version) Sylwester Nawrocki
  5 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-14 20:55 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/mmc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/mmc/Kconfig b/drivers/media/mmc/Kconfig
index 0f2a957..8c30ada 100644
--- a/drivers/media/mmc/Kconfig
+++ b/drivers/media/mmc/Kconfig
@@ -1 +1,2 @@
+comment "Supported MMC/SDIO adapters"
 source "drivers/media/mmc/siano/Kconfig"
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 09/12] [media] reorganize the API core items
  2012-08-14 20:55 [PATCH 00/12] media tree reorganization part 2 (second version) Mauro Carvalho Chehab
                   ` (3 preceding siblings ...)
  2012-08-14 20:55 ` [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver Mauro Carvalho Chehab
@ 2012-08-14 20:55 ` Mauro Carvalho Chehab
  2012-08-14 21:17 ` [PATCH 00/12] media tree reorganization part 2 (second version) Sylwester Nawrocki
  5 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-14 20:55 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Reorganize the API core changes for them to appear closer to
the items that enable them, and not at the drivers part of
the menu.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/Kconfig           |  6 ++++--
 drivers/media/v4l2-core/Kconfig | 32 ++++++++++++++++++++++++--------
 drivers/media/video/Kconfig     | 17 -----------------
 3 files changed, 28 insertions(+), 27 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index c6d8658..c9cdc61 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -113,6 +113,8 @@ config VIDEO_V4L2_SUBDEV_API
 
 	  This API is mostly used by camera interfaces in embedded platforms.
 
+source "drivers/media/v4l2-core/Kconfig"
+
 #
 # DVB Core
 #	Only enables if one of DTV is selected
@@ -138,6 +140,8 @@ config DVB_NET
 	  You may want to disable the network support on embedded devices. If
 	  unsure say Y.
 
+source "drivers/media/dvb-core/Kconfig"
+
 comment "Media drivers"
 source "drivers/media/rc/Kconfig"
 
@@ -151,7 +155,6 @@ source "drivers/media/tuners/Kconfig"
 # Video/Radio/Hybrid adapters
 #
 
-source "drivers/media/v4l2-core/Kconfig"
 source "drivers/media/video/Kconfig"
 
 source "drivers/media/radio/Kconfig"
@@ -160,7 +163,6 @@ source "drivers/media/radio/Kconfig"
 # DVB adapters
 #
 
-source "drivers/media/dvb-core/Kconfig"
 source "drivers/media/pci/Kconfig"
 source "drivers/media/usb/Kconfig"
 source "drivers/media/mmc/Kconfig"
diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
index 6f53337..05e530c 100644
--- a/drivers/media/v4l2-core/Kconfig
+++ b/drivers/media/v4l2-core/Kconfig
@@ -2,27 +2,44 @@
 # Generic video config states
 #
 
+config VIDEO_ADV_DEBUG
+	bool "Enable advanced debug functionality on V4L2 drivers"
+	default n
+	---help---
+	  Say Y here to enable advanced debugging functionality on some
+	  V4L devices.
+	  In doubt, say N.
+
+config VIDEO_FIXED_MINOR_RANGES
+	bool "Enable old-style fixed minor ranges on drivers/video devices"
+	default n
+	---help---
+	  Say Y here to enable the old-style fixed-range minor assignments.
+	  Only useful if you rely on the old behavior and use mknod instead of udev.
+
+	  When in doubt, say N.
+
 config VIDEO_V4L2
 	tristate
-	depends on VIDEO_DEV && VIDEO_V4L2_COMMON
+	depends on VIDEO_V4L2_COMMON
 	default y
 
 config VIDEOBUF_GEN
 	tristate
 
 config VIDEOBUF_DMA_SG
+	tristate
 	depends on HAS_DMA
 	select VIDEOBUF_GEN
-	tristate
 
 config VIDEOBUF_VMALLOC
-	select VIDEOBUF_GEN
 	tristate
+	select VIDEOBUF_GEN
 
 config VIDEOBUF_DMA_CONTIG
+	tristate
 	depends on HAS_DMA
 	select VIDEOBUF_GEN
-	tristate
 
 config VIDEOBUF_DVB
 	tristate
@@ -43,18 +60,17 @@ config VIDEOBUF2_MEMOPS
 	tristate
 
 config VIDEOBUF2_DMA_CONTIG
+	tristate
 	select VIDEOBUF2_CORE
 	select VIDEOBUF2_MEMOPS
-	tristate
 
 config VIDEOBUF2_VMALLOC
+	tristate
 	select VIDEOBUF2_CORE
 	select VIDEOBUF2_MEMOPS
-	tristate
 
 config VIDEOBUF2_DMA_SG
+	tristate
 	#depends on HAS_DMA
 	select VIDEOBUF2_CORE
 	select VIDEOBUF2_MEMOPS
-	tristate
-
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index f9703a0..a7bd9576c 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -26,23 +26,6 @@ menuconfig VIDEO_CAPTURE_DRIVERS
 
 if VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2
 
-config VIDEO_ADV_DEBUG
-	bool "Enable advanced debug functionality"
-	default n
-	---help---
-	  Say Y here to enable advanced debugging functionality on some
-	  V4L devices.
-	  In doubt, say N.
-
-config VIDEO_FIXED_MINOR_RANGES
-	bool "Enable old-style fixed minor ranges for video devices"
-	default n
-	---help---
-	  Say Y here to enable the old-style fixed-range minor assignments.
-	  Only useful if you rely on the old behavior and use mknod instead of udev.
-
-	  When in doubt, say N.
-
 config VIDEO_HELPER_CHIPS_AUTO
 	bool "Autoselect pertinent encoders/decoders and other helper chips"
 	default y if !EXPERT
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 00/12] media tree reorganization part 2 (second version)
  2012-08-14 20:55 [PATCH 00/12] media tree reorganization part 2 (second version) Mauro Carvalho Chehab
                   ` (4 preceding siblings ...)
  2012-08-14 20:55 ` [PATCH 09/12] [media] reorganize the API core items Mauro Carvalho Chehab
@ 2012-08-14 21:17 ` Sylwester Nawrocki
  2012-08-15 13:48   ` Mauro Carvalho Chehab
  5 siblings, 1 reply; 24+ messages in thread
From: Sylwester Nawrocki @ 2012-08-14 21:17 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On 08/14/2012 10:55 PM, Mauro Carvalho Chehab wrote:
> Ok, it is now everything almost done... there are of course
> cleanups that may happen, and there are still some things
> to do at drivers/media/platform, but most of the things are
> there.
>
> If there isn't any big problem, I'll be merging them tomorrow.

Briefly looking didn't spot any issues. However it could be a bit easier
to review if patches were created with -M option to git-format patch,
for example patch 05/12 looks much smaller then:

8<---------------------------------------------------------------------

 From 83d249058179c26af9b34ecf077d133fb5696153 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Tue, 14 Aug 2012 12:53:09 -0300
Subject: [PATCH 05/12] [media] move analog PCI saa7146 drivers to its 
own dir

Instead of having them under drivers/media/video, move them
to their own directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
  drivers/media/pci/Kconfig                          |    2 +
  drivers/media/pci/Makefile                         |    3 +-
  drivers/media/pci/saa7146/Kconfig                  |   38 
++++++++++++++++++++
  drivers/media/pci/saa7146/Makefile                 |    5 +++
  .../media/{video => pci/saa7146}/hexium_gemini.c   |    0
  .../media/{video => pci/saa7146}/hexium_orion.c    |    0
  drivers/media/{video => pci/saa7146}/mxb.c         |    0
  drivers/media/video/Kconfig                        |   38 
--------------------
  drivers/media/video/Makefile                       |    3 --
  9 files changed, 47 insertions(+), 42 deletions(-)
  create mode 100644 drivers/media/pci/saa7146/Kconfig
  create mode 100644 drivers/media/pci/saa7146/Makefile
  rename drivers/media/{video => pci/saa7146}/hexium_gemini.c (100%)
  rename drivers/media/{video => pci/saa7146}/hexium_orion.c (100%)
  rename drivers/media/{video => pci/saa7146}/mxb.c (100%)

diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index b69cb12..e1a9e1a 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -9,6 +9,7 @@ if MEDIA_ANALOG_TV_SUPPORT
  	comment "Media capture/analog TV support"
  source "drivers/media/pci/ivtv/Kconfig"
  source "drivers/media/pci/zoran/Kconfig"
+source "drivers/media/pci/saa7146/Kconfig"
  endif

  if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
@@ -20,6 +21,7 @@ source "drivers/media/pci/cx88/Kconfig"
  source "drivers/media/pci/bt8xx/Kconfig"
  source "drivers/media/pci/saa7134/Kconfig"
  source "drivers/media/pci/saa7164/Kconfig"
+
  endif

  if MEDIA_DIGITAL_TV_SUPPORT
diff --git a/drivers/media/pci/Makefile b/drivers/media/pci/Makefile
index d47c222..bb71e30 100644
--- a/drivers/media/pci/Makefile
+++ b/drivers/media/pci/Makefile
@@ -10,7 +10,8 @@ obj-y        :=	ttpci/		\
  		mantis/		\
  		ngene/		\
  		ddbridge/	\
-		b2c2/
+		b2c2/		\
+		saa7146/

  obj-$(CONFIG_VIDEO_IVTV) += ivtv/
  obj-$(CONFIG_VIDEO_ZORAN) += zoran/
diff --git a/drivers/media/pci/saa7146/Kconfig 
b/drivers/media/pci/saa7146/Kconfig
new file mode 100644
index 0000000..8923b76
--- /dev/null
+++ b/drivers/media/pci/saa7146/Kconfig
@@ -0,0 +1,38 @@
+config VIDEO_HEXIUM_GEMINI
+	tristate "Hexium Gemini frame grabber"
+	depends on PCI && VIDEO_V4L2 && I2C
+	select VIDEO_SAA7146_VV
+	---help---
+	  This is a video4linux driver for the Hexium Gemini frame
+	  grabber card by Hexium. Please note that the Gemini Dual
+	  card is *not* fully supported.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called hexium_gemini.
+
+config VIDEO_HEXIUM_ORION
+	tristate "Hexium HV-PCI6 and Orion frame grabber"
+	depends on PCI && VIDEO_V4L2 && I2C
+	select VIDEO_SAA7146_VV
+	---help---
+	  This is a video4linux driver for the Hexium HV-PCI6 and
+	  Orion frame grabber cards by Hexium.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called hexium_orion.
+
+config VIDEO_MXB
+	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
+	depends on PCI && VIDEO_V4L2 && I2C
+	select VIDEO_SAA7146_VV
+	select VIDEO_TUNER
+	select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TDA9840 if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TEA6415C if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TEA6420 if VIDEO_HELPER_CHIPS_AUTO
+	---help---
+	  This is a video4linux driver for the 'Multimedia eXtension Board'
+	  TV card by Siemens-Nixdorf.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called mxb.
diff --git a/drivers/media/pci/saa7146/Makefile 
b/drivers/media/pci/saa7146/Makefile
new file mode 100644
index 0000000..362a38b
--- /dev/null
+++ b/drivers/media/pci/saa7146/Makefile
@@ -0,0 +1,5 @@
+obj-$(CONFIG_VIDEO_MXB) += mxb.o
+obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
+obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
+
+ccflags-y += -I$(srctree)/drivers/media/video
diff --git a/drivers/media/video/hexium_gemini.c 
b/drivers/media/pci/saa7146/hexium_gemini.c
similarity index 100%
rename from drivers/media/video/hexium_gemini.c
rename to drivers/media/pci/saa7146/hexium_gemini.c
diff --git a/drivers/media/video/hexium_orion.c 
b/drivers/media/pci/saa7146/hexium_orion.c
similarity index 100%
rename from drivers/media/video/hexium_orion.c
rename to drivers/media/pci/saa7146/hexium_orion.c
diff --git a/drivers/media/video/mxb.c b/drivers/media/pci/saa7146/mxb.c
similarity index 100%
rename from drivers/media/video/mxb.c
rename to drivers/media/pci/saa7146/mxb.c
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index a837194..4d79dfd 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -619,29 +619,6 @@ menuconfig V4L_PCI_DRIVERS

  if V4L_PCI_DRIVERS

-config VIDEO_HEXIUM_GEMINI
-	tristate "Hexium Gemini frame grabber"
-	depends on PCI && VIDEO_V4L2 && I2C
-	---help---
-	  This is a video4linux driver for the Hexium Gemini frame
-	  grabber card by Hexium. Please note that the Gemini Dual
-	  card is *not* fully supported.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called hexium_gemini.
-
-config VIDEO_HEXIUM_ORION
-	tristate "Hexium HV-PCI6 and Orion frame grabber"
-	depends on PCI && VIDEO_V4L2 && I2C
-	select VIDEO_SAA7146_VV
-	---help---
-	  This is a video4linux driver for the Hexium HV-PCI6 and
-	  Orion frame grabber cards by Hexium.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called hexium_orion.
-
  config VIDEO_MEYE
  	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
  	depends on PCI && SONY_LAPTOP && VIDEO_V4L2
@@ -656,21 +633,6 @@ config VIDEO_MEYE
  	  To compile this driver as a module, choose M here: the
  	  module will be called meye.

-config VIDEO_MXB
-	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
-	depends on PCI && VIDEO_V4L2 && I2C
-	select VIDEO_SAA7146_VV
-	select VIDEO_TUNER
-	select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TDA9840 if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TEA6415C if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TEA6420 if VIDEO_HELPER_CHIPS_AUTO
-	---help---
-	  This is a video4linux driver for the 'Multimedia eXtension Board'
-	  TV card by Siemens-Nixdorf.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called mxb.


  config STA2X11_VIP
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 322a159..8df694d 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -93,9 +93,6 @@ obj-$(CONFIG_VIDEO_W9966) += w9966.o
  obj-$(CONFIG_VIDEO_PMS) += pms.o
  obj-$(CONFIG_VIDEO_VINO) += vino.o
  obj-$(CONFIG_VIDEO_MEYE) += meye.o
-obj-$(CONFIG_VIDEO_MXB) += mxb.o
-obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
-obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
  obj-$(CONFIG_STA2X11_VIP) += sta2x11_vip.o
  obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o

-- 
1.7.4.1
8<---------------------------------------------------------------------

I think that might be more a hint for the future though. :)

--

Regards,
Sylwester

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 00/12] media tree reorganization part 2 (second version)
  2012-08-14 21:17 ` [PATCH 00/12] media tree reorganization part 2 (second version) Sylwester Nawrocki
@ 2012-08-15 13:48   ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 01/12] [media] rename most media/video usb drivers to media/usb Mauro Carvalho Chehab
                       ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List


Em 14-08-2012 18:17, Sylwester Nawrocki escreveu:> On 08/14/2012 10:55 PM, Mauro Carvalho Chehab wrote:
>> Ok, it is now everything almost done... there are of course
>> cleanups that may happen, and there are still some things
>> to do at drivers/media/platform, but most of the things are
>> there.
>>
>> If there isn't any big problem, I'll be merging them tomorrow.
> 
> Briefly looking didn't spot any issues. However it could be a bit easier
> to review if patches were created with -M option to git-format patch,
> for example patch 05/12 looks much smaller then

Sorry, forgot the "-M" this time. Resending the series with
the merge detection enabled.

Mauro Carvalho Chehab (12):
  [media] rename most media/video usb drivers to media/usb
  [media] move the remaining USB drivers to drivers/media/usb
  [media] bt8xx: move analog TV part to be together with DTV one
  [media] rename most media/video pci drivers to media/pci
  [media] move analog PCI saa7146 drivers to its own dir
  [media] move the remaining PCI devices to drivers/media/pci
  [media] move parallel port/isa video drivers to
    drivers/media/parport/
  [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver
  [media] reorganize the API core items
  [media] move i2c files into drivers/media/i2c
  [media] move soc_camera i2c drivers into its own dir
  [media] rename drivers/media/video to platform

 MAINTAINERS                                        |   24 +-
 drivers/media/Kconfig                              |   18 +-
 drivers/media/Makefile                             |    8 +-
 drivers/media/i2c/Kconfig                          |  570 +++++++++
 drivers/media/i2c/Makefile                         |   64 +
 drivers/media/{video => i2c}/adp1653.c             |    2 +-
 drivers/media/{video => i2c}/adv7170.c             |    0
 drivers/media/{video => i2c}/adv7175.c             |    0
 drivers/media/{video => i2c}/adv7180.c             |    0
 drivers/media/{video => i2c}/adv7183.c             |    0
 drivers/media/{video => i2c}/adv7183_regs.h        |    0
 drivers/media/{video => i2c}/adv7343.c             |    0
 drivers/media/{video => i2c}/adv7343_regs.h        |    0
 drivers/media/{video => i2c}/adv7393.c             |    0
 drivers/media/{video => i2c}/adv7393_regs.h        |    0
 drivers/media/{video => i2c}/ak881x.c              |    0
 drivers/media/{video => i2c}/aptina-pll.c          |    0
 drivers/media/{video => i2c}/aptina-pll.h          |    0
 drivers/media/{video => i2c}/as3645a.c             |    2 +-
 drivers/media/{video => i2c}/bt819.c               |    0
 drivers/media/{video => i2c}/bt856.c               |    0
 drivers/media/{video => i2c}/bt866.c               |    0
 drivers/media/{video => i2c}/btcx-risc.c           |    0
 drivers/media/{video => i2c}/btcx-risc.h           |    0
 drivers/media/{video => i2c}/cs5345.c              |    0
 drivers/media/{video => i2c}/cs53l32a.c            |    0
 drivers/media/{video => i2c}/cx2341x.c             |    0
 drivers/media/{video => i2c}/cx25840/Kconfig       |    0
 drivers/media/{video => i2c}/cx25840/Makefile      |    2 +-
 .../media/{video => i2c}/cx25840/cx25840-audio.c   |    0
 .../media/{video => i2c}/cx25840/cx25840-core.c    |    0
 .../media/{video => i2c}/cx25840/cx25840-core.h    |    0
 .../{video => i2c}/cx25840/cx25840-firmware.c      |    0
 drivers/media/{video => i2c}/cx25840/cx25840-ir.c  |    0
 drivers/media/{video => i2c}/cx25840/cx25840-vbi.c |    0
 drivers/media/{video => i2c}/ir-kbd-i2c.c          |    0
 drivers/media/{video => i2c}/ks0127.c              |    0
 drivers/media/{video => i2c}/ks0127.h              |    0
 drivers/media/{video => i2c}/m52790.c              |    0
 drivers/media/{video => i2c}/m5mols/Kconfig        |    0
 drivers/media/{video => i2c}/m5mols/Makefile       |    0
 drivers/media/{video => i2c}/m5mols/m5mols.h       |    0
 .../media/{video => i2c}/m5mols/m5mols_capture.c   |    0
 .../media/{video => i2c}/m5mols/m5mols_controls.c  |    0
 drivers/media/{video => i2c}/m5mols/m5mols_core.c  |    0
 drivers/media/{video => i2c}/m5mols/m5mols_reg.h   |    0
 drivers/media/{video => i2c}/msp3400-driver.c      |    0
 drivers/media/{video => i2c}/msp3400-driver.h      |    0
 drivers/media/{video => i2c}/msp3400-kthreads.c    |    0
 drivers/media/{video => i2c}/mt9m032.c             |    0
 drivers/media/{video => i2c}/mt9p031.c             |    0
 drivers/media/{video => i2c}/mt9t001.c             |    0
 drivers/media/{video => i2c}/mt9v011.c             |    0
 drivers/media/{video => i2c}/mt9v032.c             |    0
 drivers/media/{video => i2c}/noon010pc30.c         |    0
 drivers/media/{video => i2c}/ov7670.c              |    0
 drivers/media/{video => i2c}/s5k6aa.c              |    0
 drivers/media/{video => i2c}/saa6588.c             |    0
 drivers/media/{video => i2c}/saa7110.c             |    0
 drivers/media/{video => i2c}/saa7115.c             |    0
 drivers/media/{video => i2c}/saa711x_regs.h        |    0
 drivers/media/{video => i2c}/saa7127.c             |    0
 drivers/media/{video => i2c}/saa717x.c             |    0
 drivers/media/{video => i2c}/saa7185.c             |    0
 drivers/media/{video => i2c}/saa7191.c             |    0
 drivers/media/{video => i2c}/saa7191.h             |    0
 drivers/media/{video => i2c}/smiapp-pll.c          |    2 +-
 drivers/media/{video => i2c}/smiapp-pll.h          |    2 +-
 drivers/media/{video => i2c}/smiapp/Kconfig        |    0
 drivers/media/{video => i2c}/smiapp/Makefile       |    2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-core.c  |    2 +-
 .../media/{video => i2c}/smiapp/smiapp-limits.c    |    2 +-
 .../media/{video => i2c}/smiapp/smiapp-limits.h    |    2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-quirk.c |    2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-quirk.h |    2 +-
 .../media/{video => i2c}/smiapp/smiapp-reg-defs.h  |    2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-reg.h   |    2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-regs.c  |    2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-regs.h  |    0
 drivers/media/{video => i2c}/smiapp/smiapp.h       |    2 +-
 drivers/media/i2c/soc_camera/Kconfig               |   89 ++
 drivers/media/i2c/soc_camera/Makefile              |   14 +
 drivers/media/{video => i2c/soc_camera}/imx074.c   |    0
 drivers/media/{video => i2c/soc_camera}/mt9m001.c  |    0
 drivers/media/{video => i2c/soc_camera}/mt9m111.c  |    0
 drivers/media/{video => i2c/soc_camera}/mt9t031.c  |    0
 drivers/media/{video => i2c/soc_camera}/mt9t112.c  |    0
 drivers/media/{video => i2c/soc_camera}/mt9v022.c  |    0
 drivers/media/{video => i2c/soc_camera}/ov2640.c   |    0
 drivers/media/{video => i2c/soc_camera}/ov5642.c   |    0
 drivers/media/{video => i2c/soc_camera}/ov6650.c   |    0
 drivers/media/{video => i2c/soc_camera}/ov772x.c   |    0
 drivers/media/{video => i2c/soc_camera}/ov9640.c   |    0
 drivers/media/{video => i2c/soc_camera}/ov9640.h   |    0
 drivers/media/{video => i2c/soc_camera}/ov9740.c   |    0
 .../media/{video => i2c/soc_camera}/rj54n1cb0c.c   |    0
 .../{video => i2c/soc_camera}/sh_mobile_csi2.c     |    0
 drivers/media/{video => i2c/soc_camera}/tw9910.c   |    0
 drivers/media/{video => i2c}/sr030pc30.c           |    0
 drivers/media/{video => i2c}/tcm825x.c             |    2 +-
 drivers/media/{video => i2c}/tcm825x.h             |    2 +-
 drivers/media/{video => i2c}/tda7432.c             |    0
 drivers/media/{video => i2c}/tda9840.c             |    0
 drivers/media/{video => i2c}/tea6415c.c            |    0
 drivers/media/{video => i2c}/tea6415c.h            |    0
 drivers/media/{video => i2c}/tea6420.c             |    0
 drivers/media/{video => i2c}/tea6420.h             |    0
 drivers/media/{video => i2c}/ths7303.c             |    0
 drivers/media/{video => i2c}/tlv320aic23b.c        |    0
 drivers/media/{video => i2c}/tvaudio.c             |    0
 drivers/media/{video => i2c}/tveeprom.c            |    0
 drivers/media/{video => i2c}/tvp514x.c             |    2 +-
 drivers/media/{video => i2c}/tvp514x_regs.h        |    2 +-
 drivers/media/{video => i2c}/tvp5150.c             |    0
 drivers/media/{video => i2c}/tvp5150_reg.h         |    0
 drivers/media/{video => i2c}/tvp7002.c             |    0
 drivers/media/{video => i2c}/tvp7002_reg.h         |    0
 drivers/media/{video => i2c}/upd64031a.c           |    0
 drivers/media/{video => i2c}/upd64083.c            |    0
 drivers/media/{video => i2c}/vp27smpx.c            |    0
 drivers/media/{video => i2c}/vpx3220.c             |    0
 drivers/media/{video => i2c}/vs6624.c              |    0
 drivers/media/{video => i2c}/vs6624_regs.h         |    0
 drivers/media/{video => i2c}/wm8739.c              |    0
 drivers/media/{video => i2c}/wm8775.c              |    0
 drivers/media/mmc/Kconfig                          |    1 +
 drivers/media/parport/Kconfig                      |   47 +
 drivers/media/parport/Makefile                     |    4 +
 drivers/media/{video => parport}/bw-qcam.c         |    0
 drivers/media/{video => parport}/c-qcam.c          |    0
 drivers/media/{video => parport}/pms.c             |    0
 drivers/media/{video => parport}/w9966.c           |    0
 drivers/media/pci/Kconfig                          |   56 +-
 drivers/media/pci/Makefile                         |   16 +-
 drivers/media/pci/bt8xx/Kconfig                    |   23 +-
 drivers/media/pci/bt8xx/Makefile                   |    7 +-
 drivers/media/{video => pci}/bt8xx/bt848.h         |    0
 .../media/{video => pci}/bt8xx/bttv-audio-hook.c   |    0
 .../media/{video => pci}/bt8xx/bttv-audio-hook.h   |    0
 drivers/media/{video => pci}/bt8xx/bttv-cards.c    |    0
 drivers/media/{video => pci}/bt8xx/bttv-driver.c   |    0
 drivers/media/{video => pci}/bt8xx/bttv-gpio.c     |    0
 drivers/media/{video => pci}/bt8xx/bttv-i2c.c      |    0
 drivers/media/{video => pci}/bt8xx/bttv-if.c       |    0
 drivers/media/{video => pci}/bt8xx/bttv-input.c    |    0
 drivers/media/{video => pci}/bt8xx/bttv-risc.c     |    0
 drivers/media/{video => pci}/bt8xx/bttv-vbi.c      |    0
 drivers/media/{video => pci}/bt8xx/bttv.h          |    0
 drivers/media/{video => pci}/bt8xx/bttvp.h         |    0
 drivers/media/{video => pci}/cx18/Kconfig          |    0
 drivers/media/{video => pci}/cx18/Makefile         |    0
 drivers/media/{video => pci}/cx18/cx18-alsa-main.c |    0
 .../media/{video => pci}/cx18/cx18-alsa-mixer.c    |    0
 .../media/{video => pci}/cx18/cx18-alsa-mixer.h    |    0
 drivers/media/{video => pci}/cx18/cx18-alsa-pcm.c  |    0
 drivers/media/{video => pci}/cx18/cx18-alsa-pcm.h  |    0
 drivers/media/{video => pci}/cx18/cx18-alsa.h      |    0
 drivers/media/{video => pci}/cx18/cx18-audio.c     |    0
 drivers/media/{video => pci}/cx18/cx18-audio.h     |    0
 drivers/media/{video => pci}/cx18/cx18-av-audio.c  |    0
 drivers/media/{video => pci}/cx18/cx18-av-core.c   |    0
 drivers/media/{video => pci}/cx18/cx18-av-core.h   |    0
 .../media/{video => pci}/cx18/cx18-av-firmware.c   |    0
 drivers/media/{video => pci}/cx18/cx18-av-vbi.c    |    0
 drivers/media/{video => pci}/cx18/cx18-cards.c     |    0
 drivers/media/{video => pci}/cx18/cx18-cards.h     |    0
 drivers/media/{video => pci}/cx18/cx18-controls.c  |    0
 drivers/media/{video => pci}/cx18/cx18-controls.h  |    0
 drivers/media/{video => pci}/cx18/cx18-driver.c    |    0
 drivers/media/{video => pci}/cx18/cx18-driver.h    |    0
 drivers/media/{video => pci}/cx18/cx18-dvb.c       |    0
 drivers/media/{video => pci}/cx18/cx18-dvb.h       |    0
 drivers/media/{video => pci}/cx18/cx18-fileops.c   |    0
 drivers/media/{video => pci}/cx18/cx18-fileops.h   |    0
 drivers/media/{video => pci}/cx18/cx18-firmware.c  |    0
 drivers/media/{video => pci}/cx18/cx18-firmware.h  |    0
 drivers/media/{video => pci}/cx18/cx18-gpio.c      |    0
 drivers/media/{video => pci}/cx18/cx18-gpio.h      |    0
 drivers/media/{video => pci}/cx18/cx18-i2c.c       |    0
 drivers/media/{video => pci}/cx18/cx18-i2c.h       |    0
 drivers/media/{video => pci}/cx18/cx18-io.c        |    0
 drivers/media/{video => pci}/cx18/cx18-io.h        |    0
 drivers/media/{video => pci}/cx18/cx18-ioctl.c     |    0
 drivers/media/{video => pci}/cx18/cx18-ioctl.h     |    0
 drivers/media/{video => pci}/cx18/cx18-irq.c       |    0
 drivers/media/{video => pci}/cx18/cx18-irq.h       |    0
 drivers/media/{video => pci}/cx18/cx18-mailbox.c   |    0
 drivers/media/{video => pci}/cx18/cx18-mailbox.h   |    0
 drivers/media/{video => pci}/cx18/cx18-queue.c     |    0
 drivers/media/{video => pci}/cx18/cx18-queue.h     |    0
 drivers/media/{video => pci}/cx18/cx18-scb.c       |    0
 drivers/media/{video => pci}/cx18/cx18-scb.h       |    0
 drivers/media/{video => pci}/cx18/cx18-streams.c   |    0
 drivers/media/{video => pci}/cx18/cx18-streams.h   |    0
 drivers/media/{video => pci}/cx18/cx18-vbi.c       |    0
 drivers/media/{video => pci}/cx18/cx18-vbi.h       |    0
 drivers/media/{video => pci}/cx18/cx18-version.h   |    0
 drivers/media/{video => pci}/cx18/cx18-video.c     |    0
 drivers/media/{video => pci}/cx18/cx18-video.h     |    0
 drivers/media/{video => pci}/cx18/cx23418.h        |    0
 drivers/media/{video => pci}/cx23885/Kconfig       |    0
 drivers/media/{video => pci}/cx23885/Makefile      |    2 +-
 drivers/media/{video => pci}/cx23885/altera-ci.c   |    0
 drivers/media/{video => pci}/cx23885/altera-ci.h   |    0
 drivers/media/{video => pci}/cx23885/cimax2.c      |    0
 drivers/media/{video => pci}/cx23885/cimax2.h      |    0
 drivers/media/{video => pci}/cx23885/cx23885-417.c |    0
 .../media/{video => pci}/cx23885/cx23885-alsa.c    |    0
 drivers/media/{video => pci}/cx23885/cx23885-av.c  |    0
 drivers/media/{video => pci}/cx23885/cx23885-av.h  |    0
 .../media/{video => pci}/cx23885/cx23885-cards.c   |    0
 .../media/{video => pci}/cx23885/cx23885-core.c    |    0
 drivers/media/{video => pci}/cx23885/cx23885-dvb.c |    0
 .../media/{video => pci}/cx23885/cx23885-f300.c    |    0
 .../media/{video => pci}/cx23885/cx23885-f300.h    |    0
 drivers/media/{video => pci}/cx23885/cx23885-i2c.c |    0
 .../media/{video => pci}/cx23885/cx23885-input.c   |    0
 .../media/{video => pci}/cx23885/cx23885-input.h   |    0
 .../media/{video => pci}/cx23885/cx23885-ioctl.c   |    0
 .../media/{video => pci}/cx23885/cx23885-ioctl.h   |    0
 drivers/media/{video => pci}/cx23885/cx23885-ir.c  |    0
 drivers/media/{video => pci}/cx23885/cx23885-ir.h  |    0
 drivers/media/{video => pci}/cx23885/cx23885-reg.h |    0
 drivers/media/{video => pci}/cx23885/cx23885-vbi.c |    0
 .../media/{video => pci}/cx23885/cx23885-video.c   |    0
 drivers/media/{video => pci}/cx23885/cx23885.h     |    0
 drivers/media/{video => pci}/cx23885/cx23888-ir.c  |    0
 drivers/media/{video => pci}/cx23885/cx23888-ir.h  |    0
 .../media/{video => pci}/cx23885/netup-eeprom.c    |    0
 .../media/{video => pci}/cx23885/netup-eeprom.h    |    0
 drivers/media/{video => pci}/cx23885/netup-init.c  |    0
 drivers/media/{video => pci}/cx23885/netup-init.h  |    0
 drivers/media/{video => pci}/cx25821/Kconfig       |    0
 drivers/media/{video => pci}/cx25821/Makefile      |    2 +-
 .../media/{video => pci}/cx25821/cx25821-alsa.c    |    0
 .../cx25821/cx25821-audio-upstream.c               |    0
 .../cx25821/cx25821-audio-upstream.h               |    0
 .../media/{video => pci}/cx25821/cx25821-audio.h   |    0
 .../{video => pci}/cx25821/cx25821-biffuncs.h      |    0
 .../media/{video => pci}/cx25821/cx25821-cards.c   |    0
 .../media/{video => pci}/cx25821/cx25821-core.c    |    0
 .../media/{video => pci}/cx25821/cx25821-gpio.c    |    0
 drivers/media/{video => pci}/cx25821/cx25821-i2c.c |    0
 .../cx25821/cx25821-medusa-defines.h               |    0
 .../{video => pci}/cx25821/cx25821-medusa-reg.h    |    0
 .../{video => pci}/cx25821/cx25821-medusa-video.c  |    0
 .../{video => pci}/cx25821/cx25821-medusa-video.h  |    0
 drivers/media/{video => pci}/cx25821/cx25821-reg.h |    0
 .../media/{video => pci}/cx25821/cx25821-sram.h    |    0
 .../cx25821/cx25821-video-upstream-ch2.c           |    0
 .../cx25821/cx25821-video-upstream-ch2.h           |    0
 .../cx25821/cx25821-video-upstream.c               |    0
 .../cx25821/cx25821-video-upstream.h               |    0
 .../media/{video => pci}/cx25821/cx25821-video.c   |    0
 .../media/{video => pci}/cx25821/cx25821-video.h   |    0
 drivers/media/{video => pci}/cx25821/cx25821.h     |    0
 drivers/media/{video => pci}/cx88/Kconfig          |    0
 drivers/media/{video => pci}/cx88/Makefile         |    2 +-
 drivers/media/{video => pci}/cx88/cx88-alsa.c      |    0
 drivers/media/{video => pci}/cx88/cx88-blackbird.c |    0
 drivers/media/{video => pci}/cx88/cx88-cards.c     |    0
 drivers/media/{video => pci}/cx88/cx88-core.c      |    0
 drivers/media/{video => pci}/cx88/cx88-dsp.c       |    0
 drivers/media/{video => pci}/cx88/cx88-dvb.c       |    0
 drivers/media/{video => pci}/cx88/cx88-i2c.c       |    0
 drivers/media/{video => pci}/cx88/cx88-input.c     |    0
 drivers/media/{video => pci}/cx88/cx88-mpeg.c      |    0
 drivers/media/{video => pci}/cx88/cx88-reg.h       |    0
 drivers/media/{video => pci}/cx88/cx88-tvaudio.c   |    0
 drivers/media/{video => pci}/cx88/cx88-vbi.c       |    0
 drivers/media/{video => pci}/cx88/cx88-video.c     |    0
 .../media/{video => pci}/cx88/cx88-vp3054-i2c.c    |    0
 .../media/{video => pci}/cx88/cx88-vp3054-i2c.h    |    0
 drivers/media/{video => pci}/cx88/cx88.h           |    0
 drivers/media/{video => pci}/ivtv/Kconfig          |    0
 drivers/media/{video => pci}/ivtv/Makefile         |    2 +-
 drivers/media/{video => pci}/ivtv/ivtv-cards.c     |    0
 drivers/media/{video => pci}/ivtv/ivtv-cards.h     |    0
 drivers/media/{video => pci}/ivtv/ivtv-controls.c  |    0
 drivers/media/{video => pci}/ivtv/ivtv-controls.h  |    0
 drivers/media/{video => pci}/ivtv/ivtv-driver.c    |    0
 drivers/media/{video => pci}/ivtv/ivtv-driver.h    |    0
 drivers/media/{video => pci}/ivtv/ivtv-fileops.c   |    0
 drivers/media/{video => pci}/ivtv/ivtv-fileops.h   |    0
 drivers/media/{video => pci}/ivtv/ivtv-firmware.c  |    0
 drivers/media/{video => pci}/ivtv/ivtv-firmware.h  |    0
 drivers/media/{video => pci}/ivtv/ivtv-gpio.c      |    0
 drivers/media/{video => pci}/ivtv/ivtv-gpio.h      |    0
 drivers/media/{video => pci}/ivtv/ivtv-i2c.c       |    0
 drivers/media/{video => pci}/ivtv/ivtv-i2c.h       |    0
 drivers/media/{video => pci}/ivtv/ivtv-ioctl.c     |    0
 drivers/media/{video => pci}/ivtv/ivtv-ioctl.h     |    0
 drivers/media/{video => pci}/ivtv/ivtv-irq.c       |    0
 drivers/media/{video => pci}/ivtv/ivtv-irq.h       |    0
 drivers/media/{video => pci}/ivtv/ivtv-mailbox.c   |    0
 drivers/media/{video => pci}/ivtv/ivtv-mailbox.h   |    0
 drivers/media/{video => pci}/ivtv/ivtv-queue.c     |    0
 drivers/media/{video => pci}/ivtv/ivtv-queue.h     |    0
 drivers/media/{video => pci}/ivtv/ivtv-routing.c   |    0
 drivers/media/{video => pci}/ivtv/ivtv-routing.h   |    0
 drivers/media/{video => pci}/ivtv/ivtv-streams.c   |    0
 drivers/media/{video => pci}/ivtv/ivtv-streams.h   |    0
 drivers/media/{video => pci}/ivtv/ivtv-udma.c      |    0
 drivers/media/{video => pci}/ivtv/ivtv-udma.h      |    0
 drivers/media/{video => pci}/ivtv/ivtv-vbi.c       |    0
 drivers/media/{video => pci}/ivtv/ivtv-vbi.h       |    0
 drivers/media/{video => pci}/ivtv/ivtv-version.h   |    0
 drivers/media/{video => pci}/ivtv/ivtv-yuv.c       |    0
 drivers/media/{video => pci}/ivtv/ivtv-yuv.h       |    0
 drivers/media/{video => pci}/ivtv/ivtvfb.c         |    0
 drivers/media/pci/meye/Kconfig                     |   13 +
 drivers/media/pci/meye/Makefile                    |    1 +
 drivers/media/{video => pci/meye}/meye.c           |    0
 drivers/media/{video => pci/meye}/meye.h           |    0
 drivers/media/{video => pci}/saa7134/Kconfig       |    0
 drivers/media/{video => pci}/saa7134/Makefile      |    2 +-
 drivers/media/{video => pci}/saa7134/saa6752hs.c   |    0
 .../media/{video => pci}/saa7134/saa7134-alsa.c    |    0
 .../media/{video => pci}/saa7134/saa7134-cards.c   |    0
 .../media/{video => pci}/saa7134/saa7134-core.c    |    0
 drivers/media/{video => pci}/saa7134/saa7134-dvb.c |    0
 .../media/{video => pci}/saa7134/saa7134-empress.c |    0
 drivers/media/{video => pci}/saa7134/saa7134-i2c.c |    0
 .../media/{video => pci}/saa7134/saa7134-input.c   |    0
 drivers/media/{video => pci}/saa7134/saa7134-reg.h |    0
 drivers/media/{video => pci}/saa7134/saa7134-ts.c  |    0
 .../media/{video => pci}/saa7134/saa7134-tvaudio.c |    0
 drivers/media/{video => pci}/saa7134/saa7134-vbi.c |    0
 .../media/{video => pci}/saa7134/saa7134-video.c   |    0
 drivers/media/{video => pci}/saa7134/saa7134.h     |    0
 drivers/media/pci/saa7146/Kconfig                  |   38 +
 drivers/media/pci/saa7146/Makefile                 |    5 +
 .../media/{video => pci/saa7146}/hexium_gemini.c   |    0
 .../media/{video => pci/saa7146}/hexium_orion.c    |    0
 drivers/media/{video => pci/saa7146}/mxb.c         |    0
 drivers/media/{video => pci}/saa7164/Kconfig       |    0
 drivers/media/{video => pci}/saa7164/Makefile      |    2 +-
 drivers/media/{video => pci}/saa7164/saa7164-api.c |    0
 .../media/{video => pci}/saa7164/saa7164-buffer.c  |    0
 drivers/media/{video => pci}/saa7164/saa7164-bus.c |    0
 .../media/{video => pci}/saa7164/saa7164-cards.c   |    0
 drivers/media/{video => pci}/saa7164/saa7164-cmd.c |    0
 .../media/{video => pci}/saa7164/saa7164-core.c    |    0
 drivers/media/{video => pci}/saa7164/saa7164-dvb.c |    0
 .../media/{video => pci}/saa7164/saa7164-encoder.c |    0
 drivers/media/{video => pci}/saa7164/saa7164-fw.c  |    0
 drivers/media/{video => pci}/saa7164/saa7164-i2c.c |    0
 drivers/media/{video => pci}/saa7164/saa7164-reg.h |    0
 .../media/{video => pci}/saa7164/saa7164-types.h   |    0
 drivers/media/{video => pci}/saa7164/saa7164-vbi.c |    0
 drivers/media/{video => pci}/saa7164/saa7164.h     |    0
 drivers/media/pci/sta2x11/Kconfig                  |   12 +
 drivers/media/pci/sta2x11/Makefile                 |    1 +
 drivers/media/{video => pci/sta2x11}/sta2x11_vip.c |    0
 drivers/media/{video => pci/sta2x11}/sta2x11_vip.h |    0
 drivers/media/{video => pci}/zoran/Kconfig         |    0
 drivers/media/{video => pci}/zoran/Makefile        |    0
 drivers/media/{video => pci}/zoran/videocodec.c    |    0
 drivers/media/{video => pci}/zoran/videocodec.h    |    0
 drivers/media/{video => pci}/zoran/zoran.h         |    0
 drivers/media/{video => pci}/zoran/zoran_card.c    |    0
 drivers/media/{video => pci}/zoran/zoran_card.h    |    0
 drivers/media/{video => pci}/zoran/zoran_device.c  |    0
 drivers/media/{video => pci}/zoran/zoran_device.h  |    0
 drivers/media/{video => pci}/zoran/zoran_driver.c  |    0
 drivers/media/{video => pci}/zoran/zoran_procfs.c  |    0
 drivers/media/{video => pci}/zoran/zoran_procfs.h  |    0
 drivers/media/{video => pci}/zoran/zr36016.c       |    0
 drivers/media/{video => pci}/zoran/zr36016.h       |    0
 drivers/media/{video => pci}/zoran/zr36050.c       |    0
 drivers/media/{video => pci}/zoran/zr36050.h       |    0
 drivers/media/{video => pci}/zoran/zr36057.h       |    0
 drivers/media/{video => pci}/zoran/zr36060.c       |    0
 drivers/media/{video => pci}/zoran/zr36060.h       |    0
 drivers/media/platform/Kconfig                     |  297 +++++
 drivers/media/platform/Makefile                    |   66 ++
 drivers/media/{video => platform}/arv.c            |    0
 drivers/media/{video => platform}/atmel-isi.c      |    0
 drivers/media/{video => platform}/blackfin/Kconfig |    0
 .../media/{video => platform}/blackfin/Makefile    |    0
 .../{video => platform}/blackfin/bfin_capture.c    |    0
 drivers/media/{video => platform}/blackfin/ppi.c   |    0
 drivers/media/{video => platform}/coda.c           |    0
 drivers/media/{video => platform}/coda.h           |    2 +-
 drivers/media/{video => platform}/davinci/Kconfig  |    0
 drivers/media/{video => platform}/davinci/Makefile |    0
 .../{video => platform}/davinci/ccdc_hw_device.h   |    0
 .../media/{video => platform}/davinci/dm355_ccdc.c |    0
 .../{video => platform}/davinci/dm355_ccdc_regs.h  |    0
 .../{video => platform}/davinci/dm644x_ccdc.c      |    0
 .../{video => platform}/davinci/dm644x_ccdc_regs.h |    0
 drivers/media/{video => platform}/davinci/isif.c   |    0
 .../media/{video => platform}/davinci/isif_regs.h  |    0
 drivers/media/{video => platform}/davinci/vpbe.c   |    0
 .../{video => platform}/davinci/vpbe_display.c     |    0
 .../media/{video => platform}/davinci/vpbe_osd.c   |    0
 .../{video => platform}/davinci/vpbe_osd_regs.h    |    0
 .../media/{video => platform}/davinci/vpbe_venc.c  |    0
 .../{video => platform}/davinci/vpbe_venc_regs.h   |    0
 .../{video => platform}/davinci/vpfe_capture.c     |    0
 drivers/media/{video => platform}/davinci/vpif.c   |    0
 drivers/media/{video => platform}/davinci/vpif.h   |    0
 .../{video => platform}/davinci/vpif_capture.c     |    0
 .../{video => platform}/davinci/vpif_capture.h     |    0
 .../{video => platform}/davinci/vpif_display.c     |    0
 .../{video => platform}/davinci/vpif_display.h     |    0
 drivers/media/{video => platform}/davinci/vpss.c   |    0
 drivers/media/{video => platform}/fsl-viu.c        |    0
 drivers/media/{video => platform}/indycam.c        |    0
 drivers/media/{video => platform}/indycam.h        |    0
 .../media/{video => platform}/m2m-deinterlace.c    |    0
 .../media/{video => platform}/marvell-ccic/Kconfig |    0
 .../{video => platform}/marvell-ccic/Makefile      |    0
 .../{video => platform}/marvell-ccic/cafe-driver.c |    0
 .../{video => platform}/marvell-ccic/mcam-core.c   |    0
 .../{video => platform}/marvell-ccic/mcam-core.h   |    0
 .../{video => platform}/marvell-ccic/mmp-driver.c  |    0
 .../media/{video => platform}/mem2mem_testdev.c    |    0
 drivers/media/{video => platform}/mx1_camera.c     |    0
 drivers/media/{video => platform}/mx2_camera.c     |    0
 drivers/media/{video => platform}/mx2_emmaprp.c    |    0
 drivers/media/{video => platform}/mx3_camera.c     |    0
 drivers/media/{video => platform}/omap/Kconfig     |    0
 drivers/media/{video => platform}/omap/Makefile    |    0
 drivers/media/{video => platform}/omap/omap_vout.c |    0
 .../{video => platform}/omap/omap_vout_vrfb.c      |    0
 .../{video => platform}/omap/omap_vout_vrfb.h      |    0
 .../media/{video => platform}/omap/omap_voutdef.h  |    0
 .../media/{video => platform}/omap/omap_voutlib.c  |    0
 .../media/{video => platform}/omap/omap_voutlib.h  |    0
 drivers/media/{video => platform}/omap1_camera.c   |    2 +-
 .../media/{video => platform}/omap24xxcam-dma.c    |    2 +-
 drivers/media/{video => platform}/omap24xxcam.c    |    2 +-
 drivers/media/{video => platform}/omap24xxcam.h    |    2 +-
 .../media/{video => platform}/omap3isp/Makefile    |    0
 .../{video => platform}/omap3isp/cfa_coef_table.h  |    0
 .../{video => platform}/omap3isp/gamma_table.h     |    0
 drivers/media/{video => platform}/omap3isp/isp.c   |    0
 drivers/media/{video => platform}/omap3isp/isp.h   |    0
 .../media/{video => platform}/omap3isp/ispccdc.c   |    0
 .../media/{video => platform}/omap3isp/ispccdc.h   |    0
 .../media/{video => platform}/omap3isp/ispccp2.c   |    0
 .../media/{video => platform}/omap3isp/ispccp2.h   |    0
 .../media/{video => platform}/omap3isp/ispcsi2.c   |    0
 .../media/{video => platform}/omap3isp/ispcsi2.h   |    0
 .../media/{video => platform}/omap3isp/ispcsiphy.c |    0
 .../media/{video => platform}/omap3isp/ispcsiphy.h |    0
 .../media/{video => platform}/omap3isp/isph3a.h    |    0
 .../{video => platform}/omap3isp/isph3a_aewb.c     |    0
 .../media/{video => platform}/omap3isp/isph3a_af.c |    0
 .../media/{video => platform}/omap3isp/isphist.c   |    0
 .../media/{video => platform}/omap3isp/isphist.h   |    0
 .../{video => platform}/omap3isp/isppreview.c      |    0
 .../{video => platform}/omap3isp/isppreview.h      |    0
 .../media/{video => platform}/omap3isp/ispqueue.c  |    0
 .../media/{video => platform}/omap3isp/ispqueue.h  |    0
 .../media/{video => platform}/omap3isp/ispreg.h    |    0
 .../{video => platform}/omap3isp/ispresizer.c      |    0
 .../{video => platform}/omap3isp/ispresizer.h      |    0
 .../media/{video => platform}/omap3isp/ispstat.c   |    0
 .../media/{video => platform}/omap3isp/ispstat.h   |    0
 .../media/{video => platform}/omap3isp/ispvideo.c  |    0
 .../media/{video => platform}/omap3isp/ispvideo.h  |    0
 .../omap3isp/luma_enhance_table.h                  |    0
 .../omap3isp/noise_filter_table.h                  |    0
 drivers/media/{video => platform}/pxa_camera.c     |    0
 drivers/media/{video => platform}/s5p-fimc/Kconfig |    0
 .../media/{video => platform}/s5p-fimc/Makefile    |    0
 .../{video => platform}/s5p-fimc/fimc-capture.c    |    0
 .../media/{video => platform}/s5p-fimc/fimc-core.c |    0
 .../media/{video => platform}/s5p-fimc/fimc-core.h |    0
 .../{video => platform}/s5p-fimc/fimc-lite-reg.c   |    0
 .../{video => platform}/s5p-fimc/fimc-lite-reg.h   |    0
 .../media/{video => platform}/s5p-fimc/fimc-lite.c |    0
 .../media/{video => platform}/s5p-fimc/fimc-lite.h |    0
 .../media/{video => platform}/s5p-fimc/fimc-m2m.c  |    0
 .../{video => platform}/s5p-fimc/fimc-mdevice.c    |    0
 .../{video => platform}/s5p-fimc/fimc-mdevice.h    |    0
 .../media/{video => platform}/s5p-fimc/fimc-reg.c  |    0
 .../media/{video => platform}/s5p-fimc/fimc-reg.h  |    0
 .../media/{video => platform}/s5p-fimc/mipi-csis.c |    0
 .../media/{video => platform}/s5p-fimc/mipi-csis.h |    0
 drivers/media/{video => platform}/s5p-g2d/Makefile |    0
 drivers/media/{video => platform}/s5p-g2d/g2d-hw.c |    0
 .../media/{video => platform}/s5p-g2d/g2d-regs.h   |    0
 drivers/media/{video => platform}/s5p-g2d/g2d.c    |    0
 drivers/media/{video => platform}/s5p-g2d/g2d.h    |    0
 .../media/{video => platform}/s5p-jpeg/Makefile    |    0
 .../media/{video => platform}/s5p-jpeg/jpeg-core.c |    2 +-
 .../media/{video => platform}/s5p-jpeg/jpeg-core.h |    2 +-
 .../media/{video => platform}/s5p-jpeg/jpeg-hw.h   |    2 +-
 .../media/{video => platform}/s5p-jpeg/jpeg-regs.h |    2 +-
 drivers/media/{video => platform}/s5p-mfc/Makefile |    0
 .../media/{video => platform}/s5p-mfc/regs-mfc.h   |    0
 .../media/{video => platform}/s5p-mfc/s5p_mfc.c    |    0
 .../{video => platform}/s5p-mfc/s5p_mfc_cmd.c      |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_cmd.h      |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_common.h   |    0
 .../{video => platform}/s5p-mfc/s5p_mfc_ctrl.c     |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_ctrl.h     |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_debug.h    |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_dec.c      |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_dec.h      |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_enc.c      |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_enc.h      |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_intr.c     |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_intr.h     |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_opr.c      |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_opr.h      |    2 +-
 .../media/{video => platform}/s5p-mfc/s5p_mfc_pm.c |    2 +-
 .../media/{video => platform}/s5p-mfc/s5p_mfc_pm.h |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_shm.c      |    2 +-
 .../{video => platform}/s5p-mfc/s5p_mfc_shm.h      |    2 +-
 drivers/media/{video => platform}/s5p-tv/Kconfig   |    2 +-
 drivers/media/{video => platform}/s5p-tv/Makefile  |    2 +-
 .../media/{video => platform}/s5p-tv/hdmi_drv.c    |    0
 .../media/{video => platform}/s5p-tv/hdmiphy_drv.c |    0
 drivers/media/{video => platform}/s5p-tv/mixer.h   |    0
 .../media/{video => platform}/s5p-tv/mixer_drv.c   |    0
 .../{video => platform}/s5p-tv/mixer_grp_layer.c   |    0
 .../media/{video => platform}/s5p-tv/mixer_reg.c   |    0
 .../media/{video => platform}/s5p-tv/mixer_video.c |    0
 .../{video => platform}/s5p-tv/mixer_vp_layer.c    |    0
 .../media/{video => platform}/s5p-tv/regs-hdmi.h   |    0
 .../media/{video => platform}/s5p-tv/regs-mixer.h  |    0
 .../media/{video => platform}/s5p-tv/regs-sdo.h    |    2 +-
 drivers/media/{video => platform}/s5p-tv/regs-vp.h |    0
 drivers/media/{video => platform}/s5p-tv/sdo_drv.c |    0
 .../media/{video => platform}/s5p-tv/sii9234_drv.c |    0
 .../{video => platform}/sh_mobile_ceu_camera.c     |    0
 drivers/media/{video => platform}/sh_vou.c         |    0
 drivers/media/{video => platform}/soc_camera.c     |    0
 .../{video => platform}/soc_camera_platform.c      |    0
 drivers/media/{video => platform}/soc_mediabus.c   |    0
 drivers/media/{video => platform}/timblogiw.c      |    0
 drivers/media/{video => platform}/via-camera.c     |    0
 drivers/media/{video => platform}/via-camera.h     |    0
 drivers/media/{video => platform}/vino.c           |    0
 drivers/media/{video => platform}/vino.h           |    0
 drivers/media/{video => platform}/vivi.c           |    0
 drivers/media/usb/Kconfig                          |   44 +-
 drivers/media/usb/Makefile                         |   16 +
 drivers/media/{video => usb}/au0828/Kconfig        |    0
 drivers/media/{video => usb}/au0828/Makefile       |    0
 drivers/media/{video => usb}/au0828/au0828-cards.c |    0
 drivers/media/{video => usb}/au0828/au0828-cards.h |    0
 drivers/media/{video => usb}/au0828/au0828-core.c  |    0
 drivers/media/{video => usb}/au0828/au0828-dvb.c   |    0
 drivers/media/{video => usb}/au0828/au0828-i2c.c   |    0
 drivers/media/{video => usb}/au0828/au0828-reg.h   |    0
 drivers/media/{video => usb}/au0828/au0828-vbi.c   |    0
 drivers/media/{video => usb}/au0828/au0828-video.c |    0
 drivers/media/{video => usb}/au0828/au0828.h       |    0
 drivers/media/{video => usb}/cpia2/Kconfig         |    0
 drivers/media/{video => usb}/cpia2/Makefile        |    0
 drivers/media/{video => usb}/cpia2/cpia2.h         |    0
 drivers/media/{video => usb}/cpia2/cpia2_core.c    |    0
 .../media/{video => usb}/cpia2/cpia2_registers.h   |    0
 drivers/media/{video => usb}/cpia2/cpia2_usb.c     |    0
 drivers/media/{video => usb}/cpia2/cpia2_v4l.c     |    0
 drivers/media/{video => usb}/cx231xx/Kconfig       |    0
 drivers/media/{video => usb}/cx231xx/Makefile      |    2 +-
 drivers/media/{video => usb}/cx231xx/cx231xx-417.c |    0
 .../media/{video => usb}/cx231xx/cx231xx-audio.c   |    0
 .../media/{video => usb}/cx231xx/cx231xx-avcore.c  |    0
 .../media/{video => usb}/cx231xx/cx231xx-cards.c   |    0
 .../{video => usb}/cx231xx/cx231xx-conf-reg.h      |    0
 .../media/{video => usb}/cx231xx/cx231xx-core.c    |    0
 drivers/media/{video => usb}/cx231xx/cx231xx-dif.h |    0
 drivers/media/{video => usb}/cx231xx/cx231xx-dvb.c |    0
 drivers/media/{video => usb}/cx231xx/cx231xx-i2c.c |    0
 .../media/{video => usb}/cx231xx/cx231xx-input.c   |    0
 .../media/{video => usb}/cx231xx/cx231xx-pcb-cfg.c |    0
 .../media/{video => usb}/cx231xx/cx231xx-pcb-cfg.h |    0
 drivers/media/{video => usb}/cx231xx/cx231xx-reg.h |    0
 drivers/media/{video => usb}/cx231xx/cx231xx-vbi.c |    0
 drivers/media/{video => usb}/cx231xx/cx231xx-vbi.h |    0
 .../media/{video => usb}/cx231xx/cx231xx-video.c   |    0
 drivers/media/{video => usb}/cx231xx/cx231xx.h     |    0
 drivers/media/{video => usb}/em28xx/Kconfig        |    0
 drivers/media/{video => usb}/em28xx/Makefile       |    2 +-
 drivers/media/{video => usb}/em28xx/em28xx-audio.c |    0
 drivers/media/{video => usb}/em28xx/em28xx-cards.c |    0
 drivers/media/{video => usb}/em28xx/em28xx-core.c  |    0
 drivers/media/{video => usb}/em28xx/em28xx-dvb.c   |    0
 drivers/media/{video => usb}/em28xx/em28xx-i2c.c   |    0
 drivers/media/{video => usb}/em28xx/em28xx-input.c |    0
 drivers/media/{video => usb}/em28xx/em28xx-reg.h   |    0
 drivers/media/{video => usb}/em28xx/em28xx-vbi.c   |    0
 drivers/media/{video => usb}/em28xx/em28xx-video.c |    0
 drivers/media/{video => usb}/em28xx/em28xx.h       |    0
 drivers/media/{video => usb}/gspca/Kconfig         |    6 +-
 drivers/media/{video => usb}/gspca/Makefile        |    0
 .../{video => usb}/gspca/autogain_functions.c      |    0
 .../{video => usb}/gspca/autogain_functions.h      |    0
 drivers/media/{video => usb}/gspca/benq.c          |    0
 drivers/media/{video => usb}/gspca/conex.c         |    0
 drivers/media/{video => usb}/gspca/cpia1.c         |    0
 drivers/media/{video => usb}/gspca/etoms.c         |    0
 drivers/media/{video => usb}/gspca/finepix.c       |    0
 drivers/media/{video => usb}/gspca/gl860/Kconfig   |    0
 drivers/media/{video => usb}/gspca/gl860/Makefile  |    2 +-
 .../{video => usb}/gspca/gl860/gl860-mi1320.c      |    0
 .../{video => usb}/gspca/gl860/gl860-mi2020.c      |    0
 .../{video => usb}/gspca/gl860/gl860-ov2640.c      |    0
 .../{video => usb}/gspca/gl860/gl860-ov9655.c      |    0
 drivers/media/{video => usb}/gspca/gl860/gl860.c   |    0
 drivers/media/{video => usb}/gspca/gl860/gl860.h   |    0
 drivers/media/{video => usb}/gspca/gspca.c         |    0
 drivers/media/{video => usb}/gspca/gspca.h         |    0
 drivers/media/{video => usb}/gspca/jeilinj.c       |    0
 drivers/media/{video => usb}/gspca/jl2005bcd.c     |    0
 drivers/media/{video => usb}/gspca/jpeg.h          |    0
 drivers/media/{video => usb}/gspca/kinect.c        |    0
 drivers/media/{video => usb}/gspca/konica.c        |    0
 drivers/media/{video => usb}/gspca/m5602/Kconfig   |    0
 drivers/media/{video => usb}/gspca/m5602/Makefile  |    2 +-
 .../{video => usb}/gspca/m5602/m5602_bridge.h      |    0
 .../media/{video => usb}/gspca/m5602/m5602_core.c  |    0
 .../{video => usb}/gspca/m5602/m5602_mt9m111.c     |    0
 .../{video => usb}/gspca/m5602/m5602_mt9m111.h     |    0
 .../{video => usb}/gspca/m5602/m5602_ov7660.c      |    0
 .../{video => usb}/gspca/m5602/m5602_ov7660.h      |    0
 .../{video => usb}/gspca/m5602/m5602_ov9650.c      |    0
 .../{video => usb}/gspca/m5602/m5602_ov9650.h      |    0
 .../{video => usb}/gspca/m5602/m5602_po1030.c      |    0
 .../{video => usb}/gspca/m5602/m5602_po1030.h      |    0
 .../{video => usb}/gspca/m5602/m5602_s5k4aa.c      |    0
 .../{video => usb}/gspca/m5602/m5602_s5k4aa.h      |    0
 .../{video => usb}/gspca/m5602/m5602_s5k83a.c      |    0
 .../{video => usb}/gspca/m5602/m5602_s5k83a.h      |    0
 .../{video => usb}/gspca/m5602/m5602_sensor.h      |    0
 drivers/media/{video => usb}/gspca/mars.c          |    0
 drivers/media/{video => usb}/gspca/mr97310a.c      |    0
 drivers/media/{video => usb}/gspca/nw80x.c         |    0
 drivers/media/{video => usb}/gspca/ov519.c         |    0
 drivers/media/{video => usb}/gspca/ov534.c         |    0
 drivers/media/{video => usb}/gspca/ov534_9.c       |    0
 drivers/media/{video => usb}/gspca/pac207.c        |    0
 drivers/media/{video => usb}/gspca/pac7302.c       |    0
 drivers/media/{video => usb}/gspca/pac7311.c       |    0
 drivers/media/{video => usb}/gspca/pac_common.h    |    0
 drivers/media/{video => usb}/gspca/se401.c         |    0
 drivers/media/{video => usb}/gspca/se401.h         |    0
 drivers/media/{video => usb}/gspca/sn9c2028.c      |    0
 drivers/media/{video => usb}/gspca/sn9c2028.h      |    0
 drivers/media/{video => usb}/gspca/sn9c20x.c       |    0
 drivers/media/{video => usb}/gspca/sonixb.c        |    0
 drivers/media/{video => usb}/gspca/sonixj.c        |    0
 drivers/media/{video => usb}/gspca/spca1528.c      |    0
 drivers/media/{video => usb}/gspca/spca500.c       |    0
 drivers/media/{video => usb}/gspca/spca501.c       |    0
 drivers/media/{video => usb}/gspca/spca505.c       |    0
 drivers/media/{video => usb}/gspca/spca506.c       |    0
 drivers/media/{video => usb}/gspca/spca508.c       |    0
 drivers/media/{video => usb}/gspca/spca561.c       |    0
 drivers/media/{video => usb}/gspca/sq905.c         |    0
 drivers/media/{video => usb}/gspca/sq905c.c        |    0
 drivers/media/{video => usb}/gspca/sq930x.c        |    0
 drivers/media/{video => usb}/gspca/stk014.c        |    0
 drivers/media/{video => usb}/gspca/stv0680.c       |    0
 drivers/media/{video => usb}/gspca/stv06xx/Kconfig |    0
 .../media/{video => usb}/gspca/stv06xx/Makefile    |    2 +-
 .../media/{video => usb}/gspca/stv06xx/stv06xx.c   |    0
 .../media/{video => usb}/gspca/stv06xx/stv06xx.h   |    0
 .../{video => usb}/gspca/stv06xx/stv06xx_hdcs.c    |    0
 .../{video => usb}/gspca/stv06xx/stv06xx_hdcs.h    |    0
 .../{video => usb}/gspca/stv06xx/stv06xx_pb0100.c  |    0
 .../{video => usb}/gspca/stv06xx/stv06xx_pb0100.h  |    0
 .../{video => usb}/gspca/stv06xx/stv06xx_sensor.h  |    0
 .../{video => usb}/gspca/stv06xx/stv06xx_st6422.c  |    0
 .../{video => usb}/gspca/stv06xx/stv06xx_st6422.h  |    0
 .../{video => usb}/gspca/stv06xx/stv06xx_vv6410.c  |    0
 .../{video => usb}/gspca/stv06xx/stv06xx_vv6410.h  |    0
 drivers/media/{video => usb}/gspca/sunplus.c       |    0
 drivers/media/{video => usb}/gspca/t613.c          |    0
 drivers/media/{video => usb}/gspca/topro.c         |    0
 drivers/media/{video => usb}/gspca/tv8532.c        |    0
 drivers/media/{video => usb}/gspca/vc032x.c        |    0
 drivers/media/{video => usb}/gspca/vicam.c         |    0
 drivers/media/{video => usb}/gspca/w996Xcf.c       |    0
 drivers/media/{video => usb}/gspca/xirlink_cit.c   |    0
 drivers/media/{video => usb}/gspca/zc3xx-reg.h     |    0
 drivers/media/{video => usb}/gspca/zc3xx.c         |    0
 drivers/media/{video => usb}/hdpvr/Kconfig         |    0
 drivers/media/{video => usb}/hdpvr/Makefile        |    2 +-
 drivers/media/{video => usb}/hdpvr/hdpvr-control.c |    0
 drivers/media/{video => usb}/hdpvr/hdpvr-core.c    |    0
 drivers/media/{video => usb}/hdpvr/hdpvr-i2c.c     |    0
 drivers/media/{video => usb}/hdpvr/hdpvr-video.c   |    0
 drivers/media/{video => usb}/hdpvr/hdpvr.h         |    0
 drivers/media/{video => usb}/pvrusb2/Kconfig       |    0
 drivers/media/{video => usb}/pvrusb2/Makefile      |    2 +-
 .../media/{video => usb}/pvrusb2/pvrusb2-audio.c   |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-audio.h   |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-context.c |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-context.h |    0
 .../{video => usb}/pvrusb2/pvrusb2-cs53l32a.c      |    0
 .../{video => usb}/pvrusb2/pvrusb2-cs53l32a.h      |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-ctrl.c    |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-ctrl.h    |    0
 .../{video => usb}/pvrusb2/pvrusb2-cx2584x-v4l.c   |    0
 .../{video => usb}/pvrusb2/pvrusb2-cx2584x-v4l.h   |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-debug.h   |    0
 .../{video => usb}/pvrusb2/pvrusb2-debugifc.c      |    0
 .../{video => usb}/pvrusb2/pvrusb2-debugifc.h      |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-devattr.c |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-devattr.h |    0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-dvb.c |    0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-dvb.h |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-eeprom.c  |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-eeprom.h  |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-encoder.c |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-encoder.h |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-fx2-cmd.h |    0
 .../{video => usb}/pvrusb2/pvrusb2-hdw-internal.h  |    0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw.c |    0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw.h |    0
 .../{video => usb}/pvrusb2/pvrusb2-i2c-core.c      |    0
 .../{video => usb}/pvrusb2/pvrusb2-i2c-core.h      |    0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-io.c  |    0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-io.h  |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-ioread.c  |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-ioread.h  |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-main.c    |    0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-std.c |    0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-std.h |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-sysfs.c   |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-sysfs.h   |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-util.h    |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-v4l2.c    |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-v4l2.h    |    0
 .../{video => usb}/pvrusb2/pvrusb2-video-v4l.c     |    0
 .../{video => usb}/pvrusb2/pvrusb2-video-v4l.h     |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-wm8775.c  |    0
 .../media/{video => usb}/pvrusb2/pvrusb2-wm8775.h  |    0
 drivers/media/{video => usb}/pvrusb2/pvrusb2.h     |    0
 drivers/media/{video => usb}/pwc/Kconfig           |    0
 drivers/media/{video => usb}/pwc/Makefile          |    0
 drivers/media/{video => usb}/pwc/philips.txt       |    0
 drivers/media/{video => usb}/pwc/pwc-ctrl.c        |    0
 drivers/media/{video => usb}/pwc/pwc-dec1.c        |    0
 drivers/media/{video => usb}/pwc/pwc-dec1.h        |    0
 drivers/media/{video => usb}/pwc/pwc-dec23.c       |    0
 drivers/media/{video => usb}/pwc/pwc-dec23.h       |    0
 drivers/media/{video => usb}/pwc/pwc-if.c          |    0
 drivers/media/{video => usb}/pwc/pwc-kiara.c       |    0
 drivers/media/{video => usb}/pwc/pwc-kiara.h       |    0
 drivers/media/{video => usb}/pwc/pwc-misc.c        |    0
 drivers/media/{video => usb}/pwc/pwc-nala.h        |    0
 drivers/media/{video => usb}/pwc/pwc-timon.c       |    0
 drivers/media/{video => usb}/pwc/pwc-timon.h       |    0
 drivers/media/{video => usb}/pwc/pwc-uncompress.c  |    0
 drivers/media/{video => usb}/pwc/pwc-v4l.c         |    0
 drivers/media/{video => usb}/pwc/pwc.h             |    0
 drivers/media/usb/s2255/Kconfig                    |    9 +
 drivers/media/usb/s2255/Makefile                   |    2 +
 drivers/media/{video => usb/s2255}/s2255drv.c      |    0
 drivers/media/{video => usb}/sn9c102/Kconfig       |    0
 drivers/media/{video => usb}/sn9c102/Makefile      |    0
 drivers/media/{video => usb}/sn9c102/sn9c102.h     |    0
 .../media/{video => usb}/sn9c102/sn9c102_config.h  |    0
 .../media/{video => usb}/sn9c102/sn9c102_core.c    |    0
 .../{video => usb}/sn9c102/sn9c102_devtable.h      |    0
 .../media/{video => usb}/sn9c102/sn9c102_hv7131d.c |    0
 .../media/{video => usb}/sn9c102/sn9c102_hv7131r.c |    0
 .../media/{video => usb}/sn9c102/sn9c102_mi0343.c  |    0
 .../media/{video => usb}/sn9c102/sn9c102_mi0360.c  |    0
 .../media/{video => usb}/sn9c102/sn9c102_mt9v111.c |    0
 .../media/{video => usb}/sn9c102/sn9c102_ov7630.c  |    0
 .../media/{video => usb}/sn9c102/sn9c102_ov7660.c  |    0
 .../media/{video => usb}/sn9c102/sn9c102_pas106b.c |    0
 .../{video => usb}/sn9c102/sn9c102_pas202bcb.c     |    0
 .../media/{video => usb}/sn9c102/sn9c102_sensor.h  |    0
 .../{video => usb}/sn9c102/sn9c102_tas5110c1b.c    |    0
 .../{video => usb}/sn9c102/sn9c102_tas5110d.c      |    0
 .../{video => usb}/sn9c102/sn9c102_tas5130d1b.c    |    0
 drivers/media/{video => usb}/stk1160/Kconfig       |    0
 drivers/media/{video => usb}/stk1160/Makefile      |    2 +-
 .../media/{video => usb}/stk1160/stk1160-ac97.c    |    0
 .../media/{video => usb}/stk1160/stk1160-core.c    |    0
 drivers/media/{video => usb}/stk1160/stk1160-i2c.c |    0
 drivers/media/{video => usb}/stk1160/stk1160-reg.h |    0
 drivers/media/{video => usb}/stk1160/stk1160-v4l.c |    0
 .../media/{video => usb}/stk1160/stk1160-video.c   |    0
 drivers/media/{video => usb}/stk1160/stk1160.h     |    0
 drivers/media/usb/stkwebcam/Kconfig                |   13 +
 drivers/media/usb/stkwebcam/Makefile               |    4 +
 .../media/{video => usb/stkwebcam}/stk-sensor.c    |    0
 .../media/{video => usb/stkwebcam}/stk-webcam.c    |    0
 .../media/{video => usb/stkwebcam}/stk-webcam.h    |    0
 drivers/media/{video => usb}/tlg2300/Kconfig       |    0
 drivers/media/{video => usb}/tlg2300/Makefile      |    2 +-
 drivers/media/{video => usb}/tlg2300/pd-alsa.c     |    0
 drivers/media/{video => usb}/tlg2300/pd-common.h   |    0
 drivers/media/{video => usb}/tlg2300/pd-dvb.c      |    0
 drivers/media/{video => usb}/tlg2300/pd-main.c     |    0
 drivers/media/{video => usb}/tlg2300/pd-radio.c    |    0
 drivers/media/{video => usb}/tlg2300/pd-video.c    |    0
 drivers/media/{video => usb}/tlg2300/vendorcmds.h  |    0
 drivers/media/{video => usb}/tm6000/Kconfig        |    0
 drivers/media/{video => usb}/tm6000/Makefile       |    2 +-
 drivers/media/{video => usb}/tm6000/tm6000-alsa.c  |    0
 drivers/media/{video => usb}/tm6000/tm6000-cards.c |    0
 drivers/media/{video => usb}/tm6000/tm6000-core.c  |    0
 drivers/media/{video => usb}/tm6000/tm6000-dvb.c   |    0
 drivers/media/{video => usb}/tm6000/tm6000-i2c.c   |    0
 drivers/media/{video => usb}/tm6000/tm6000-input.c |    0
 drivers/media/{video => usb}/tm6000/tm6000-regs.h  |    0
 drivers/media/{video => usb}/tm6000/tm6000-stds.c  |    0
 .../media/{video => usb}/tm6000/tm6000-usb-isoc.h  |    0
 drivers/media/{video => usb}/tm6000/tm6000-video.c |    0
 drivers/media/{video => usb}/tm6000/tm6000.h       |    0
 drivers/media/{video => usb}/usbvision/Kconfig     |    0
 drivers/media/{video => usb}/usbvision/Makefile    |    2 +-
 .../{video => usb}/usbvision/usbvision-cards.c     |    0
 .../{video => usb}/usbvision/usbvision-cards.h     |    0
 .../{video => usb}/usbvision/usbvision-core.c      |    0
 .../media/{video => usb}/usbvision/usbvision-i2c.c |    0
 .../{video => usb}/usbvision/usbvision-video.c     |    0
 drivers/media/{video => usb}/usbvision/usbvision.h |    0
 drivers/media/{video => usb}/uvc/Kconfig           |    0
 drivers/media/{video => usb}/uvc/Makefile          |    0
 drivers/media/{video => usb}/uvc/uvc_ctrl.c        |    0
 drivers/media/{video => usb}/uvc/uvc_debugfs.c     |    0
 drivers/media/{video => usb}/uvc/uvc_driver.c      |    0
 drivers/media/{video => usb}/uvc/uvc_entity.c      |    0
 drivers/media/{video => usb}/uvc/uvc_isight.c      |    0
 drivers/media/{video => usb}/uvc/uvc_queue.c       |    0
 drivers/media/{video => usb}/uvc/uvc_status.c      |    0
 drivers/media/{video => usb}/uvc/uvc_v4l2.c        |    0
 drivers/media/{video => usb}/uvc/uvc_video.c       |    0
 drivers/media/{video => usb}/uvc/uvcvideo.h        |    0
 drivers/media/usb/zr364xx/Kconfig                  |   14 +
 drivers/media/usb/zr364xx/Makefile                 |    2 +
 drivers/media/{video => usb/zr364xx}/zr364xx.c     |    0
 drivers/media/v4l2-core/Kconfig                    |   32 +-
 drivers/media/video/Kconfig                        | 1226 --------------------
 drivers/media/video/Makefile                       |  195 ----
 drivers/media/video/bt8xx/Kconfig                  |   27 -
 drivers/media/video/bt8xx/Makefile                 |   13 -
 841 files changed, 1510 insertions(+), 1597 deletions(-)
 create mode 100644 drivers/media/i2c/Kconfig
 create mode 100644 drivers/media/i2c/Makefile
 rename drivers/media/{video => i2c}/adp1653.c (99%)
 rename drivers/media/{video => i2c}/adv7170.c (100%)
 rename drivers/media/{video => i2c}/adv7175.c (100%)
 rename drivers/media/{video => i2c}/adv7180.c (100%)
 rename drivers/media/{video => i2c}/adv7183.c (100%)
 rename drivers/media/{video => i2c}/adv7183_regs.h (100%)
 rename drivers/media/{video => i2c}/adv7343.c (100%)
 rename drivers/media/{video => i2c}/adv7343_regs.h (100%)
 rename drivers/media/{video => i2c}/adv7393.c (100%)
 rename drivers/media/{video => i2c}/adv7393_regs.h (100%)
 rename drivers/media/{video => i2c}/ak881x.c (100%)
 rename drivers/media/{video => i2c}/aptina-pll.c (100%)
 rename drivers/media/{video => i2c}/aptina-pll.h (100%)
 rename drivers/media/{video => i2c}/as3645a.c (99%)
 rename drivers/media/{video => i2c}/bt819.c (100%)
 rename drivers/media/{video => i2c}/bt856.c (100%)
 rename drivers/media/{video => i2c}/bt866.c (100%)
 rename drivers/media/{video => i2c}/btcx-risc.c (100%)
 rename drivers/media/{video => i2c}/btcx-risc.h (100%)
 rename drivers/media/{video => i2c}/cs5345.c (100%)
 rename drivers/media/{video => i2c}/cs53l32a.c (100%)
 rename drivers/media/{video => i2c}/cx2341x.c (100%)
 rename drivers/media/{video => i2c}/cx25840/Kconfig (100%)
 rename drivers/media/{video => i2c}/cx25840/Makefile (80%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-audio.c (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-core.c (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-core.h (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-firmware.c (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-ir.c (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-vbi.c (100%)
 rename drivers/media/{video => i2c}/ir-kbd-i2c.c (100%)
 rename drivers/media/{video => i2c}/ks0127.c (100%)
 rename drivers/media/{video => i2c}/ks0127.h (100%)
 rename drivers/media/{video => i2c}/m52790.c (100%)
 rename drivers/media/{video => i2c}/m5mols/Kconfig (100%)
 rename drivers/media/{video => i2c}/m5mols/Makefile (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols.h (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols_capture.c (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols_controls.c (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols_core.c (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols_reg.h (100%)
 rename drivers/media/{video => i2c}/msp3400-driver.c (100%)
 rename drivers/media/{video => i2c}/msp3400-driver.h (100%)
 rename drivers/media/{video => i2c}/msp3400-kthreads.c (100%)
 rename drivers/media/{video => i2c}/mt9m032.c (100%)
 rename drivers/media/{video => i2c}/mt9p031.c (100%)
 rename drivers/media/{video => i2c}/mt9t001.c (100%)
 rename drivers/media/{video => i2c}/mt9v011.c (100%)
 rename drivers/media/{video => i2c}/mt9v032.c (100%)
 rename drivers/media/{video => i2c}/noon010pc30.c (100%)
 rename drivers/media/{video => i2c}/ov7670.c (100%)
 rename drivers/media/{video => i2c}/s5k6aa.c (100%)
 rename drivers/media/{video => i2c}/saa6588.c (100%)
 rename drivers/media/{video => i2c}/saa7110.c (100%)
 rename drivers/media/{video => i2c}/saa7115.c (100%)
 rename drivers/media/{video => i2c}/saa711x_regs.h (100%)
 rename drivers/media/{video => i2c}/saa7127.c (100%)
 rename drivers/media/{video => i2c}/saa717x.c (100%)
 rename drivers/media/{video => i2c}/saa7185.c (100%)
 rename drivers/media/{video => i2c}/saa7191.c (100%)
 rename drivers/media/{video => i2c}/saa7191.h (100%)
 rename drivers/media/{video => i2c}/smiapp-pll.c (99%)
 rename drivers/media/{video => i2c}/smiapp-pll.h (98%)
 rename drivers/media/{video => i2c}/smiapp/Kconfig (100%)
 rename drivers/media/{video => i2c}/smiapp/Makefile (78%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-core.c (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-limits.c (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-limits.h (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-quirk.c (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-quirk.h (98%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-reg-defs.h (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-reg.h (98%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-regs.c (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-regs.h (100%)
 rename drivers/media/{video => i2c}/smiapp/smiapp.h (99%)
 create mode 100644 drivers/media/i2c/soc_camera/Kconfig
 create mode 100644 drivers/media/i2c/soc_camera/Makefile
 rename drivers/media/{video => i2c/soc_camera}/imx074.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9m001.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9m111.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9t031.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9t112.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9v022.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov2640.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov5642.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov6650.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov772x.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov9640.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov9640.h (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov9740.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/rj54n1cb0c.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/sh_mobile_csi2.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/tw9910.c (100%)
 rename drivers/media/{video => i2c}/sr030pc30.c (100%)
 rename drivers/media/{video => i2c}/tcm825x.c (99%)
 rename drivers/media/{video => i2c}/tcm825x.h (99%)
 rename drivers/media/{video => i2c}/tda7432.c (100%)
 rename drivers/media/{video => i2c}/tda9840.c (100%)
 rename drivers/media/{video => i2c}/tea6415c.c (100%)
 rename drivers/media/{video => i2c}/tea6415c.h (100%)
 rename drivers/media/{video => i2c}/tea6420.c (100%)
 rename drivers/media/{video => i2c}/tea6420.h (100%)
 rename drivers/media/{video => i2c}/ths7303.c (100%)
 rename drivers/media/{video => i2c}/tlv320aic23b.c (100%)
 rename drivers/media/{video => i2c}/tvaudio.c (100%)
 rename drivers/media/{video => i2c}/tveeprom.c (100%)
 rename drivers/media/{video => i2c}/tvp514x.c (99%)
 rename drivers/media/{video => i2c}/tvp514x_regs.h (99%)
 rename drivers/media/{video => i2c}/tvp5150.c (100%)
 rename drivers/media/{video => i2c}/tvp5150_reg.h (100%)
 rename drivers/media/{video => i2c}/tvp7002.c (100%)
 rename drivers/media/{video => i2c}/tvp7002_reg.h (100%)
 rename drivers/media/{video => i2c}/upd64031a.c (100%)
 rename drivers/media/{video => i2c}/upd64083.c (100%)
 rename drivers/media/{video => i2c}/vp27smpx.c (100%)
 rename drivers/media/{video => i2c}/vpx3220.c (100%)
 rename drivers/media/{video => i2c}/vs6624.c (100%)
 rename drivers/media/{video => i2c}/vs6624_regs.h (100%)
 rename drivers/media/{video => i2c}/wm8739.c (100%)
 rename drivers/media/{video => i2c}/wm8775.c (100%)
 create mode 100644 drivers/media/parport/Kconfig
 create mode 100644 drivers/media/parport/Makefile
 rename drivers/media/{video => parport}/bw-qcam.c (100%)
 rename drivers/media/{video => parport}/c-qcam.c (100%)
 rename drivers/media/{video => parport}/pms.c (100%)
 rename drivers/media/{video => parport}/w9966.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bt848.h (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-audio-hook.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-audio-hook.h (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-cards.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-driver.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-gpio.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-i2c.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-if.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-input.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-risc.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-vbi.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv.h (100%)
 rename drivers/media/{video => pci}/bt8xx/bttvp.h (100%)
 rename drivers/media/{video => pci}/cx18/Kconfig (100%)
 rename drivers/media/{video => pci}/cx18/Makefile (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-main.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-mixer.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-mixer.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-pcm.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-pcm.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-audio.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-audio.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-audio.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-core.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-core.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-firmware.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-vbi.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-cards.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-cards.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-controls.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-controls.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-driver.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-driver.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-dvb.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-dvb.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-fileops.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-fileops.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-firmware.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-firmware.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-gpio.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-gpio.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-i2c.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-i2c.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-io.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-io.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-ioctl.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-ioctl.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-irq.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-irq.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-mailbox.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-mailbox.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-queue.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-queue.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-scb.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-scb.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-streams.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-streams.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-vbi.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-vbi.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-version.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-video.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-video.h (100%)
 rename drivers/media/{video => pci}/cx18/cx23418.h (100%)
 rename drivers/media/{video => pci}/cx23885/Kconfig (100%)
 rename drivers/media/{video => pci}/cx23885/Makefile (93%)
 rename drivers/media/{video => pci}/cx23885/altera-ci.c (100%)
 rename drivers/media/{video => pci}/cx23885/altera-ci.h (100%)
 rename drivers/media/{video => pci}/cx23885/cimax2.c (100%)
 rename drivers/media/{video => pci}/cx23885/cimax2.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-417.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-alsa.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-av.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-av.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-cards.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-core.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-dvb.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-f300.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-f300.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-i2c.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-input.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-input.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-ioctl.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-ioctl.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-ir.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-ir.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-reg.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-vbi.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-video.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23888-ir.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23888-ir.h (100%)
 rename drivers/media/{video => pci}/cx23885/netup-eeprom.c (100%)
 rename drivers/media/{video => pci}/cx23885/netup-eeprom.h (100%)
 rename drivers/media/{video => pci}/cx23885/netup-init.c (100%)
 rename drivers/media/{video => pci}/cx23885/netup-init.h (100%)
 rename drivers/media/{video => pci}/cx25821/Kconfig (100%)
 rename drivers/media/{video => pci}/cx25821/Makefile (92%)
 rename drivers/media/{video => pci}/cx25821/cx25821-alsa.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-audio-upstream.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-audio-upstream.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-audio.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-biffuncs.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-cards.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-core.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-gpio.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-i2c.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-medusa-defines.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-medusa-reg.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-medusa-video.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-medusa-video.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-reg.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-sram.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video-upstream-ch2.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video-upstream-ch2.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video-upstream.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video-upstream.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821.h (100%)
 rename drivers/media/{video => pci}/cx88/Kconfig (100%)
 rename drivers/media/{video => pci}/cx88/Makefile (94%)
 rename drivers/media/{video => pci}/cx88/cx88-alsa.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-blackbird.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-cards.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-core.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-dsp.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-dvb.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-i2c.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-input.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-mpeg.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-reg.h (100%)
 rename drivers/media/{video => pci}/cx88/cx88-tvaudio.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-vbi.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-video.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-vp3054-i2c.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-vp3054-i2c.h (100%)
 rename drivers/media/{video => pci}/cx88/cx88.h (100%)
 rename drivers/media/{video => pci}/ivtv/Kconfig (100%)
 rename drivers/media/{video => pci}/ivtv/Makefile (91%)
 rename drivers/media/{video => pci}/ivtv/ivtv-cards.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-cards.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-controls.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-controls.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-driver.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-driver.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-fileops.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-fileops.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-firmware.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-firmware.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-gpio.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-gpio.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-i2c.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-i2c.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-ioctl.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-ioctl.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-irq.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-irq.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-mailbox.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-mailbox.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-queue.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-queue.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-routing.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-routing.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-streams.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-streams.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-udma.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-udma.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-vbi.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-vbi.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-version.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-yuv.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-yuv.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtvfb.c (100%)
 create mode 100644 drivers/media/pci/meye/Kconfig
 create mode 100644 drivers/media/pci/meye/Makefile
 rename drivers/media/{video => pci/meye}/meye.c (100%)
 rename drivers/media/{video => pci/meye}/meye.h (100%)
 rename drivers/media/{video => pci}/saa7134/Kconfig (100%)
 rename drivers/media/{video => pci}/saa7134/Makefile (91%)
 rename drivers/media/{video => pci}/saa7134/saa6752hs.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-alsa.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-cards.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-core.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-dvb.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-empress.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-i2c.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-input.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-reg.h (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-ts.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-tvaudio.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-vbi.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-video.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134.h (100%)
 create mode 100644 drivers/media/pci/saa7146/Kconfig
 create mode 100644 drivers/media/pci/saa7146/Makefile
 rename drivers/media/{video => pci/saa7146}/hexium_gemini.c (100%)
 rename drivers/media/{video => pci/saa7146}/hexium_orion.c (100%)
 rename drivers/media/{video => pci/saa7146}/mxb.c (100%)
 rename drivers/media/{video => pci}/saa7164/Kconfig (100%)
 rename drivers/media/{video => pci}/saa7164/Makefile (90%)
 rename drivers/media/{video => pci}/saa7164/saa7164-api.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-buffer.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-bus.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-cards.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-cmd.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-core.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-dvb.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-encoder.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-fw.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-i2c.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-reg.h (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-types.h (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-vbi.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164.h (100%)
 create mode 100644 drivers/media/pci/sta2x11/Kconfig
 create mode 100644 drivers/media/pci/sta2x11/Makefile
 rename drivers/media/{video => pci/sta2x11}/sta2x11_vip.c (100%)
 rename drivers/media/{video => pci/sta2x11}/sta2x11_vip.h (100%)
 rename drivers/media/{video => pci}/zoran/Kconfig (100%)
 rename drivers/media/{video => pci}/zoran/Makefile (100%)
 rename drivers/media/{video => pci}/zoran/videocodec.c (100%)
 rename drivers/media/{video => pci}/zoran/videocodec.h (100%)
 rename drivers/media/{video => pci}/zoran/zoran.h (100%)
 rename drivers/media/{video => pci}/zoran/zoran_card.c (100%)
 rename drivers/media/{video => pci}/zoran/zoran_card.h (100%)
 rename drivers/media/{video => pci}/zoran/zoran_device.c (100%)
 rename drivers/media/{video => pci}/zoran/zoran_device.h (100%)
 rename drivers/media/{video => pci}/zoran/zoran_driver.c (100%)
 rename drivers/media/{video => pci}/zoran/zoran_procfs.c (100%)
 rename drivers/media/{video => pci}/zoran/zoran_procfs.h (100%)
 rename drivers/media/{video => pci}/zoran/zr36016.c (100%)
 rename drivers/media/{video => pci}/zoran/zr36016.h (100%)
 rename drivers/media/{video => pci}/zoran/zr36050.c (100%)
 rename drivers/media/{video => pci}/zoran/zr36050.h (100%)
 rename drivers/media/{video => pci}/zoran/zr36057.h (100%)
 rename drivers/media/{video => pci}/zoran/zr36060.c (100%)
 rename drivers/media/{video => pci}/zoran/zr36060.h (100%)
 create mode 100644 drivers/media/platform/Kconfig
 create mode 100644 drivers/media/platform/Makefile
 rename drivers/media/{video => platform}/arv.c (100%)
 rename drivers/media/{video => platform}/atmel-isi.c (100%)
 rename drivers/media/{video => platform}/blackfin/Kconfig (100%)
 rename drivers/media/{video => platform}/blackfin/Makefile (100%)
 rename drivers/media/{video => platform}/blackfin/bfin_capture.c (100%)
 rename drivers/media/{video => platform}/blackfin/ppi.c (100%)
 rename drivers/media/{video => platform}/coda.c (100%)
 rename drivers/media/{video => platform}/coda.h (99%)
 rename drivers/media/{video => platform}/davinci/Kconfig (100%)
 rename drivers/media/{video => platform}/davinci/Makefile (100%)
 rename drivers/media/{video => platform}/davinci/ccdc_hw_device.h (100%)
 rename drivers/media/{video => platform}/davinci/dm355_ccdc.c (100%)
 rename drivers/media/{video => platform}/davinci/dm355_ccdc_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/dm644x_ccdc.c (100%)
 rename drivers/media/{video => platform}/davinci/dm644x_ccdc_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/isif.c (100%)
 rename drivers/media/{video => platform}/davinci/isif_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/vpbe.c (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_display.c (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_osd.c (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_osd_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_venc.c (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_venc_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/vpfe_capture.c (100%)
 rename drivers/media/{video => platform}/davinci/vpif.c (100%)
 rename drivers/media/{video => platform}/davinci/vpif.h (100%)
 rename drivers/media/{video => platform}/davinci/vpif_capture.c (100%)
 rename drivers/media/{video => platform}/davinci/vpif_capture.h (100%)
 rename drivers/media/{video => platform}/davinci/vpif_display.c (100%)
 rename drivers/media/{video => platform}/davinci/vpif_display.h (100%)
 rename drivers/media/{video => platform}/davinci/vpss.c (100%)
 rename drivers/media/{video => platform}/fsl-viu.c (100%)
 rename drivers/media/{video => platform}/indycam.c (100%)
 rename drivers/media/{video => platform}/indycam.h (100%)
 rename drivers/media/{video => platform}/m2m-deinterlace.c (100%)
 rename drivers/media/{video => platform}/marvell-ccic/Kconfig (100%)
 rename drivers/media/{video => platform}/marvell-ccic/Makefile (100%)
 rename drivers/media/{video => platform}/marvell-ccic/cafe-driver.c (100%)
 rename drivers/media/{video => platform}/marvell-ccic/mcam-core.c (100%)
 rename drivers/media/{video => platform}/marvell-ccic/mcam-core.h (100%)
 rename drivers/media/{video => platform}/marvell-ccic/mmp-driver.c (100%)
 rename drivers/media/{video => platform}/mem2mem_testdev.c (100%)
 rename drivers/media/{video => platform}/mx1_camera.c (100%)
 rename drivers/media/{video => platform}/mx2_camera.c (100%)
 rename drivers/media/{video => platform}/mx2_emmaprp.c (100%)
 rename drivers/media/{video => platform}/mx3_camera.c (100%)
 rename drivers/media/{video => platform}/omap/Kconfig (100%)
 rename drivers/media/{video => platform}/omap/Makefile (100%)
 rename drivers/media/{video => platform}/omap/omap_vout.c (100%)
 rename drivers/media/{video => platform}/omap/omap_vout_vrfb.c (100%)
 rename drivers/media/{video => platform}/omap/omap_vout_vrfb.h (100%)
 rename drivers/media/{video => platform}/omap/omap_voutdef.h (100%)
 rename drivers/media/{video => platform}/omap/omap_voutlib.c (100%)
 rename drivers/media/{video => platform}/omap/omap_voutlib.h (100%)
 rename drivers/media/{video => platform}/omap1_camera.c (99%)
 rename drivers/media/{video => platform}/omap24xxcam-dma.c (99%)
 rename drivers/media/{video => platform}/omap24xxcam.c (99%)
 rename drivers/media/{video => platform}/omap24xxcam.h (99%)
 rename drivers/media/{video => platform}/omap3isp/Makefile (100%)
 rename drivers/media/{video => platform}/omap3isp/cfa_coef_table.h (100%)
 rename drivers/media/{video => platform}/omap3isp/gamma_table.h (100%)
 rename drivers/media/{video => platform}/omap3isp/isp.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isp.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispccdc.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispccdc.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispccp2.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispccp2.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispcsi2.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispcsi2.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispcsiphy.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispcsiphy.h (100%)
 rename drivers/media/{video => platform}/omap3isp/isph3a.h (100%)
 rename drivers/media/{video => platform}/omap3isp/isph3a_aewb.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isph3a_af.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isphist.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isphist.h (100%)
 rename drivers/media/{video => platform}/omap3isp/isppreview.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isppreview.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispqueue.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispqueue.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispreg.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispresizer.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispresizer.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispstat.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispstat.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispvideo.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispvideo.h (100%)
 rename drivers/media/{video => platform}/omap3isp/luma_enhance_table.h (100%)
 rename drivers/media/{video => platform}/omap3isp/noise_filter_table.h (100%)
 rename drivers/media/{video => platform}/pxa_camera.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/Kconfig (100%)
 rename drivers/media/{video => platform}/s5p-fimc/Makefile (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-capture.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-core.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-core.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-lite-reg.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-lite-reg.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-lite.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-lite.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-m2m.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-mdevice.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-mdevice.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-reg.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-reg.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/mipi-csis.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/mipi-csis.h (100%)
 rename drivers/media/{video => platform}/s5p-g2d/Makefile (100%)
 rename drivers/media/{video => platform}/s5p-g2d/g2d-hw.c (100%)
 rename drivers/media/{video => platform}/s5p-g2d/g2d-regs.h (100%)
 rename drivers/media/{video => platform}/s5p-g2d/g2d.c (100%)
 rename drivers/media/{video => platform}/s5p-g2d/g2d.h (100%)
 rename drivers/media/{video => platform}/s5p-jpeg/Makefile (100%)
 rename drivers/media/{video => platform}/s5p-jpeg/jpeg-core.c (99%)
 rename drivers/media/{video => platform}/s5p-jpeg/jpeg-core.h (98%)
 rename drivers/media/{video => platform}/s5p-jpeg/jpeg-hw.h (99%)
 rename drivers/media/{video => platform}/s5p-jpeg/jpeg-regs.h (98%)
 rename drivers/media/{video => platform}/s5p-mfc/Makefile (100%)
 rename drivers/media/{video => platform}/s5p-mfc/regs-mfc.h (100%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc.c (100%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_cmd.c (98%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_cmd.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_common.h (100%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_ctrl.c (99%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_ctrl.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_debug.h (95%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_dec.c (99%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_dec.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_enc.c (99%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_enc.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_intr.c (97%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_intr.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_opr.c (99%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_opr.h (98%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_pm.c (98%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_pm.h (92%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_shm.c (96%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_shm.h (98%)
 rename drivers/media/{video => platform}/s5p-tv/Kconfig (98%)
 rename drivers/media/{video => platform}/s5p-tv/Makefile (92%)
 rename drivers/media/{video => platform}/s5p-tv/hdmi_drv.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/hdmiphy_drv.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer.h (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_drv.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_grp_layer.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_reg.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_video.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_vp_layer.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/regs-hdmi.h (100%)
 rename drivers/media/{video => platform}/s5p-tv/regs-mixer.h (100%)
 rename drivers/media/{video => platform}/s5p-tv/regs-sdo.h (97%)
 rename drivers/media/{video => platform}/s5p-tv/regs-vp.h (100%)
 rename drivers/media/{video => platform}/s5p-tv/sdo_drv.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/sii9234_drv.c (100%)
 rename drivers/media/{video => platform}/sh_mobile_ceu_camera.c (100%)
 rename drivers/media/{video => platform}/sh_vou.c (100%)
 rename drivers/media/{video => platform}/soc_camera.c (100%)
 rename drivers/media/{video => platform}/soc_camera_platform.c (100%)
 rename drivers/media/{video => platform}/soc_mediabus.c (100%)
 rename drivers/media/{video => platform}/timblogiw.c (100%)
 rename drivers/media/{video => platform}/via-camera.c (100%)
 rename drivers/media/{video => platform}/via-camera.h (100%)
 rename drivers/media/{video => platform}/vino.c (100%)
 rename drivers/media/{video => platform}/vino.h (100%)
 rename drivers/media/{video => platform}/vivi.c (100%)
 rename drivers/media/{video => usb}/au0828/Kconfig (100%)
 rename drivers/media/{video => usb}/au0828/Makefile (100%)
 rename drivers/media/{video => usb}/au0828/au0828-cards.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-cards.h (100%)
 rename drivers/media/{video => usb}/au0828/au0828-core.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-dvb.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-i2c.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-reg.h (100%)
 rename drivers/media/{video => usb}/au0828/au0828-vbi.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-video.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828.h (100%)
 rename drivers/media/{video => usb}/cpia2/Kconfig (100%)
 rename drivers/media/{video => usb}/cpia2/Makefile (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2.h (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2_core.c (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2_registers.h (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2_usb.c (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2_v4l.c (100%)
 rename drivers/media/{video => usb}/cx231xx/Kconfig (100%)
 rename drivers/media/{video => usb}/cx231xx/Makefile (93%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-417.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-audio.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-avcore.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-cards.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-conf-reg.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-core.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-dif.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-dvb.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-i2c.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-input.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-pcb-cfg.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-pcb-cfg.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-reg.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-vbi.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-vbi.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-video.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx.h (100%)
 rename drivers/media/{video => usb}/em28xx/Kconfig (100%)
 rename drivers/media/{video => usb}/em28xx/Makefile (92%)
 rename drivers/media/{video => usb}/em28xx/em28xx-audio.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-cards.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-core.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-dvb.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-i2c.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-input.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-reg.h (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-vbi.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-video.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx.h (100%)
 rename drivers/media/{video => usb}/gspca/Kconfig (98%)
 rename drivers/media/{video => usb}/gspca/Makefile (100%)
 rename drivers/media/{video => usb}/gspca/autogain_functions.c (100%)
 rename drivers/media/{video => usb}/gspca/autogain_functions.h (100%)
 rename drivers/media/{video => usb}/gspca/benq.c (100%)
 rename drivers/media/{video => usb}/gspca/conex.c (100%)
 rename drivers/media/{video => usb}/gspca/cpia1.c (100%)
 rename drivers/media/{video => usb}/gspca/etoms.c (100%)
 rename drivers/media/{video => usb}/gspca/finepix.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/Kconfig (100%)
 rename drivers/media/{video => usb}/gspca/gl860/Makefile (75%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860-mi1320.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860-mi2020.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860-ov2640.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860-ov9655.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860.h (100%)
 rename drivers/media/{video => usb}/gspca/gspca.c (100%)
 rename drivers/media/{video => usb}/gspca/gspca.h (100%)
 rename drivers/media/{video => usb}/gspca/jeilinj.c (100%)
 rename drivers/media/{video => usb}/gspca/jl2005bcd.c (100%)
 rename drivers/media/{video => usb}/gspca/jpeg.h (100%)
 rename drivers/media/{video => usb}/gspca/kinect.c (100%)
 rename drivers/media/{video => usb}/gspca/konica.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/Kconfig (100%)
 rename drivers/media/{video => usb}/gspca/m5602/Makefile (80%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_bridge.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_core.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_mt9m111.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_mt9m111.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_ov7660.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_ov7660.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_ov9650.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_ov9650.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_po1030.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_po1030.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_s5k4aa.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_s5k4aa.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_s5k83a.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_s5k83a.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_sensor.h (100%)
 rename drivers/media/{video => usb}/gspca/mars.c (100%)
 rename drivers/media/{video => usb}/gspca/mr97310a.c (100%)
 rename drivers/media/{video => usb}/gspca/nw80x.c (100%)
 rename drivers/media/{video => usb}/gspca/ov519.c (100%)
 rename drivers/media/{video => usb}/gspca/ov534.c (100%)
 rename drivers/media/{video => usb}/gspca/ov534_9.c (100%)
 rename drivers/media/{video => usb}/gspca/pac207.c (100%)
 rename drivers/media/{video => usb}/gspca/pac7302.c (100%)
 rename drivers/media/{video => usb}/gspca/pac7311.c (100%)
 rename drivers/media/{video => usb}/gspca/pac_common.h (100%)
 rename drivers/media/{video => usb}/gspca/se401.c (100%)
 rename drivers/media/{video => usb}/gspca/se401.h (100%)
 rename drivers/media/{video => usb}/gspca/sn9c2028.c (100%)
 rename drivers/media/{video => usb}/gspca/sn9c2028.h (100%)
 rename drivers/media/{video => usb}/gspca/sn9c20x.c (100%)
 rename drivers/media/{video => usb}/gspca/sonixb.c (100%)
 rename drivers/media/{video => usb}/gspca/sonixj.c (100%)
 rename drivers/media/{video => usb}/gspca/spca1528.c (100%)
 rename drivers/media/{video => usb}/gspca/spca500.c (100%)
 rename drivers/media/{video => usb}/gspca/spca501.c (100%)
 rename drivers/media/{video => usb}/gspca/spca505.c (100%)
 rename drivers/media/{video => usb}/gspca/spca506.c (100%)
 rename drivers/media/{video => usb}/gspca/spca508.c (100%)
 rename drivers/media/{video => usb}/gspca/spca561.c (100%)
 rename drivers/media/{video => usb}/gspca/sq905.c (100%)
 rename drivers/media/{video => usb}/gspca/sq905c.c (100%)
 rename drivers/media/{video => usb}/gspca/sq930x.c (100%)
 rename drivers/media/{video => usb}/gspca/stk014.c (100%)
 rename drivers/media/{video => usb}/gspca/stv0680.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/Kconfig (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/Makefile (78%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_hdcs.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_hdcs.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_pb0100.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_pb0100.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_sensor.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_st6422.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_st6422.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_vv6410.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_vv6410.h (100%)
 rename drivers/media/{video => usb}/gspca/sunplus.c (100%)
 rename drivers/media/{video => usb}/gspca/t613.c (100%)
 rename drivers/media/{video => usb}/gspca/topro.c (100%)
 rename drivers/media/{video => usb}/gspca/tv8532.c (100%)
 rename drivers/media/{video => usb}/gspca/vc032x.c (100%)
 rename drivers/media/{video => usb}/gspca/vicam.c (100%)
 rename drivers/media/{video => usb}/gspca/w996Xcf.c (100%)
 rename drivers/media/{video => usb}/gspca/xirlink_cit.c (100%)
 rename drivers/media/{video => usb}/gspca/zc3xx-reg.h (100%)
 rename drivers/media/{video => usb}/gspca/zc3xx.c (100%)
 rename drivers/media/{video => usb}/hdpvr/Kconfig (100%)
 rename drivers/media/{video => usb}/hdpvr/Makefile (81%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr-control.c (100%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr-core.c (100%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr-i2c.c (100%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr-video.c (100%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/Kconfig (100%)
 rename drivers/media/{video => usb}/pvrusb2/Makefile (95%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-audio.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-audio.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-context.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-context.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-cs53l32a.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-cs53l32a.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-ctrl.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-ctrl.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-cx2584x-v4l.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-cx2584x-v4l.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-debug.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-debugifc.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-debugifc.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-devattr.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-devattr.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-dvb.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-dvb.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-eeprom.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-eeprom.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-encoder.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-encoder.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-fx2-cmd.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw-internal.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-i2c-core.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-i2c-core.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-io.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-io.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-ioread.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-ioread.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-main.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-std.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-std.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-sysfs.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-sysfs.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-util.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-v4l2.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-v4l2.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-video-v4l.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-video-v4l.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-wm8775.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-wm8775.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2.h (100%)
 rename drivers/media/{video => usb}/pwc/Kconfig (100%)
 rename drivers/media/{video => usb}/pwc/Makefile (100%)
 rename drivers/media/{video => usb}/pwc/philips.txt (100%)
 rename drivers/media/{video => usb}/pwc/pwc-ctrl.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-dec1.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-dec1.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-dec23.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-dec23.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-if.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-kiara.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-kiara.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-misc.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-nala.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-timon.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-timon.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-uncompress.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-v4l.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc.h (100%)
 create mode 100644 drivers/media/usb/s2255/Kconfig
 create mode 100644 drivers/media/usb/s2255/Makefile
 rename drivers/media/{video => usb/s2255}/s2255drv.c (100%)
 rename drivers/media/{video => usb}/sn9c102/Kconfig (100%)
 rename drivers/media/{video => usb}/sn9c102/Makefile (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102.h (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_config.h (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_core.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_devtable.h (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_hv7131d.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_hv7131r.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_mi0343.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_mi0360.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_mt9v111.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_ov7630.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_ov7660.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_pas106b.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_pas202bcb.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_sensor.h (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_tas5110c1b.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_tas5110d.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_tas5130d1b.c (100%)
 rename drivers/media/{video => usb}/stk1160/Kconfig (100%)
 rename drivers/media/{video => usb}/stk1160/Makefile (86%)
 rename drivers/media/{video => usb}/stk1160/stk1160-ac97.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-core.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-i2c.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-reg.h (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-v4l.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-video.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160.h (100%)
 create mode 100644 drivers/media/usb/stkwebcam/Kconfig
 create mode 100644 drivers/media/usb/stkwebcam/Makefile
 rename drivers/media/{video => usb/stkwebcam}/stk-sensor.c (100%)
 rename drivers/media/{video => usb/stkwebcam}/stk-webcam.c (100%)
 rename drivers/media/{video => usb/stkwebcam}/stk-webcam.h (100%)
 rename drivers/media/{video => usb}/tlg2300/Kconfig (100%)
 rename drivers/media/{video => usb}/tlg2300/Makefile (86%)
 rename drivers/media/{video => usb}/tlg2300/pd-alsa.c (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-common.h (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-dvb.c (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-main.c (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-radio.c (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-video.c (100%)
 rename drivers/media/{video => usb}/tlg2300/vendorcmds.h (100%)
 rename drivers/media/{video => usb}/tm6000/Kconfig (100%)
 rename drivers/media/{video => usb}/tm6000/Makefile (91%)
 rename drivers/media/{video => usb}/tm6000/tm6000-alsa.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-cards.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-core.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-dvb.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-i2c.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-input.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-regs.h (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-stds.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-usb-isoc.h (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-video.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000.h (100%)
 rename drivers/media/{video => usb}/usbvision/Kconfig (100%)
 rename drivers/media/{video => usb}/usbvision/Makefile (83%)
 rename drivers/media/{video => usb}/usbvision/usbvision-cards.c (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision-cards.h (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision-core.c (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision-i2c.c (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision-video.c (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision.h (100%)
 rename drivers/media/{video => usb}/uvc/Kconfig (100%)
 rename drivers/media/{video => usb}/uvc/Makefile (100%)
 rename drivers/media/{video => usb}/uvc/uvc_ctrl.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_debugfs.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_driver.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_entity.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_isight.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_queue.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_status.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_v4l2.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_video.c (100%)
 rename drivers/media/{video => usb}/uvc/uvcvideo.h (100%)
 create mode 100644 drivers/media/usb/zr364xx/Kconfig
 create mode 100644 drivers/media/usb/zr364xx/Makefile
 rename drivers/media/{video => usb/zr364xx}/zr364xx.c (100%)
 delete mode 100644 drivers/media/video/Kconfig
 delete mode 100644 drivers/media/video/Makefile
 delete mode 100644 drivers/media/video/bt8xx/Kconfig
 delete mode 100644 drivers/media/video/bt8xx/Makefile

-- 
1.7.11.2


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 01/12] [media] rename most media/video usb drivers to media/usb
  2012-08-15 13:48   ` Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 02/12] [media] move the remaining USB drivers to drivers/media/usb Mauro Carvalho Chehab
                       ` (10 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Rename all USB drivers with their own directory under
drivers/media/video into drivers/media/usb and update the
building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 MAINTAINERS                                        | 22 ++++++------
 drivers/media/usb/Kconfig                          | 41 +++++++++++++++++++---
 drivers/media/usb/Makefile                         | 14 ++++++++
 drivers/media/{video => usb}/au0828/Kconfig        |  0
 drivers/media/{video => usb}/au0828/Makefile       |  0
 drivers/media/{video => usb}/au0828/au0828-cards.c |  0
 drivers/media/{video => usb}/au0828/au0828-cards.h |  0
 drivers/media/{video => usb}/au0828/au0828-core.c  |  0
 drivers/media/{video => usb}/au0828/au0828-dvb.c   |  0
 drivers/media/{video => usb}/au0828/au0828-i2c.c   |  0
 drivers/media/{video => usb}/au0828/au0828-reg.h   |  0
 drivers/media/{video => usb}/au0828/au0828-vbi.c   |  0
 drivers/media/{video => usb}/au0828/au0828-video.c |  0
 drivers/media/{video => usb}/au0828/au0828.h       |  0
 drivers/media/{video => usb}/cpia2/Kconfig         |  0
 drivers/media/{video => usb}/cpia2/Makefile        |  0
 drivers/media/{video => usb}/cpia2/cpia2.h         |  0
 drivers/media/{video => usb}/cpia2/cpia2_core.c    |  0
 .../media/{video => usb}/cpia2/cpia2_registers.h   |  0
 drivers/media/{video => usb}/cpia2/cpia2_usb.c     |  0
 drivers/media/{video => usb}/cpia2/cpia2_v4l.c     |  0
 drivers/media/{video => usb}/cx231xx/Kconfig       |  0
 drivers/media/{video => usb}/cx231xx/Makefile      |  0
 drivers/media/{video => usb}/cx231xx/cx231xx-417.c |  0
 .../media/{video => usb}/cx231xx/cx231xx-audio.c   |  0
 .../media/{video => usb}/cx231xx/cx231xx-avcore.c  |  0
 .../media/{video => usb}/cx231xx/cx231xx-cards.c   |  0
 .../{video => usb}/cx231xx/cx231xx-conf-reg.h      |  0
 .../media/{video => usb}/cx231xx/cx231xx-core.c    |  0
 drivers/media/{video => usb}/cx231xx/cx231xx-dif.h |  0
 drivers/media/{video => usb}/cx231xx/cx231xx-dvb.c |  0
 drivers/media/{video => usb}/cx231xx/cx231xx-i2c.c |  0
 .../media/{video => usb}/cx231xx/cx231xx-input.c   |  0
 .../media/{video => usb}/cx231xx/cx231xx-pcb-cfg.c |  0
 .../media/{video => usb}/cx231xx/cx231xx-pcb-cfg.h |  0
 drivers/media/{video => usb}/cx231xx/cx231xx-reg.h |  0
 drivers/media/{video => usb}/cx231xx/cx231xx-vbi.c |  0
 drivers/media/{video => usb}/cx231xx/cx231xx-vbi.h |  0
 .../media/{video => usb}/cx231xx/cx231xx-video.c   |  0
 drivers/media/{video => usb}/cx231xx/cx231xx.h     |  0
 drivers/media/{video => usb}/em28xx/Kconfig        |  0
 drivers/media/{video => usb}/em28xx/Makefile       |  0
 drivers/media/{video => usb}/em28xx/em28xx-audio.c |  0
 drivers/media/{video => usb}/em28xx/em28xx-cards.c |  0
 drivers/media/{video => usb}/em28xx/em28xx-core.c  |  0
 drivers/media/{video => usb}/em28xx/em28xx-dvb.c   |  0
 drivers/media/{video => usb}/em28xx/em28xx-i2c.c   |  0
 drivers/media/{video => usb}/em28xx/em28xx-input.c |  0
 drivers/media/{video => usb}/em28xx/em28xx-reg.h   |  0
 drivers/media/{video => usb}/em28xx/em28xx-vbi.c   |  0
 drivers/media/{video => usb}/em28xx/em28xx-video.c |  0
 drivers/media/{video => usb}/em28xx/em28xx.h       |  0
 drivers/media/{video => usb}/gspca/Kconfig         |  6 ++--
 drivers/media/{video => usb}/gspca/Makefile        |  0
 .../{video => usb}/gspca/autogain_functions.c      |  0
 .../{video => usb}/gspca/autogain_functions.h      |  0
 drivers/media/{video => usb}/gspca/benq.c          |  0
 drivers/media/{video => usb}/gspca/conex.c         |  0
 drivers/media/{video => usb}/gspca/cpia1.c         |  0
 drivers/media/{video => usb}/gspca/etoms.c         |  0
 drivers/media/{video => usb}/gspca/finepix.c       |  0
 drivers/media/{video => usb}/gspca/gl860/Kconfig   |  0
 drivers/media/{video => usb}/gspca/gl860/Makefile  |  2 +-
 .../{video => usb}/gspca/gl860/gl860-mi1320.c      |  0
 .../{video => usb}/gspca/gl860/gl860-mi2020.c      |  0
 .../{video => usb}/gspca/gl860/gl860-ov2640.c      |  0
 .../{video => usb}/gspca/gl860/gl860-ov9655.c      |  0
 drivers/media/{video => usb}/gspca/gl860/gl860.c   |  0
 drivers/media/{video => usb}/gspca/gl860/gl860.h   |  0
 drivers/media/{video => usb}/gspca/gspca.c         |  0
 drivers/media/{video => usb}/gspca/gspca.h         |  0
 drivers/media/{video => usb}/gspca/jeilinj.c       |  0
 drivers/media/{video => usb}/gspca/jl2005bcd.c     |  0
 drivers/media/{video => usb}/gspca/jpeg.h          |  0
 drivers/media/{video => usb}/gspca/kinect.c        |  0
 drivers/media/{video => usb}/gspca/konica.c        |  0
 drivers/media/{video => usb}/gspca/m5602/Kconfig   |  0
 drivers/media/{video => usb}/gspca/m5602/Makefile  |  2 +-
 .../{video => usb}/gspca/m5602/m5602_bridge.h      |  0
 .../media/{video => usb}/gspca/m5602/m5602_core.c  |  0
 .../{video => usb}/gspca/m5602/m5602_mt9m111.c     |  0
 .../{video => usb}/gspca/m5602/m5602_mt9m111.h     |  0
 .../{video => usb}/gspca/m5602/m5602_ov7660.c      |  0
 .../{video => usb}/gspca/m5602/m5602_ov7660.h      |  0
 .../{video => usb}/gspca/m5602/m5602_ov9650.c      |  0
 .../{video => usb}/gspca/m5602/m5602_ov9650.h      |  0
 .../{video => usb}/gspca/m5602/m5602_po1030.c      |  0
 .../{video => usb}/gspca/m5602/m5602_po1030.h      |  0
 .../{video => usb}/gspca/m5602/m5602_s5k4aa.c      |  0
 .../{video => usb}/gspca/m5602/m5602_s5k4aa.h      |  0
 .../{video => usb}/gspca/m5602/m5602_s5k83a.c      |  0
 .../{video => usb}/gspca/m5602/m5602_s5k83a.h      |  0
 .../{video => usb}/gspca/m5602/m5602_sensor.h      |  0
 drivers/media/{video => usb}/gspca/mars.c          |  0
 drivers/media/{video => usb}/gspca/mr97310a.c      |  0
 drivers/media/{video => usb}/gspca/nw80x.c         |  0
 drivers/media/{video => usb}/gspca/ov519.c         |  0
 drivers/media/{video => usb}/gspca/ov534.c         |  0
 drivers/media/{video => usb}/gspca/ov534_9.c       |  0
 drivers/media/{video => usb}/gspca/pac207.c        |  0
 drivers/media/{video => usb}/gspca/pac7302.c       |  0
 drivers/media/{video => usb}/gspca/pac7311.c       |  0
 drivers/media/{video => usb}/gspca/pac_common.h    |  0
 drivers/media/{video => usb}/gspca/se401.c         |  0
 drivers/media/{video => usb}/gspca/se401.h         |  0
 drivers/media/{video => usb}/gspca/sn9c2028.c      |  0
 drivers/media/{video => usb}/gspca/sn9c2028.h      |  0
 drivers/media/{video => usb}/gspca/sn9c20x.c       |  0
 drivers/media/{video => usb}/gspca/sonixb.c        |  0
 drivers/media/{video => usb}/gspca/sonixj.c        |  0
 drivers/media/{video => usb}/gspca/spca1528.c      |  0
 drivers/media/{video => usb}/gspca/spca500.c       |  0
 drivers/media/{video => usb}/gspca/spca501.c       |  0
 drivers/media/{video => usb}/gspca/spca505.c       |  0
 drivers/media/{video => usb}/gspca/spca506.c       |  0
 drivers/media/{video => usb}/gspca/spca508.c       |  0
 drivers/media/{video => usb}/gspca/spca561.c       |  0
 drivers/media/{video => usb}/gspca/sq905.c         |  0
 drivers/media/{video => usb}/gspca/sq905c.c        |  0
 drivers/media/{video => usb}/gspca/sq930x.c        |  0
 drivers/media/{video => usb}/gspca/stk014.c        |  0
 drivers/media/{video => usb}/gspca/stv0680.c       |  0
 drivers/media/{video => usb}/gspca/stv06xx/Kconfig |  0
 .../media/{video => usb}/gspca/stv06xx/Makefile    |  2 +-
 .../media/{video => usb}/gspca/stv06xx/stv06xx.c   |  0
 .../media/{video => usb}/gspca/stv06xx/stv06xx.h   |  0
 .../{video => usb}/gspca/stv06xx/stv06xx_hdcs.c    |  0
 .../{video => usb}/gspca/stv06xx/stv06xx_hdcs.h    |  0
 .../{video => usb}/gspca/stv06xx/stv06xx_pb0100.c  |  0
 .../{video => usb}/gspca/stv06xx/stv06xx_pb0100.h  |  0
 .../{video => usb}/gspca/stv06xx/stv06xx_sensor.h  |  0
 .../{video => usb}/gspca/stv06xx/stv06xx_st6422.c  |  0
 .../{video => usb}/gspca/stv06xx/stv06xx_st6422.h  |  0
 .../{video => usb}/gspca/stv06xx/stv06xx_vv6410.c  |  0
 .../{video => usb}/gspca/stv06xx/stv06xx_vv6410.h  |  0
 drivers/media/{video => usb}/gspca/sunplus.c       |  0
 drivers/media/{video => usb}/gspca/t613.c          |  0
 drivers/media/{video => usb}/gspca/topro.c         |  0
 drivers/media/{video => usb}/gspca/tv8532.c        |  0
 drivers/media/{video => usb}/gspca/vc032x.c        |  0
 drivers/media/{video => usb}/gspca/vicam.c         |  0
 drivers/media/{video => usb}/gspca/w996Xcf.c       |  0
 drivers/media/{video => usb}/gspca/xirlink_cit.c   |  0
 drivers/media/{video => usb}/gspca/zc3xx-reg.h     |  0
 drivers/media/{video => usb}/gspca/zc3xx.c         |  0
 drivers/media/{video => usb}/hdpvr/Kconfig         |  0
 drivers/media/{video => usb}/hdpvr/Makefile        |  0
 drivers/media/{video => usb}/hdpvr/hdpvr-control.c |  0
 drivers/media/{video => usb}/hdpvr/hdpvr-core.c    |  0
 drivers/media/{video => usb}/hdpvr/hdpvr-i2c.c     |  0
 drivers/media/{video => usb}/hdpvr/hdpvr-video.c   |  0
 drivers/media/{video => usb}/hdpvr/hdpvr.h         |  0
 drivers/media/{video => usb}/pvrusb2/Kconfig       |  0
 drivers/media/{video => usb}/pvrusb2/Makefile      |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-audio.c   |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-audio.h   |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-context.c |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-context.h |  0
 .../{video => usb}/pvrusb2/pvrusb2-cs53l32a.c      |  0
 .../{video => usb}/pvrusb2/pvrusb2-cs53l32a.h      |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-ctrl.c    |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-ctrl.h    |  0
 .../{video => usb}/pvrusb2/pvrusb2-cx2584x-v4l.c   |  0
 .../{video => usb}/pvrusb2/pvrusb2-cx2584x-v4l.h   |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-debug.h   |  0
 .../{video => usb}/pvrusb2/pvrusb2-debugifc.c      |  0
 .../{video => usb}/pvrusb2/pvrusb2-debugifc.h      |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-devattr.c |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-devattr.h |  0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-dvb.c |  0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-dvb.h |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-eeprom.c  |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-eeprom.h  |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-encoder.c |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-encoder.h |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-fx2-cmd.h |  0
 .../{video => usb}/pvrusb2/pvrusb2-hdw-internal.h  |  0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw.c |  0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw.h |  0
 .../{video => usb}/pvrusb2/pvrusb2-i2c-core.c      |  0
 .../{video => usb}/pvrusb2/pvrusb2-i2c-core.h      |  0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-io.c  |  0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-io.h  |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-ioread.c  |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-ioread.h  |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-main.c    |  0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-std.c |  0
 drivers/media/{video => usb}/pvrusb2/pvrusb2-std.h |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-sysfs.c   |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-sysfs.h   |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-util.h    |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-v4l2.c    |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-v4l2.h    |  0
 .../{video => usb}/pvrusb2/pvrusb2-video-v4l.c     |  0
 .../{video => usb}/pvrusb2/pvrusb2-video-v4l.h     |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-wm8775.c  |  0
 .../media/{video => usb}/pvrusb2/pvrusb2-wm8775.h  |  0
 drivers/media/{video => usb}/pvrusb2/pvrusb2.h     |  0
 drivers/media/{video => usb}/pwc/Kconfig           |  0
 drivers/media/{video => usb}/pwc/Makefile          |  0
 drivers/media/{video => usb}/pwc/philips.txt       |  0
 drivers/media/{video => usb}/pwc/pwc-ctrl.c        |  0
 drivers/media/{video => usb}/pwc/pwc-dec1.c        |  0
 drivers/media/{video => usb}/pwc/pwc-dec1.h        |  0
 drivers/media/{video => usb}/pwc/pwc-dec23.c       |  0
 drivers/media/{video => usb}/pwc/pwc-dec23.h       |  0
 drivers/media/{video => usb}/pwc/pwc-if.c          |  0
 drivers/media/{video => usb}/pwc/pwc-kiara.c       |  0
 drivers/media/{video => usb}/pwc/pwc-kiara.h       |  0
 drivers/media/{video => usb}/pwc/pwc-misc.c        |  0
 drivers/media/{video => usb}/pwc/pwc-nala.h        |  0
 drivers/media/{video => usb}/pwc/pwc-timon.c       |  0
 drivers/media/{video => usb}/pwc/pwc-timon.h       |  0
 drivers/media/{video => usb}/pwc/pwc-uncompress.c  |  0
 drivers/media/{video => usb}/pwc/pwc-v4l.c         |  0
 drivers/media/{video => usb}/pwc/pwc.h             |  0
 drivers/media/{video => usb}/sn9c102/Kconfig       |  0
 drivers/media/{video => usb}/sn9c102/Makefile      |  0
 drivers/media/{video => usb}/sn9c102/sn9c102.h     |  0
 .../media/{video => usb}/sn9c102/sn9c102_config.h  |  0
 .../media/{video => usb}/sn9c102/sn9c102_core.c    |  0
 .../{video => usb}/sn9c102/sn9c102_devtable.h      |  0
 .../media/{video => usb}/sn9c102/sn9c102_hv7131d.c |  0
 .../media/{video => usb}/sn9c102/sn9c102_hv7131r.c |  0
 .../media/{video => usb}/sn9c102/sn9c102_mi0343.c  |  0
 .../media/{video => usb}/sn9c102/sn9c102_mi0360.c  |  0
 .../media/{video => usb}/sn9c102/sn9c102_mt9v111.c |  0
 .../media/{video => usb}/sn9c102/sn9c102_ov7630.c  |  0
 .../media/{video => usb}/sn9c102/sn9c102_ov7660.c  |  0
 .../media/{video => usb}/sn9c102/sn9c102_pas106b.c |  0
 .../{video => usb}/sn9c102/sn9c102_pas202bcb.c     |  0
 .../media/{video => usb}/sn9c102/sn9c102_sensor.h  |  0
 .../{video => usb}/sn9c102/sn9c102_tas5110c1b.c    |  0
 .../{video => usb}/sn9c102/sn9c102_tas5110d.c      |  0
 .../{video => usb}/sn9c102/sn9c102_tas5130d1b.c    |  0
 drivers/media/{video => usb}/stk1160/Kconfig       |  0
 drivers/media/{video => usb}/stk1160/Makefile      |  0
 .../media/{video => usb}/stk1160/stk1160-ac97.c    |  0
 .../media/{video => usb}/stk1160/stk1160-core.c    |  0
 drivers/media/{video => usb}/stk1160/stk1160-i2c.c |  0
 drivers/media/{video => usb}/stk1160/stk1160-reg.h |  0
 drivers/media/{video => usb}/stk1160/stk1160-v4l.c |  0
 .../media/{video => usb}/stk1160/stk1160-video.c   |  0
 drivers/media/{video => usb}/stk1160/stk1160.h     |  0
 drivers/media/{video => usb}/tlg2300/Kconfig       |  0
 drivers/media/{video => usb}/tlg2300/Makefile      |  0
 drivers/media/{video => usb}/tlg2300/pd-alsa.c     |  0
 drivers/media/{video => usb}/tlg2300/pd-common.h   |  0
 drivers/media/{video => usb}/tlg2300/pd-dvb.c      |  0
 drivers/media/{video => usb}/tlg2300/pd-main.c     |  0
 drivers/media/{video => usb}/tlg2300/pd-radio.c    |  0
 drivers/media/{video => usb}/tlg2300/pd-video.c    |  0
 drivers/media/{video => usb}/tlg2300/vendorcmds.h  |  0
 drivers/media/{video => usb}/tm6000/Kconfig        |  0
 drivers/media/{video => usb}/tm6000/Makefile       |  0
 drivers/media/{video => usb}/tm6000/tm6000-alsa.c  |  0
 drivers/media/{video => usb}/tm6000/tm6000-cards.c |  0
 drivers/media/{video => usb}/tm6000/tm6000-core.c  |  0
 drivers/media/{video => usb}/tm6000/tm6000-dvb.c   |  0
 drivers/media/{video => usb}/tm6000/tm6000-i2c.c   |  0
 drivers/media/{video => usb}/tm6000/tm6000-input.c |  0
 drivers/media/{video => usb}/tm6000/tm6000-regs.h  |  0
 drivers/media/{video => usb}/tm6000/tm6000-stds.c  |  0
 .../media/{video => usb}/tm6000/tm6000-usb-isoc.h  |  0
 drivers/media/{video => usb}/tm6000/tm6000-video.c |  0
 drivers/media/{video => usb}/tm6000/tm6000.h       |  0
 drivers/media/{video => usb}/usbvision/Kconfig     |  0
 drivers/media/{video => usb}/usbvision/Makefile    |  0
 .../{video => usb}/usbvision/usbvision-cards.c     |  0
 .../{video => usb}/usbvision/usbvision-cards.h     |  0
 .../{video => usb}/usbvision/usbvision-core.c      |  0
 .../media/{video => usb}/usbvision/usbvision-i2c.c |  0
 .../{video => usb}/usbvision/usbvision-video.c     |  0
 drivers/media/{video => usb}/usbvision/usbvision.h |  0
 drivers/media/{video => usb}/uvc/Kconfig           |  0
 drivers/media/{video => usb}/uvc/Makefile          |  0
 drivers/media/{video => usb}/uvc/uvc_ctrl.c        |  0
 drivers/media/{video => usb}/uvc/uvc_debugfs.c     |  0
 drivers/media/{video => usb}/uvc/uvc_driver.c      |  0
 drivers/media/{video => usb}/uvc/uvc_entity.c      |  0
 drivers/media/{video => usb}/uvc/uvc_isight.c      |  0
 drivers/media/{video => usb}/uvc/uvc_queue.c       |  0
 drivers/media/{video => usb}/uvc/uvc_status.c      |  0
 drivers/media/{video => usb}/uvc/uvc_v4l2.c        |  0
 drivers/media/{video => usb}/uvc/uvc_video.c       |  0
 drivers/media/{video => usb}/uvc/uvcvideo.h        |  0
 drivers/media/video/Kconfig                        | 41 ----------------------
 drivers/media/video/Makefile                       | 16 ---------
 288 files changed, 67 insertions(+), 79 deletions(-)
 rename drivers/media/{video => usb}/au0828/Kconfig (100%)
 rename drivers/media/{video => usb}/au0828/Makefile (100%)
 rename drivers/media/{video => usb}/au0828/au0828-cards.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-cards.h (100%)
 rename drivers/media/{video => usb}/au0828/au0828-core.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-dvb.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-i2c.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-reg.h (100%)
 rename drivers/media/{video => usb}/au0828/au0828-vbi.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828-video.c (100%)
 rename drivers/media/{video => usb}/au0828/au0828.h (100%)
 rename drivers/media/{video => usb}/cpia2/Kconfig (100%)
 rename drivers/media/{video => usb}/cpia2/Makefile (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2.h (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2_core.c (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2_registers.h (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2_usb.c (100%)
 rename drivers/media/{video => usb}/cpia2/cpia2_v4l.c (100%)
 rename drivers/media/{video => usb}/cx231xx/Kconfig (100%)
 rename drivers/media/{video => usb}/cx231xx/Makefile (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-417.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-audio.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-avcore.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-cards.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-conf-reg.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-core.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-dif.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-dvb.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-i2c.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-input.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-pcb-cfg.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-pcb-cfg.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-reg.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-vbi.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-vbi.h (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx-video.c (100%)
 rename drivers/media/{video => usb}/cx231xx/cx231xx.h (100%)
 rename drivers/media/{video => usb}/em28xx/Kconfig (100%)
 rename drivers/media/{video => usb}/em28xx/Makefile (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-audio.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-cards.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-core.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-dvb.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-i2c.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-input.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-reg.h (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-vbi.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx-video.c (100%)
 rename drivers/media/{video => usb}/em28xx/em28xx.h (100%)
 rename drivers/media/{video => usb}/gspca/Kconfig (98%)
 rename drivers/media/{video => usb}/gspca/Makefile (100%)
 rename drivers/media/{video => usb}/gspca/autogain_functions.c (100%)
 rename drivers/media/{video => usb}/gspca/autogain_functions.h (100%)
 rename drivers/media/{video => usb}/gspca/benq.c (100%)
 rename drivers/media/{video => usb}/gspca/conex.c (100%)
 rename drivers/media/{video => usb}/gspca/cpia1.c (100%)
 rename drivers/media/{video => usb}/gspca/etoms.c (100%)
 rename drivers/media/{video => usb}/gspca/finepix.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/Kconfig (100%)
 rename drivers/media/{video => usb}/gspca/gl860/Makefile (75%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860-mi1320.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860-mi2020.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860-ov2640.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860-ov9655.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860.c (100%)
 rename drivers/media/{video => usb}/gspca/gl860/gl860.h (100%)
 rename drivers/media/{video => usb}/gspca/gspca.c (100%)
 rename drivers/media/{video => usb}/gspca/gspca.h (100%)
 rename drivers/media/{video => usb}/gspca/jeilinj.c (100%)
 rename drivers/media/{video => usb}/gspca/jl2005bcd.c (100%)
 rename drivers/media/{video => usb}/gspca/jpeg.h (100%)
 rename drivers/media/{video => usb}/gspca/kinect.c (100%)
 rename drivers/media/{video => usb}/gspca/konica.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/Kconfig (100%)
 rename drivers/media/{video => usb}/gspca/m5602/Makefile (80%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_bridge.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_core.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_mt9m111.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_mt9m111.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_ov7660.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_ov7660.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_ov9650.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_ov9650.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_po1030.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_po1030.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_s5k4aa.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_s5k4aa.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_s5k83a.c (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_s5k83a.h (100%)
 rename drivers/media/{video => usb}/gspca/m5602/m5602_sensor.h (100%)
 rename drivers/media/{video => usb}/gspca/mars.c (100%)
 rename drivers/media/{video => usb}/gspca/mr97310a.c (100%)
 rename drivers/media/{video => usb}/gspca/nw80x.c (100%)
 rename drivers/media/{video => usb}/gspca/ov519.c (100%)
 rename drivers/media/{video => usb}/gspca/ov534.c (100%)
 rename drivers/media/{video => usb}/gspca/ov534_9.c (100%)
 rename drivers/media/{video => usb}/gspca/pac207.c (100%)
 rename drivers/media/{video => usb}/gspca/pac7302.c (100%)
 rename drivers/media/{video => usb}/gspca/pac7311.c (100%)
 rename drivers/media/{video => usb}/gspca/pac_common.h (100%)
 rename drivers/media/{video => usb}/gspca/se401.c (100%)
 rename drivers/media/{video => usb}/gspca/se401.h (100%)
 rename drivers/media/{video => usb}/gspca/sn9c2028.c (100%)
 rename drivers/media/{video => usb}/gspca/sn9c2028.h (100%)
 rename drivers/media/{video => usb}/gspca/sn9c20x.c (100%)
 rename drivers/media/{video => usb}/gspca/sonixb.c (100%)
 rename drivers/media/{video => usb}/gspca/sonixj.c (100%)
 rename drivers/media/{video => usb}/gspca/spca1528.c (100%)
 rename drivers/media/{video => usb}/gspca/spca500.c (100%)
 rename drivers/media/{video => usb}/gspca/spca501.c (100%)
 rename drivers/media/{video => usb}/gspca/spca505.c (100%)
 rename drivers/media/{video => usb}/gspca/spca506.c (100%)
 rename drivers/media/{video => usb}/gspca/spca508.c (100%)
 rename drivers/media/{video => usb}/gspca/spca561.c (100%)
 rename drivers/media/{video => usb}/gspca/sq905.c (100%)
 rename drivers/media/{video => usb}/gspca/sq905c.c (100%)
 rename drivers/media/{video => usb}/gspca/sq930x.c (100%)
 rename drivers/media/{video => usb}/gspca/stk014.c (100%)
 rename drivers/media/{video => usb}/gspca/stv0680.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/Kconfig (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/Makefile (78%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_hdcs.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_hdcs.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_pb0100.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_pb0100.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_sensor.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_st6422.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_st6422.h (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_vv6410.c (100%)
 rename drivers/media/{video => usb}/gspca/stv06xx/stv06xx_vv6410.h (100%)
 rename drivers/media/{video => usb}/gspca/sunplus.c (100%)
 rename drivers/media/{video => usb}/gspca/t613.c (100%)
 rename drivers/media/{video => usb}/gspca/topro.c (100%)
 rename drivers/media/{video => usb}/gspca/tv8532.c (100%)
 rename drivers/media/{video => usb}/gspca/vc032x.c (100%)
 rename drivers/media/{video => usb}/gspca/vicam.c (100%)
 rename drivers/media/{video => usb}/gspca/w996Xcf.c (100%)
 rename drivers/media/{video => usb}/gspca/xirlink_cit.c (100%)
 rename drivers/media/{video => usb}/gspca/zc3xx-reg.h (100%)
 rename drivers/media/{video => usb}/gspca/zc3xx.c (100%)
 rename drivers/media/{video => usb}/hdpvr/Kconfig (100%)
 rename drivers/media/{video => usb}/hdpvr/Makefile (100%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr-control.c (100%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr-core.c (100%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr-i2c.c (100%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr-video.c (100%)
 rename drivers/media/{video => usb}/hdpvr/hdpvr.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/Kconfig (100%)
 rename drivers/media/{video => usb}/pvrusb2/Makefile (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-audio.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-audio.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-context.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-context.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-cs53l32a.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-cs53l32a.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-ctrl.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-ctrl.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-cx2584x-v4l.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-cx2584x-v4l.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-debug.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-debugifc.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-debugifc.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-devattr.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-devattr.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-dvb.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-dvb.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-eeprom.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-eeprom.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-encoder.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-encoder.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-fx2-cmd.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw-internal.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-hdw.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-i2c-core.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-i2c-core.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-io.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-io.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-ioread.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-ioread.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-main.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-std.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-std.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-sysfs.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-sysfs.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-util.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-v4l2.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-v4l2.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-video-v4l.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-video-v4l.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-wm8775.c (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2-wm8775.h (100%)
 rename drivers/media/{video => usb}/pvrusb2/pvrusb2.h (100%)
 rename drivers/media/{video => usb}/pwc/Kconfig (100%)
 rename drivers/media/{video => usb}/pwc/Makefile (100%)
 rename drivers/media/{video => usb}/pwc/philips.txt (100%)
 rename drivers/media/{video => usb}/pwc/pwc-ctrl.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-dec1.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-dec1.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-dec23.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-dec23.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-if.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-kiara.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-kiara.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-misc.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-nala.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-timon.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-timon.h (100%)
 rename drivers/media/{video => usb}/pwc/pwc-uncompress.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc-v4l.c (100%)
 rename drivers/media/{video => usb}/pwc/pwc.h (100%)
 rename drivers/media/{video => usb}/sn9c102/Kconfig (100%)
 rename drivers/media/{video => usb}/sn9c102/Makefile (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102.h (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_config.h (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_core.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_devtable.h (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_hv7131d.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_hv7131r.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_mi0343.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_mi0360.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_mt9v111.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_ov7630.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_ov7660.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_pas106b.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_pas202bcb.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_sensor.h (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_tas5110c1b.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_tas5110d.c (100%)
 rename drivers/media/{video => usb}/sn9c102/sn9c102_tas5130d1b.c (100%)
 rename drivers/media/{video => usb}/stk1160/Kconfig (100%)
 rename drivers/media/{video => usb}/stk1160/Makefile (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-ac97.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-core.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-i2c.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-reg.h (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-v4l.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160-video.c (100%)
 rename drivers/media/{video => usb}/stk1160/stk1160.h (100%)
 rename drivers/media/{video => usb}/tlg2300/Kconfig (100%)
 rename drivers/media/{video => usb}/tlg2300/Makefile (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-alsa.c (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-common.h (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-dvb.c (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-main.c (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-radio.c (100%)
 rename drivers/media/{video => usb}/tlg2300/pd-video.c (100%)
 rename drivers/media/{video => usb}/tlg2300/vendorcmds.h (100%)
 rename drivers/media/{video => usb}/tm6000/Kconfig (100%)
 rename drivers/media/{video => usb}/tm6000/Makefile (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-alsa.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-cards.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-core.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-dvb.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-i2c.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-input.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-regs.h (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-stds.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-usb-isoc.h (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000-video.c (100%)
 rename drivers/media/{video => usb}/tm6000/tm6000.h (100%)
 rename drivers/media/{video => usb}/usbvision/Kconfig (100%)
 rename drivers/media/{video => usb}/usbvision/Makefile (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision-cards.c (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision-cards.h (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision-core.c (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision-i2c.c (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision-video.c (100%)
 rename drivers/media/{video => usb}/usbvision/usbvision.h (100%)
 rename drivers/media/{video => usb}/uvc/Kconfig (100%)
 rename drivers/media/{video => usb}/uvc/Makefile (100%)
 rename drivers/media/{video => usb}/uvc/uvc_ctrl.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_debugfs.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_driver.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_entity.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_isight.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_queue.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_status.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_v4l2.c (100%)
 rename drivers/media/{video => usb}/uvc/uvc_video.c (100%)
 rename drivers/media/{video => usb}/uvc/uvcvideo.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index ceb5b55..13fd97f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3119,49 +3119,49 @@ M:	Frank Zago <frank@zago.net>
 L:	linux-media@vger.kernel.org
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 S:	Maintained
-F:	drivers/media/video/gspca/finepix.c
+F:	drivers/media/usb/gspca/finepix.c
 
 GSPCA GL860 SUBDRIVER
 M:	Olivier Lorin <o.lorin@laposte.net>
 L:	linux-media@vger.kernel.org
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 S:	Maintained
-F:	drivers/media/video/gspca/gl860/
+F:	drivers/media/usb/gspca/gl860/
 
 GSPCA M5602 SUBDRIVER
 M:	Erik Andren <erik.andren@gmail.com>
 L:	linux-media@vger.kernel.org
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 S:	Maintained
-F:	drivers/media/video/gspca/m5602/
+F:	drivers/media/usb/gspca/m5602/
 
 GSPCA PAC207 SONIXB SUBDRIVER
 M:	Hans de Goede <hdegoede@redhat.com>
 L:	linux-media@vger.kernel.org
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 S:	Maintained
-F:	drivers/media/video/gspca/pac207.c
+F:	drivers/media/usb/gspca/pac207.c
 
 GSPCA SN9C20X SUBDRIVER
 M:	Brian Johnson <brijohn@gmail.com>
 L:	linux-media@vger.kernel.org
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 S:	Maintained
-F:	drivers/media/video/gspca/sn9c20x.c
+F:	drivers/media/usb/gspca/sn9c20x.c
 
 GSPCA T613 SUBDRIVER
 M:	Leandro Costantino <lcostantino@gmail.com>
 L:	linux-media@vger.kernel.org
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 S:	Maintained
-F:	drivers/media/video/gspca/t613.c
+F:	drivers/media/usb/gspca/t613.c
 
 GSPCA USB WEBCAM DRIVER
 M:	Hans de Goede <hdegoede@redhat.com>
 L:	linux-media@vger.kernel.org
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 S:	Maintained
-F:	drivers/media/video/gspca/
+F:	drivers/media/usb/gspca/
 
 HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER
 M:	Frank Seidel <frank@f-seidel.de>
@@ -5525,7 +5525,7 @@ W:	http://www.isely.net/pvrusb2/
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 S:	Maintained
 F:	Documentation/video4linux/README.pvrusb2
-F:	drivers/media/video/pvrusb2/
+F:	drivers/media/usb/pvrusb2/
 
 PWM SUBSYSTEM
 M:	Thierry Reding <thierry.reding@avionic-design.de>
@@ -5956,7 +5956,7 @@ M:	Huang Shijie <shijie8@gmail.com>
 M:	Kang Yong <kangyong@telegent.com>
 M:	Zhang Xiaobing <xbzhang@telegent.com>
 S:	Supported
-F:	drivers/media/video/tlg2300
+F:	drivers/media/usb/tlg2300
 
 SC1200 WDT DRIVER
 M:	Zwane Mwaikambo <zwane@arm.linux.org.uk>
@@ -7297,7 +7297,7 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 W:	http://www.linux-projects.org
 S:	Maintained
 F:	Documentation/video4linux/sn9c102.txt
-F:	drivers/media/video/sn9c102/
+F:	drivers/media/usb/sn9c102/
 
 USB SUBSYSTEM
 M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@@ -7332,7 +7332,7 @@ L:	linux-media@vger.kernel.org
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 W:	http://www.ideasonboard.org/uvc/
 S:	Maintained
-F:	drivers/media/video/uvc/
+F:	drivers/media/usb/uvc/
 
 USB W996[87]CF DRIVER
 M:	Luca Risolia <luca.risolia@studio.unibo.it>
diff --git a/drivers/media/usb/Kconfig b/drivers/media/usb/Kconfig
index 53664b3..a1e25ee 100644
--- a/drivers/media/usb/Kconfig
+++ b/drivers/media/usb/Kconfig
@@ -2,18 +2,49 @@
 # USB media device configuration
 #
 
-menuconfig MEDIA_USB_DRIVERS
-	bool "Supported DVB USB Adapters"
-        depends on USB
-        default y
+menu "Media USB Adapters"
+	visible if USB && MEDIA_SUPPORT
 
-if MEDIA_USB_DRIVERS && DVB_CORE && I2C
+if MEDIA_CAMERA_SUPPORT
+	comment "Webcam devices"
+source "drivers/media/usb/uvc/Kconfig"
+source "drivers/media/usb/gspca/Kconfig"
+source "drivers/media/usb/pwc/Kconfig"
+source "drivers/media/usb/cpia2/Kconfig"
+source "drivers/media/usb/sn9c102/Kconfig"
+endif
+
+if MEDIA_ANALOG_TV_SUPPORT
+	comment "Analog TV USB devices"
+source "drivers/media/usb/au0828/Kconfig"
+source "drivers/media/usb/pvrusb2/Kconfig"
+source "drivers/media/usb/hdpvr/Kconfig"
+source "drivers/media/usb/tlg2300/Kconfig"
+source "drivers/media/usb/usbvision/Kconfig"
+source "drivers/media/usb/stk1160/Kconfig"
 
+endif
+
+if (MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT)
+	comment "Analog/digital TV USB devices"
+source "drivers/media/usb/cx231xx/Kconfig"
+source "drivers/media/usb/tm6000/Kconfig"
+endif
+
+
+if I2C && MEDIA_DIGITAL_TV_SUPPORT
+	comment "Digital TV USB devices"
 source "drivers/media/usb/dvb-usb/Kconfig"
 source "drivers/media/usb/dvb-usb-v2/Kconfig"
 source "drivers/media/usb/ttusb-budget/Kconfig"
 source "drivers/media/usb/ttusb-dec/Kconfig"
 source "drivers/media/usb/siano/Kconfig"
 source "drivers/media/usb/b2c2/Kconfig"
+endif
 
+if (MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT)
+	comment "Webcam, TV (analog/digital) USB devices"
+source "drivers/media/usb/em28xx/Kconfig"
 endif
+
+endmenu
diff --git a/drivers/media/usb/Makefile b/drivers/media/usb/Makefile
index 6b30ad1..428827a 100644
--- a/drivers/media/usb/Makefile
+++ b/drivers/media/usb/Makefile
@@ -4,3 +4,17 @@
 
 # DVB USB-only drivers
 obj-y := ttusb-dec/ ttusb-budget/ dvb-usb/ dvb-usb-v2/ siano/ b2c2/
+obj-$(CONFIG_USB_VIDEO_CLASS)	+= uvc/
+obj-$(CONFIG_USB_GSPCA)         += gspca/
+obj-$(CONFIG_USB_PWC)           += pwc/
+obj-$(CONFIG_VIDEO_CPIA2) += cpia2/
+obj-$(CONFIG_USB_SN9C102)       += sn9c102/
+obj-$(CONFIG_VIDEO_AU0828) += au0828/
+obj-$(CONFIG_VIDEO_HDPVR)	+= hdpvr/
+obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2/
+obj-$(CONFIG_VIDEO_TLG2300) += tlg2300/
+obj-$(CONFIG_VIDEO_USBVISION) += usbvision/
+obj-$(CONFIG_VIDEO_STK1160) += stk1160/
+obj-$(CONFIG_VIDEO_CX231XX) += cx231xx/
+obj-$(CONFIG_VIDEO_TM6000) += tm6000/
+obj-$(CONFIG_VIDEO_EM28XX) += em28xx/
diff --git a/drivers/media/video/au0828/Kconfig b/drivers/media/usb/au0828/Kconfig
similarity index 100%
rename from drivers/media/video/au0828/Kconfig
rename to drivers/media/usb/au0828/Kconfig
diff --git a/drivers/media/video/au0828/Makefile b/drivers/media/usb/au0828/Makefile
similarity index 100%
rename from drivers/media/video/au0828/Makefile
rename to drivers/media/usb/au0828/Makefile
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/usb/au0828/au0828-cards.c
similarity index 100%
rename from drivers/media/video/au0828/au0828-cards.c
rename to drivers/media/usb/au0828/au0828-cards.c
diff --git a/drivers/media/video/au0828/au0828-cards.h b/drivers/media/usb/au0828/au0828-cards.h
similarity index 100%
rename from drivers/media/video/au0828/au0828-cards.h
rename to drivers/media/usb/au0828/au0828-cards.h
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
similarity index 100%
rename from drivers/media/video/au0828/au0828-core.c
rename to drivers/media/usb/au0828/au0828-core.c
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/usb/au0828/au0828-dvb.c
similarity index 100%
rename from drivers/media/video/au0828/au0828-dvb.c
rename to drivers/media/usb/au0828/au0828-dvb.c
diff --git a/drivers/media/video/au0828/au0828-i2c.c b/drivers/media/usb/au0828/au0828-i2c.c
similarity index 100%
rename from drivers/media/video/au0828/au0828-i2c.c
rename to drivers/media/usb/au0828/au0828-i2c.c
diff --git a/drivers/media/video/au0828/au0828-reg.h b/drivers/media/usb/au0828/au0828-reg.h
similarity index 100%
rename from drivers/media/video/au0828/au0828-reg.h
rename to drivers/media/usb/au0828/au0828-reg.h
diff --git a/drivers/media/video/au0828/au0828-vbi.c b/drivers/media/usb/au0828/au0828-vbi.c
similarity index 100%
rename from drivers/media/video/au0828/au0828-vbi.c
rename to drivers/media/usb/au0828/au0828-vbi.c
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
similarity index 100%
rename from drivers/media/video/au0828/au0828-video.c
rename to drivers/media/usb/au0828/au0828-video.c
diff --git a/drivers/media/video/au0828/au0828.h b/drivers/media/usb/au0828/au0828.h
similarity index 100%
rename from drivers/media/video/au0828/au0828.h
rename to drivers/media/usb/au0828/au0828.h
diff --git a/drivers/media/video/cpia2/Kconfig b/drivers/media/usb/cpia2/Kconfig
similarity index 100%
rename from drivers/media/video/cpia2/Kconfig
rename to drivers/media/usb/cpia2/Kconfig
diff --git a/drivers/media/video/cpia2/Makefile b/drivers/media/usb/cpia2/Makefile
similarity index 100%
rename from drivers/media/video/cpia2/Makefile
rename to drivers/media/usb/cpia2/Makefile
diff --git a/drivers/media/video/cpia2/cpia2.h b/drivers/media/usb/cpia2/cpia2.h
similarity index 100%
rename from drivers/media/video/cpia2/cpia2.h
rename to drivers/media/usb/cpia2/cpia2.h
diff --git a/drivers/media/video/cpia2/cpia2_core.c b/drivers/media/usb/cpia2/cpia2_core.c
similarity index 100%
rename from drivers/media/video/cpia2/cpia2_core.c
rename to drivers/media/usb/cpia2/cpia2_core.c
diff --git a/drivers/media/video/cpia2/cpia2_registers.h b/drivers/media/usb/cpia2/cpia2_registers.h
similarity index 100%
rename from drivers/media/video/cpia2/cpia2_registers.h
rename to drivers/media/usb/cpia2/cpia2_registers.h
diff --git a/drivers/media/video/cpia2/cpia2_usb.c b/drivers/media/usb/cpia2/cpia2_usb.c
similarity index 100%
rename from drivers/media/video/cpia2/cpia2_usb.c
rename to drivers/media/usb/cpia2/cpia2_usb.c
diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/usb/cpia2/cpia2_v4l.c
similarity index 100%
rename from drivers/media/video/cpia2/cpia2_v4l.c
rename to drivers/media/usb/cpia2/cpia2_v4l.c
diff --git a/drivers/media/video/cx231xx/Kconfig b/drivers/media/usb/cx231xx/Kconfig
similarity index 100%
rename from drivers/media/video/cx231xx/Kconfig
rename to drivers/media/usb/cx231xx/Kconfig
diff --git a/drivers/media/video/cx231xx/Makefile b/drivers/media/usb/cx231xx/Makefile
similarity index 100%
rename from drivers/media/video/cx231xx/Makefile
rename to drivers/media/usb/cx231xx/Makefile
diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-417.c
rename to drivers/media/usb/cx231xx/cx231xx-417.c
diff --git a/drivers/media/video/cx231xx/cx231xx-audio.c b/drivers/media/usb/cx231xx/cx231xx-audio.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-audio.c
rename to drivers/media/usb/cx231xx/cx231xx-audio.c
diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-avcore.c
rename to drivers/media/usb/cx231xx/cx231xx-avcore.c
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-cards.c
rename to drivers/media/usb/cx231xx/cx231xx-cards.c
diff --git a/drivers/media/video/cx231xx/cx231xx-conf-reg.h b/drivers/media/usb/cx231xx/cx231xx-conf-reg.h
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-conf-reg.h
rename to drivers/media/usb/cx231xx/cx231xx-conf-reg.h
diff --git a/drivers/media/video/cx231xx/cx231xx-core.c b/drivers/media/usb/cx231xx/cx231xx-core.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-core.c
rename to drivers/media/usb/cx231xx/cx231xx-core.c
diff --git a/drivers/media/video/cx231xx/cx231xx-dif.h b/drivers/media/usb/cx231xx/cx231xx-dif.h
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-dif.h
rename to drivers/media/usb/cx231xx/cx231xx-dif.h
diff --git a/drivers/media/video/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-dvb.c
rename to drivers/media/usb/cx231xx/cx231xx-dvb.c
diff --git a/drivers/media/video/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-i2c.c
rename to drivers/media/usb/cx231xx/cx231xx-i2c.c
diff --git a/drivers/media/video/cx231xx/cx231xx-input.c b/drivers/media/usb/cx231xx/cx231xx-input.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-input.c
rename to drivers/media/usb/cx231xx/cx231xx-input.c
diff --git a/drivers/media/video/cx231xx/cx231xx-pcb-cfg.c b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-pcb-cfg.c
rename to drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c
diff --git a/drivers/media/video/cx231xx/cx231xx-pcb-cfg.h b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.h
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-pcb-cfg.h
rename to drivers/media/usb/cx231xx/cx231xx-pcb-cfg.h
diff --git a/drivers/media/video/cx231xx/cx231xx-reg.h b/drivers/media/usb/cx231xx/cx231xx-reg.h
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-reg.h
rename to drivers/media/usb/cx231xx/cx231xx-reg.h
diff --git a/drivers/media/video/cx231xx/cx231xx-vbi.c b/drivers/media/usb/cx231xx/cx231xx-vbi.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-vbi.c
rename to drivers/media/usb/cx231xx/cx231xx-vbi.c
diff --git a/drivers/media/video/cx231xx/cx231xx-vbi.h b/drivers/media/usb/cx231xx/cx231xx-vbi.h
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-vbi.h
rename to drivers/media/usb/cx231xx/cx231xx-vbi.h
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx-video.c
rename to drivers/media/usb/cx231xx/cx231xx-video.c
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h
similarity index 100%
rename from drivers/media/video/cx231xx/cx231xx.h
rename to drivers/media/usb/cx231xx/cx231xx.h
diff --git a/drivers/media/video/em28xx/Kconfig b/drivers/media/usb/em28xx/Kconfig
similarity index 100%
rename from drivers/media/video/em28xx/Kconfig
rename to drivers/media/usb/em28xx/Kconfig
diff --git a/drivers/media/video/em28xx/Makefile b/drivers/media/usb/em28xx/Makefile
similarity index 100%
rename from drivers/media/video/em28xx/Makefile
rename to drivers/media/usb/em28xx/Makefile
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
similarity index 100%
rename from drivers/media/video/em28xx/em28xx-audio.c
rename to drivers/media/usb/em28xx/em28xx-audio.c
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
similarity index 100%
rename from drivers/media/video/em28xx/em28xx-cards.c
rename to drivers/media/usb/em28xx/em28xx-cards.c
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
similarity index 100%
rename from drivers/media/video/em28xx/em28xx-core.c
rename to drivers/media/usb/em28xx/em28xx-core.c
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
similarity index 100%
rename from drivers/media/video/em28xx/em28xx-dvb.c
rename to drivers/media/usb/em28xx/em28xx-dvb.c
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c
similarity index 100%
rename from drivers/media/video/em28xx/em28xx-i2c.c
rename to drivers/media/usb/em28xx/em28xx-i2c.c
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
similarity index 100%
rename from drivers/media/video/em28xx/em28xx-input.c
rename to drivers/media/usb/em28xx/em28xx-input.c
diff --git a/drivers/media/video/em28xx/em28xx-reg.h b/drivers/media/usb/em28xx/em28xx-reg.h
similarity index 100%
rename from drivers/media/video/em28xx/em28xx-reg.h
rename to drivers/media/usb/em28xx/em28xx-reg.h
diff --git a/drivers/media/video/em28xx/em28xx-vbi.c b/drivers/media/usb/em28xx/em28xx-vbi.c
similarity index 100%
rename from drivers/media/video/em28xx/em28xx-vbi.c
rename to drivers/media/usb/em28xx/em28xx-vbi.c
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
similarity index 100%
rename from drivers/media/video/em28xx/em28xx-video.c
rename to drivers/media/usb/em28xx/em28xx-video.c
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
similarity index 100%
rename from drivers/media/video/em28xx/em28xx.h
rename to drivers/media/usb/em28xx/em28xx.h
diff --git a/drivers/media/video/gspca/Kconfig b/drivers/media/usb/gspca/Kconfig
similarity index 98%
rename from drivers/media/video/gspca/Kconfig
rename to drivers/media/usb/gspca/Kconfig
index dfe268b..6345f93 100644
--- a/drivers/media/video/gspca/Kconfig
+++ b/drivers/media/usb/gspca/Kconfig
@@ -17,9 +17,9 @@ menuconfig USB_GSPCA
 
 if USB_GSPCA && VIDEO_V4L2
 
-source "drivers/media/video/gspca/m5602/Kconfig"
-source "drivers/media/video/gspca/stv06xx/Kconfig"
-source "drivers/media/video/gspca/gl860/Kconfig"
+source "drivers/media/usb/gspca/m5602/Kconfig"
+source "drivers/media/usb/gspca/stv06xx/Kconfig"
+source "drivers/media/usb/gspca/gl860/Kconfig"
 
 config USB_GSPCA_BENQ
 	tristate "Benq USB Camera Driver"
diff --git a/drivers/media/video/gspca/Makefile b/drivers/media/usb/gspca/Makefile
similarity index 100%
rename from drivers/media/video/gspca/Makefile
rename to drivers/media/usb/gspca/Makefile
diff --git a/drivers/media/video/gspca/autogain_functions.c b/drivers/media/usb/gspca/autogain_functions.c
similarity index 100%
rename from drivers/media/video/gspca/autogain_functions.c
rename to drivers/media/usb/gspca/autogain_functions.c
diff --git a/drivers/media/video/gspca/autogain_functions.h b/drivers/media/usb/gspca/autogain_functions.h
similarity index 100%
rename from drivers/media/video/gspca/autogain_functions.h
rename to drivers/media/usb/gspca/autogain_functions.h
diff --git a/drivers/media/video/gspca/benq.c b/drivers/media/usb/gspca/benq.c
similarity index 100%
rename from drivers/media/video/gspca/benq.c
rename to drivers/media/usb/gspca/benq.c
diff --git a/drivers/media/video/gspca/conex.c b/drivers/media/usb/gspca/conex.c
similarity index 100%
rename from drivers/media/video/gspca/conex.c
rename to drivers/media/usb/gspca/conex.c
diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c
similarity index 100%
rename from drivers/media/video/gspca/cpia1.c
rename to drivers/media/usb/gspca/cpia1.c
diff --git a/drivers/media/video/gspca/etoms.c b/drivers/media/usb/gspca/etoms.c
similarity index 100%
rename from drivers/media/video/gspca/etoms.c
rename to drivers/media/usb/gspca/etoms.c
diff --git a/drivers/media/video/gspca/finepix.c b/drivers/media/usb/gspca/finepix.c
similarity index 100%
rename from drivers/media/video/gspca/finepix.c
rename to drivers/media/usb/gspca/finepix.c
diff --git a/drivers/media/video/gspca/gl860/Kconfig b/drivers/media/usb/gspca/gl860/Kconfig
similarity index 100%
rename from drivers/media/video/gspca/gl860/Kconfig
rename to drivers/media/usb/gspca/gl860/Kconfig
diff --git a/drivers/media/video/gspca/gl860/Makefile b/drivers/media/usb/gspca/gl860/Makefile
similarity index 75%
rename from drivers/media/video/gspca/gl860/Makefile
rename to drivers/media/usb/gspca/gl860/Makefile
index 773ea34..cf63974 100644
--- a/drivers/media/video/gspca/gl860/Makefile
+++ b/drivers/media/usb/gspca/gl860/Makefile
@@ -6,5 +6,5 @@ gspca_gl860-objs := gl860.o \
 		    gl860-ov9655.o \
 		    gl860-mi2020.o
 
-ccflags-y += -I$(srctree)/drivers/media/video/gspca
+ccflags-y += -I$(srctree)/drivers/media/usb/gspca
 
diff --git a/drivers/media/video/gspca/gl860/gl860-mi1320.c b/drivers/media/usb/gspca/gl860/gl860-mi1320.c
similarity index 100%
rename from drivers/media/video/gspca/gl860/gl860-mi1320.c
rename to drivers/media/usb/gspca/gl860/gl860-mi1320.c
diff --git a/drivers/media/video/gspca/gl860/gl860-mi2020.c b/drivers/media/usb/gspca/gl860/gl860-mi2020.c
similarity index 100%
rename from drivers/media/video/gspca/gl860/gl860-mi2020.c
rename to drivers/media/usb/gspca/gl860/gl860-mi2020.c
diff --git a/drivers/media/video/gspca/gl860/gl860-ov2640.c b/drivers/media/usb/gspca/gl860/gl860-ov2640.c
similarity index 100%
rename from drivers/media/video/gspca/gl860/gl860-ov2640.c
rename to drivers/media/usb/gspca/gl860/gl860-ov2640.c
diff --git a/drivers/media/video/gspca/gl860/gl860-ov9655.c b/drivers/media/usb/gspca/gl860/gl860-ov9655.c
similarity index 100%
rename from drivers/media/video/gspca/gl860/gl860-ov9655.c
rename to drivers/media/usb/gspca/gl860/gl860-ov9655.c
diff --git a/drivers/media/video/gspca/gl860/gl860.c b/drivers/media/usb/gspca/gl860/gl860.c
similarity index 100%
rename from drivers/media/video/gspca/gl860/gl860.c
rename to drivers/media/usb/gspca/gl860/gl860.c
diff --git a/drivers/media/video/gspca/gl860/gl860.h b/drivers/media/usb/gspca/gl860/gl860.h
similarity index 100%
rename from drivers/media/video/gspca/gl860/gl860.h
rename to drivers/media/usb/gspca/gl860/gl860.h
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c
similarity index 100%
rename from drivers/media/video/gspca/gspca.c
rename to drivers/media/usb/gspca/gspca.c
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/usb/gspca/gspca.h
similarity index 100%
rename from drivers/media/video/gspca/gspca.h
rename to drivers/media/usb/gspca/gspca.h
diff --git a/drivers/media/video/gspca/jeilinj.c b/drivers/media/usb/gspca/jeilinj.c
similarity index 100%
rename from drivers/media/video/gspca/jeilinj.c
rename to drivers/media/usb/gspca/jeilinj.c
diff --git a/drivers/media/video/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c
similarity index 100%
rename from drivers/media/video/gspca/jl2005bcd.c
rename to drivers/media/usb/gspca/jl2005bcd.c
diff --git a/drivers/media/video/gspca/jpeg.h b/drivers/media/usb/gspca/jpeg.h
similarity index 100%
rename from drivers/media/video/gspca/jpeg.h
rename to drivers/media/usb/gspca/jpeg.h
diff --git a/drivers/media/video/gspca/kinect.c b/drivers/media/usb/gspca/kinect.c
similarity index 100%
rename from drivers/media/video/gspca/kinect.c
rename to drivers/media/usb/gspca/kinect.c
diff --git a/drivers/media/video/gspca/konica.c b/drivers/media/usb/gspca/konica.c
similarity index 100%
rename from drivers/media/video/gspca/konica.c
rename to drivers/media/usb/gspca/konica.c
diff --git a/drivers/media/video/gspca/m5602/Kconfig b/drivers/media/usb/gspca/m5602/Kconfig
similarity index 100%
rename from drivers/media/video/gspca/m5602/Kconfig
rename to drivers/media/usb/gspca/m5602/Kconfig
diff --git a/drivers/media/video/gspca/m5602/Makefile b/drivers/media/usb/gspca/m5602/Makefile
similarity index 80%
rename from drivers/media/video/gspca/m5602/Makefile
rename to drivers/media/usb/gspca/m5602/Makefile
index 575b75b..8e1fb5a 100644
--- a/drivers/media/video/gspca/m5602/Makefile
+++ b/drivers/media/usb/gspca/m5602/Makefile
@@ -8,4 +8,4 @@ gspca_m5602-objs := m5602_core.o \
 		    m5602_s5k83a.o \
 		    m5602_s5k4aa.o
 
-ccflags-y += -I$(srctree)/drivers/media/video/gspca
+ccflags-y += -I$(srctree)/drivers/media/usb/gspca
diff --git a/drivers/media/video/gspca/m5602/m5602_bridge.h b/drivers/media/usb/gspca/m5602/m5602_bridge.h
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_bridge.h
rename to drivers/media/usb/gspca/m5602/m5602_bridge.h
diff --git a/drivers/media/video/gspca/m5602/m5602_core.c b/drivers/media/usb/gspca/m5602/m5602_core.c
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_core.c
rename to drivers/media/usb/gspca/m5602/m5602_core.c
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/drivers/media/usb/gspca/m5602/m5602_mt9m111.c
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_mt9m111.c
rename to drivers/media/usb/gspca/m5602/m5602_mt9m111.c
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.h b/drivers/media/usb/gspca/m5602/m5602_mt9m111.h
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_mt9m111.h
rename to drivers/media/usb/gspca/m5602/m5602_mt9m111.h
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.c b/drivers/media/usb/gspca/m5602/m5602_ov7660.c
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_ov7660.c
rename to drivers/media/usb/gspca/m5602/m5602_ov7660.c
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.h b/drivers/media/usb/gspca/m5602/m5602_ov7660.h
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_ov7660.h
rename to drivers/media/usb/gspca/m5602/m5602_ov7660.h
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/usb/gspca/m5602/m5602_ov9650.c
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_ov9650.c
rename to drivers/media/usb/gspca/m5602/m5602_ov9650.c
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.h b/drivers/media/usb/gspca/m5602/m5602_ov9650.h
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_ov9650.h
rename to drivers/media/usb/gspca/m5602/m5602_ov9650.h
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.c b/drivers/media/usb/gspca/m5602/m5602_po1030.c
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_po1030.c
rename to drivers/media/usb/gspca/m5602/m5602_po1030.c
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.h b/drivers/media/usb/gspca/m5602/m5602_po1030.h
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_po1030.h
rename to drivers/media/usb/gspca/m5602/m5602_po1030.h
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_s5k4aa.c
rename to drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h b/drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_s5k4aa.h
rename to drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.c b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_s5k83a.c
rename to drivers/media/usb/gspca/m5602/m5602_s5k83a.c
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.h b/drivers/media/usb/gspca/m5602/m5602_s5k83a.h
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_s5k83a.h
rename to drivers/media/usb/gspca/m5602/m5602_s5k83a.h
diff --git a/drivers/media/video/gspca/m5602/m5602_sensor.h b/drivers/media/usb/gspca/m5602/m5602_sensor.h
similarity index 100%
rename from drivers/media/video/gspca/m5602/m5602_sensor.h
rename to drivers/media/usb/gspca/m5602/m5602_sensor.h
diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/usb/gspca/mars.c
similarity index 100%
rename from drivers/media/video/gspca/mars.c
rename to drivers/media/usb/gspca/mars.c
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/usb/gspca/mr97310a.c
similarity index 100%
rename from drivers/media/video/gspca/mr97310a.c
rename to drivers/media/usb/gspca/mr97310a.c
diff --git a/drivers/media/video/gspca/nw80x.c b/drivers/media/usb/gspca/nw80x.c
similarity index 100%
rename from drivers/media/video/gspca/nw80x.c
rename to drivers/media/usb/gspca/nw80x.c
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/usb/gspca/ov519.c
similarity index 100%
rename from drivers/media/video/gspca/ov519.c
rename to drivers/media/usb/gspca/ov519.c
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/usb/gspca/ov534.c
similarity index 100%
rename from drivers/media/video/gspca/ov534.c
rename to drivers/media/usb/gspca/ov534.c
diff --git a/drivers/media/video/gspca/ov534_9.c b/drivers/media/usb/gspca/ov534_9.c
similarity index 100%
rename from drivers/media/video/gspca/ov534_9.c
rename to drivers/media/usb/gspca/ov534_9.c
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/usb/gspca/pac207.c
similarity index 100%
rename from drivers/media/video/gspca/pac207.c
rename to drivers/media/usb/gspca/pac207.c
diff --git a/drivers/media/video/gspca/pac7302.c b/drivers/media/usb/gspca/pac7302.c
similarity index 100%
rename from drivers/media/video/gspca/pac7302.c
rename to drivers/media/usb/gspca/pac7302.c
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/usb/gspca/pac7311.c
similarity index 100%
rename from drivers/media/video/gspca/pac7311.c
rename to drivers/media/usb/gspca/pac7311.c
diff --git a/drivers/media/video/gspca/pac_common.h b/drivers/media/usb/gspca/pac_common.h
similarity index 100%
rename from drivers/media/video/gspca/pac_common.h
rename to drivers/media/usb/gspca/pac_common.h
diff --git a/drivers/media/video/gspca/se401.c b/drivers/media/usb/gspca/se401.c
similarity index 100%
rename from drivers/media/video/gspca/se401.c
rename to drivers/media/usb/gspca/se401.c
diff --git a/drivers/media/video/gspca/se401.h b/drivers/media/usb/gspca/se401.h
similarity index 100%
rename from drivers/media/video/gspca/se401.h
rename to drivers/media/usb/gspca/se401.h
diff --git a/drivers/media/video/gspca/sn9c2028.c b/drivers/media/usb/gspca/sn9c2028.c
similarity index 100%
rename from drivers/media/video/gspca/sn9c2028.c
rename to drivers/media/usb/gspca/sn9c2028.c
diff --git a/drivers/media/video/gspca/sn9c2028.h b/drivers/media/usb/gspca/sn9c2028.h
similarity index 100%
rename from drivers/media/video/gspca/sn9c2028.h
rename to drivers/media/usb/gspca/sn9c2028.h
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c
similarity index 100%
rename from drivers/media/video/gspca/sn9c20x.c
rename to drivers/media/usb/gspca/sn9c20x.c
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/usb/gspca/sonixb.c
similarity index 100%
rename from drivers/media/video/gspca/sonixb.c
rename to drivers/media/usb/gspca/sonixb.c
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/usb/gspca/sonixj.c
similarity index 100%
rename from drivers/media/video/gspca/sonixj.c
rename to drivers/media/usb/gspca/sonixj.c
diff --git a/drivers/media/video/gspca/spca1528.c b/drivers/media/usb/gspca/spca1528.c
similarity index 100%
rename from drivers/media/video/gspca/spca1528.c
rename to drivers/media/usb/gspca/spca1528.c
diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/usb/gspca/spca500.c
similarity index 100%
rename from drivers/media/video/gspca/spca500.c
rename to drivers/media/usb/gspca/spca500.c
diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/usb/gspca/spca501.c
similarity index 100%
rename from drivers/media/video/gspca/spca501.c
rename to drivers/media/usb/gspca/spca501.c
diff --git a/drivers/media/video/gspca/spca505.c b/drivers/media/usb/gspca/spca505.c
similarity index 100%
rename from drivers/media/video/gspca/spca505.c
rename to drivers/media/usb/gspca/spca505.c
diff --git a/drivers/media/video/gspca/spca506.c b/drivers/media/usb/gspca/spca506.c
similarity index 100%
rename from drivers/media/video/gspca/spca506.c
rename to drivers/media/usb/gspca/spca506.c
diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/usb/gspca/spca508.c
similarity index 100%
rename from drivers/media/video/gspca/spca508.c
rename to drivers/media/usb/gspca/spca508.c
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/usb/gspca/spca561.c
similarity index 100%
rename from drivers/media/video/gspca/spca561.c
rename to drivers/media/usb/gspca/spca561.c
diff --git a/drivers/media/video/gspca/sq905.c b/drivers/media/usb/gspca/sq905.c
similarity index 100%
rename from drivers/media/video/gspca/sq905.c
rename to drivers/media/usb/gspca/sq905.c
diff --git a/drivers/media/video/gspca/sq905c.c b/drivers/media/usb/gspca/sq905c.c
similarity index 100%
rename from drivers/media/video/gspca/sq905c.c
rename to drivers/media/usb/gspca/sq905c.c
diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/usb/gspca/sq930x.c
similarity index 100%
rename from drivers/media/video/gspca/sq930x.c
rename to drivers/media/usb/gspca/sq930x.c
diff --git a/drivers/media/video/gspca/stk014.c b/drivers/media/usb/gspca/stk014.c
similarity index 100%
rename from drivers/media/video/gspca/stk014.c
rename to drivers/media/usb/gspca/stk014.c
diff --git a/drivers/media/video/gspca/stv0680.c b/drivers/media/usb/gspca/stv0680.c
similarity index 100%
rename from drivers/media/video/gspca/stv0680.c
rename to drivers/media/usb/gspca/stv0680.c
diff --git a/drivers/media/video/gspca/stv06xx/Kconfig b/drivers/media/usb/gspca/stv06xx/Kconfig
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/Kconfig
rename to drivers/media/usb/gspca/stv06xx/Kconfig
diff --git a/drivers/media/video/gspca/stv06xx/Makefile b/drivers/media/usb/gspca/stv06xx/Makefile
similarity index 78%
rename from drivers/media/video/gspca/stv06xx/Makefile
rename to drivers/media/usb/gspca/stv06xx/Makefile
index 38bc410..3a4b2f8 100644
--- a/drivers/media/video/gspca/stv06xx/Makefile
+++ b/drivers/media/usb/gspca/stv06xx/Makefile
@@ -6,5 +6,5 @@ gspca_stv06xx-objs := stv06xx.o \
 		      stv06xx_pb0100.o \
 		      stv06xx_st6422.o
 
-ccflags-y += -I$(srctree)/drivers/media/video/gspca
+ccflags-y += -I$(srctree)/drivers/media/usb/gspca
 
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/usb/gspca/stv06xx/stv06xx.c
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx.c
rename to drivers/media/usb/gspca/stv06xx/stv06xx.c
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.h b/drivers/media/usb/gspca/stv06xx/stv06xx.h
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx.h
rename to drivers/media/usb/gspca/stv06xx/stv06xx.h
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
rename to drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h b/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h
rename to drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c
rename to drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.h b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx_pb0100.h
rename to drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_sensor.h b/drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx_sensor.h
rename to drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c b/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx_st6422.c
rename to drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_st6422.h b/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx_st6422.h
rename to drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c
rename to drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h
similarity index 100%
rename from drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h
rename to drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h
diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/usb/gspca/sunplus.c
similarity index 100%
rename from drivers/media/video/gspca/sunplus.c
rename to drivers/media/usb/gspca/sunplus.c
diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/usb/gspca/t613.c
similarity index 100%
rename from drivers/media/video/gspca/t613.c
rename to drivers/media/usb/gspca/t613.c
diff --git a/drivers/media/video/gspca/topro.c b/drivers/media/usb/gspca/topro.c
similarity index 100%
rename from drivers/media/video/gspca/topro.c
rename to drivers/media/usb/gspca/topro.c
diff --git a/drivers/media/video/gspca/tv8532.c b/drivers/media/usb/gspca/tv8532.c
similarity index 100%
rename from drivers/media/video/gspca/tv8532.c
rename to drivers/media/usb/gspca/tv8532.c
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/usb/gspca/vc032x.c
similarity index 100%
rename from drivers/media/video/gspca/vc032x.c
rename to drivers/media/usb/gspca/vc032x.c
diff --git a/drivers/media/video/gspca/vicam.c b/drivers/media/usb/gspca/vicam.c
similarity index 100%
rename from drivers/media/video/gspca/vicam.c
rename to drivers/media/usb/gspca/vicam.c
diff --git a/drivers/media/video/gspca/w996Xcf.c b/drivers/media/usb/gspca/w996Xcf.c
similarity index 100%
rename from drivers/media/video/gspca/w996Xcf.c
rename to drivers/media/usb/gspca/w996Xcf.c
diff --git a/drivers/media/video/gspca/xirlink_cit.c b/drivers/media/usb/gspca/xirlink_cit.c
similarity index 100%
rename from drivers/media/video/gspca/xirlink_cit.c
rename to drivers/media/usb/gspca/xirlink_cit.c
diff --git a/drivers/media/video/gspca/zc3xx-reg.h b/drivers/media/usb/gspca/zc3xx-reg.h
similarity index 100%
rename from drivers/media/video/gspca/zc3xx-reg.h
rename to drivers/media/usb/gspca/zc3xx-reg.h
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/usb/gspca/zc3xx.c
similarity index 100%
rename from drivers/media/video/gspca/zc3xx.c
rename to drivers/media/usb/gspca/zc3xx.c
diff --git a/drivers/media/video/hdpvr/Kconfig b/drivers/media/usb/hdpvr/Kconfig
similarity index 100%
rename from drivers/media/video/hdpvr/Kconfig
rename to drivers/media/usb/hdpvr/Kconfig
diff --git a/drivers/media/video/hdpvr/Makefile b/drivers/media/usb/hdpvr/Makefile
similarity index 100%
rename from drivers/media/video/hdpvr/Makefile
rename to drivers/media/usb/hdpvr/Makefile
diff --git a/drivers/media/video/hdpvr/hdpvr-control.c b/drivers/media/usb/hdpvr/hdpvr-control.c
similarity index 100%
rename from drivers/media/video/hdpvr/hdpvr-control.c
rename to drivers/media/usb/hdpvr/hdpvr-control.c
diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c
similarity index 100%
rename from drivers/media/video/hdpvr/hdpvr-core.c
rename to drivers/media/usb/hdpvr/hdpvr-core.c
diff --git a/drivers/media/video/hdpvr/hdpvr-i2c.c b/drivers/media/usb/hdpvr/hdpvr-i2c.c
similarity index 100%
rename from drivers/media/video/hdpvr/hdpvr-i2c.c
rename to drivers/media/usb/hdpvr/hdpvr-i2c.c
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
similarity index 100%
rename from drivers/media/video/hdpvr/hdpvr-video.c
rename to drivers/media/usb/hdpvr/hdpvr-video.c
diff --git a/drivers/media/video/hdpvr/hdpvr.h b/drivers/media/usb/hdpvr/hdpvr.h
similarity index 100%
rename from drivers/media/video/hdpvr/hdpvr.h
rename to drivers/media/usb/hdpvr/hdpvr.h
diff --git a/drivers/media/video/pvrusb2/Kconfig b/drivers/media/usb/pvrusb2/Kconfig
similarity index 100%
rename from drivers/media/video/pvrusb2/Kconfig
rename to drivers/media/usb/pvrusb2/Kconfig
diff --git a/drivers/media/video/pvrusb2/Makefile b/drivers/media/usb/pvrusb2/Makefile
similarity index 100%
rename from drivers/media/video/pvrusb2/Makefile
rename to drivers/media/usb/pvrusb2/Makefile
diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.c b/drivers/media/usb/pvrusb2/pvrusb2-audio.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-audio.c
rename to drivers/media/usb/pvrusb2/pvrusb2-audio.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.h b/drivers/media/usb/pvrusb2/pvrusb2-audio.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-audio.h
rename to drivers/media/usb/pvrusb2/pvrusb2-audio.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/usb/pvrusb2/pvrusb2-context.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-context.c
rename to drivers/media/usb/pvrusb2/pvrusb2-context.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.h b/drivers/media/usb/pvrusb2/pvrusb2-context.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-context.h
rename to drivers/media/usb/pvrusb2/pvrusb2-context.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c
rename to drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.h b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-cs53l32a.h
rename to drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/usb/pvrusb2/pvrusb2-ctrl.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-ctrl.c
rename to drivers/media/usb/pvrusb2/pvrusb2-ctrl.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.h b/drivers/media/usb/pvrusb2/pvrusb2-ctrl.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-ctrl.h
rename to drivers/media/usb/pvrusb2/pvrusb2-ctrl.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
rename to drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h
rename to drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debug.h b/drivers/media/usb/pvrusb2/pvrusb2-debug.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-debug.h
rename to drivers/media/usb/pvrusb2/pvrusb2-debug.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-debugifc.c
rename to drivers/media/usb/pvrusb2/pvrusb2-debugifc.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.h b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-debugifc.h
rename to drivers/media/usb/pvrusb2/pvrusb2-debugifc.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/usb/pvrusb2/pvrusb2-devattr.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-devattr.c
rename to drivers/media/usb/pvrusb2/pvrusb2-devattr.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.h b/drivers/media/usb/pvrusb2/pvrusb2-devattr.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-devattr.h
rename to drivers/media/usb/pvrusb2/pvrusb2-devattr.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-dvb.c b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-dvb.c
rename to drivers/media/usb/pvrusb2/pvrusb2-dvb.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-dvb.h b/drivers/media/usb/pvrusb2/pvrusb2-dvb.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-dvb.h
rename to drivers/media/usb/pvrusb2/pvrusb2-dvb.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-eeprom.c
rename to drivers/media/usb/pvrusb2/pvrusb2-eeprom.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.h b/drivers/media/usb/pvrusb2/pvrusb2-eeprom.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-eeprom.h
rename to drivers/media/usb/pvrusb2/pvrusb2-eeprom.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/usb/pvrusb2/pvrusb2-encoder.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-encoder.c
rename to drivers/media/usb/pvrusb2/pvrusb2-encoder.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.h b/drivers/media/usb/pvrusb2/pvrusb2-encoder.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-encoder.h
rename to drivers/media/usb/pvrusb2/pvrusb2-encoder.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h b/drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h
rename to drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
rename to drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-hdw.c
rename to drivers/media/usb/pvrusb2/pvrusb2-hdw.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/usb/pvrusb2/pvrusb2-hdw.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-hdw.h
rename to drivers/media/usb/pvrusb2/pvrusb2-hdw.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
rename to drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-i2c-core.h
rename to drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.c b/drivers/media/usb/pvrusb2/pvrusb2-io.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-io.c
rename to drivers/media/usb/pvrusb2/pvrusb2-io.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.h b/drivers/media/usb/pvrusb2/pvrusb2-io.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-io.h
rename to drivers/media/usb/pvrusb2/pvrusb2-io.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/drivers/media/usb/pvrusb2/pvrusb2-ioread.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-ioread.c
rename to drivers/media/usb/pvrusb2/pvrusb2-ioread.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.h b/drivers/media/usb/pvrusb2/pvrusb2-ioread.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-ioread.h
rename to drivers/media/usb/pvrusb2/pvrusb2-ioread.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/usb/pvrusb2/pvrusb2-main.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-main.c
rename to drivers/media/usb/pvrusb2/pvrusb2-main.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/usb/pvrusb2/pvrusb2-std.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-std.c
rename to drivers/media/usb/pvrusb2/pvrusb2-std.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.h b/drivers/media/usb/pvrusb2/pvrusb2-std.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-std.h
rename to drivers/media/usb/pvrusb2/pvrusb2-std.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-sysfs.c
rename to drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.h b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-sysfs.h
rename to drivers/media/usb/pvrusb2/pvrusb2-sysfs.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-util.h b/drivers/media/usb/pvrusb2/pvrusb2-util.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-util.h
rename to drivers/media/usb/pvrusb2/pvrusb2-util.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-v4l2.c
rename to drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.h b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-v4l2.h
rename to drivers/media/usb/pvrusb2/pvrusb2-v4l2.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
rename to drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h b/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-video-v4l.h
rename to drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/drivers/media/usb/pvrusb2/pvrusb2-wm8775.c
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-wm8775.c
rename to drivers/media/usb/pvrusb2/pvrusb2-wm8775.c
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.h b/drivers/media/usb/pvrusb2/pvrusb2-wm8775.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2-wm8775.h
rename to drivers/media/usb/pvrusb2/pvrusb2-wm8775.h
diff --git a/drivers/media/video/pvrusb2/pvrusb2.h b/drivers/media/usb/pvrusb2/pvrusb2.h
similarity index 100%
rename from drivers/media/video/pvrusb2/pvrusb2.h
rename to drivers/media/usb/pvrusb2/pvrusb2.h
diff --git a/drivers/media/video/pwc/Kconfig b/drivers/media/usb/pwc/Kconfig
similarity index 100%
rename from drivers/media/video/pwc/Kconfig
rename to drivers/media/usb/pwc/Kconfig
diff --git a/drivers/media/video/pwc/Makefile b/drivers/media/usb/pwc/Makefile
similarity index 100%
rename from drivers/media/video/pwc/Makefile
rename to drivers/media/usb/pwc/Makefile
diff --git a/drivers/media/video/pwc/philips.txt b/drivers/media/usb/pwc/philips.txt
similarity index 100%
rename from drivers/media/video/pwc/philips.txt
rename to drivers/media/usb/pwc/philips.txt
diff --git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/usb/pwc/pwc-ctrl.c
similarity index 100%
rename from drivers/media/video/pwc/pwc-ctrl.c
rename to drivers/media/usb/pwc/pwc-ctrl.c
diff --git a/drivers/media/video/pwc/pwc-dec1.c b/drivers/media/usb/pwc/pwc-dec1.c
similarity index 100%
rename from drivers/media/video/pwc/pwc-dec1.c
rename to drivers/media/usb/pwc/pwc-dec1.c
diff --git a/drivers/media/video/pwc/pwc-dec1.h b/drivers/media/usb/pwc/pwc-dec1.h
similarity index 100%
rename from drivers/media/video/pwc/pwc-dec1.h
rename to drivers/media/usb/pwc/pwc-dec1.h
diff --git a/drivers/media/video/pwc/pwc-dec23.c b/drivers/media/usb/pwc/pwc-dec23.c
similarity index 100%
rename from drivers/media/video/pwc/pwc-dec23.c
rename to drivers/media/usb/pwc/pwc-dec23.c
diff --git a/drivers/media/video/pwc/pwc-dec23.h b/drivers/media/usb/pwc/pwc-dec23.h
similarity index 100%
rename from drivers/media/video/pwc/pwc-dec23.h
rename to drivers/media/usb/pwc/pwc-dec23.h
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
similarity index 100%
rename from drivers/media/video/pwc/pwc-if.c
rename to drivers/media/usb/pwc/pwc-if.c
diff --git a/drivers/media/video/pwc/pwc-kiara.c b/drivers/media/usb/pwc/pwc-kiara.c
similarity index 100%
rename from drivers/media/video/pwc/pwc-kiara.c
rename to drivers/media/usb/pwc/pwc-kiara.c
diff --git a/drivers/media/video/pwc/pwc-kiara.h b/drivers/media/usb/pwc/pwc-kiara.h
similarity index 100%
rename from drivers/media/video/pwc/pwc-kiara.h
rename to drivers/media/usb/pwc/pwc-kiara.h
diff --git a/drivers/media/video/pwc/pwc-misc.c b/drivers/media/usb/pwc/pwc-misc.c
similarity index 100%
rename from drivers/media/video/pwc/pwc-misc.c
rename to drivers/media/usb/pwc/pwc-misc.c
diff --git a/drivers/media/video/pwc/pwc-nala.h b/drivers/media/usb/pwc/pwc-nala.h
similarity index 100%
rename from drivers/media/video/pwc/pwc-nala.h
rename to drivers/media/usb/pwc/pwc-nala.h
diff --git a/drivers/media/video/pwc/pwc-timon.c b/drivers/media/usb/pwc/pwc-timon.c
similarity index 100%
rename from drivers/media/video/pwc/pwc-timon.c
rename to drivers/media/usb/pwc/pwc-timon.c
diff --git a/drivers/media/video/pwc/pwc-timon.h b/drivers/media/usb/pwc/pwc-timon.h
similarity index 100%
rename from drivers/media/video/pwc/pwc-timon.h
rename to drivers/media/usb/pwc/pwc-timon.h
diff --git a/drivers/media/video/pwc/pwc-uncompress.c b/drivers/media/usb/pwc/pwc-uncompress.c
similarity index 100%
rename from drivers/media/video/pwc/pwc-uncompress.c
rename to drivers/media/usb/pwc/pwc-uncompress.c
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/usb/pwc/pwc-v4l.c
similarity index 100%
rename from drivers/media/video/pwc/pwc-v4l.c
rename to drivers/media/usb/pwc/pwc-v4l.c
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/usb/pwc/pwc.h
similarity index 100%
rename from drivers/media/video/pwc/pwc.h
rename to drivers/media/usb/pwc/pwc.h
diff --git a/drivers/media/video/sn9c102/Kconfig b/drivers/media/usb/sn9c102/Kconfig
similarity index 100%
rename from drivers/media/video/sn9c102/Kconfig
rename to drivers/media/usb/sn9c102/Kconfig
diff --git a/drivers/media/video/sn9c102/Makefile b/drivers/media/usb/sn9c102/Makefile
similarity index 100%
rename from drivers/media/video/sn9c102/Makefile
rename to drivers/media/usb/sn9c102/Makefile
diff --git a/drivers/media/video/sn9c102/sn9c102.h b/drivers/media/usb/sn9c102/sn9c102.h
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102.h
rename to drivers/media/usb/sn9c102/sn9c102.h
diff --git a/drivers/media/video/sn9c102/sn9c102_config.h b/drivers/media/usb/sn9c102/sn9c102_config.h
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_config.h
rename to drivers/media/usb/sn9c102/sn9c102_config.h
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/usb/sn9c102/sn9c102_core.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_core.c
rename to drivers/media/usb/sn9c102/sn9c102_core.c
diff --git a/drivers/media/video/sn9c102/sn9c102_devtable.h b/drivers/media/usb/sn9c102/sn9c102_devtable.h
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_devtable.h
rename to drivers/media/usb/sn9c102/sn9c102_devtable.h
diff --git a/drivers/media/video/sn9c102/sn9c102_hv7131d.c b/drivers/media/usb/sn9c102/sn9c102_hv7131d.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_hv7131d.c
rename to drivers/media/usb/sn9c102/sn9c102_hv7131d.c
diff --git a/drivers/media/video/sn9c102/sn9c102_hv7131r.c b/drivers/media/usb/sn9c102/sn9c102_hv7131r.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_hv7131r.c
rename to drivers/media/usb/sn9c102/sn9c102_hv7131r.c
diff --git a/drivers/media/video/sn9c102/sn9c102_mi0343.c b/drivers/media/usb/sn9c102/sn9c102_mi0343.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_mi0343.c
rename to drivers/media/usb/sn9c102/sn9c102_mi0343.c
diff --git a/drivers/media/video/sn9c102/sn9c102_mi0360.c b/drivers/media/usb/sn9c102/sn9c102_mi0360.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_mi0360.c
rename to drivers/media/usb/sn9c102/sn9c102_mi0360.c
diff --git a/drivers/media/video/sn9c102/sn9c102_mt9v111.c b/drivers/media/usb/sn9c102/sn9c102_mt9v111.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_mt9v111.c
rename to drivers/media/usb/sn9c102/sn9c102_mt9v111.c
diff --git a/drivers/media/video/sn9c102/sn9c102_ov7630.c b/drivers/media/usb/sn9c102/sn9c102_ov7630.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_ov7630.c
rename to drivers/media/usb/sn9c102/sn9c102_ov7630.c
diff --git a/drivers/media/video/sn9c102/sn9c102_ov7660.c b/drivers/media/usb/sn9c102/sn9c102_ov7660.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_ov7660.c
rename to drivers/media/usb/sn9c102/sn9c102_ov7660.c
diff --git a/drivers/media/video/sn9c102/sn9c102_pas106b.c b/drivers/media/usb/sn9c102/sn9c102_pas106b.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_pas106b.c
rename to drivers/media/usb/sn9c102/sn9c102_pas106b.c
diff --git a/drivers/media/video/sn9c102/sn9c102_pas202bcb.c b/drivers/media/usb/sn9c102/sn9c102_pas202bcb.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_pas202bcb.c
rename to drivers/media/usb/sn9c102/sn9c102_pas202bcb.c
diff --git a/drivers/media/video/sn9c102/sn9c102_sensor.h b/drivers/media/usb/sn9c102/sn9c102_sensor.h
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_sensor.h
rename to drivers/media/usb/sn9c102/sn9c102_sensor.h
diff --git a/drivers/media/video/sn9c102/sn9c102_tas5110c1b.c b/drivers/media/usb/sn9c102/sn9c102_tas5110c1b.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_tas5110c1b.c
rename to drivers/media/usb/sn9c102/sn9c102_tas5110c1b.c
diff --git a/drivers/media/video/sn9c102/sn9c102_tas5110d.c b/drivers/media/usb/sn9c102/sn9c102_tas5110d.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_tas5110d.c
rename to drivers/media/usb/sn9c102/sn9c102_tas5110d.c
diff --git a/drivers/media/video/sn9c102/sn9c102_tas5130d1b.c b/drivers/media/usb/sn9c102/sn9c102_tas5130d1b.c
similarity index 100%
rename from drivers/media/video/sn9c102/sn9c102_tas5130d1b.c
rename to drivers/media/usb/sn9c102/sn9c102_tas5130d1b.c
diff --git a/drivers/media/video/stk1160/Kconfig b/drivers/media/usb/stk1160/Kconfig
similarity index 100%
rename from drivers/media/video/stk1160/Kconfig
rename to drivers/media/usb/stk1160/Kconfig
diff --git a/drivers/media/video/stk1160/Makefile b/drivers/media/usb/stk1160/Makefile
similarity index 100%
rename from drivers/media/video/stk1160/Makefile
rename to drivers/media/usb/stk1160/Makefile
diff --git a/drivers/media/video/stk1160/stk1160-ac97.c b/drivers/media/usb/stk1160/stk1160-ac97.c
similarity index 100%
rename from drivers/media/video/stk1160/stk1160-ac97.c
rename to drivers/media/usb/stk1160/stk1160-ac97.c
diff --git a/drivers/media/video/stk1160/stk1160-core.c b/drivers/media/usb/stk1160/stk1160-core.c
similarity index 100%
rename from drivers/media/video/stk1160/stk1160-core.c
rename to drivers/media/usb/stk1160/stk1160-core.c
diff --git a/drivers/media/video/stk1160/stk1160-i2c.c b/drivers/media/usb/stk1160/stk1160-i2c.c
similarity index 100%
rename from drivers/media/video/stk1160/stk1160-i2c.c
rename to drivers/media/usb/stk1160/stk1160-i2c.c
diff --git a/drivers/media/video/stk1160/stk1160-reg.h b/drivers/media/usb/stk1160/stk1160-reg.h
similarity index 100%
rename from drivers/media/video/stk1160/stk1160-reg.h
rename to drivers/media/usb/stk1160/stk1160-reg.h
diff --git a/drivers/media/video/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c
similarity index 100%
rename from drivers/media/video/stk1160/stk1160-v4l.c
rename to drivers/media/usb/stk1160/stk1160-v4l.c
diff --git a/drivers/media/video/stk1160/stk1160-video.c b/drivers/media/usb/stk1160/stk1160-video.c
similarity index 100%
rename from drivers/media/video/stk1160/stk1160-video.c
rename to drivers/media/usb/stk1160/stk1160-video.c
diff --git a/drivers/media/video/stk1160/stk1160.h b/drivers/media/usb/stk1160/stk1160.h
similarity index 100%
rename from drivers/media/video/stk1160/stk1160.h
rename to drivers/media/usb/stk1160/stk1160.h
diff --git a/drivers/media/video/tlg2300/Kconfig b/drivers/media/usb/tlg2300/Kconfig
similarity index 100%
rename from drivers/media/video/tlg2300/Kconfig
rename to drivers/media/usb/tlg2300/Kconfig
diff --git a/drivers/media/video/tlg2300/Makefile b/drivers/media/usb/tlg2300/Makefile
similarity index 100%
rename from drivers/media/video/tlg2300/Makefile
rename to drivers/media/usb/tlg2300/Makefile
diff --git a/drivers/media/video/tlg2300/pd-alsa.c b/drivers/media/usb/tlg2300/pd-alsa.c
similarity index 100%
rename from drivers/media/video/tlg2300/pd-alsa.c
rename to drivers/media/usb/tlg2300/pd-alsa.c
diff --git a/drivers/media/video/tlg2300/pd-common.h b/drivers/media/usb/tlg2300/pd-common.h
similarity index 100%
rename from drivers/media/video/tlg2300/pd-common.h
rename to drivers/media/usb/tlg2300/pd-common.h
diff --git a/drivers/media/video/tlg2300/pd-dvb.c b/drivers/media/usb/tlg2300/pd-dvb.c
similarity index 100%
rename from drivers/media/video/tlg2300/pd-dvb.c
rename to drivers/media/usb/tlg2300/pd-dvb.c
diff --git a/drivers/media/video/tlg2300/pd-main.c b/drivers/media/usb/tlg2300/pd-main.c
similarity index 100%
rename from drivers/media/video/tlg2300/pd-main.c
rename to drivers/media/usb/tlg2300/pd-main.c
diff --git a/drivers/media/video/tlg2300/pd-radio.c b/drivers/media/usb/tlg2300/pd-radio.c
similarity index 100%
rename from drivers/media/video/tlg2300/pd-radio.c
rename to drivers/media/usb/tlg2300/pd-radio.c
diff --git a/drivers/media/video/tlg2300/pd-video.c b/drivers/media/usb/tlg2300/pd-video.c
similarity index 100%
rename from drivers/media/video/tlg2300/pd-video.c
rename to drivers/media/usb/tlg2300/pd-video.c
diff --git a/drivers/media/video/tlg2300/vendorcmds.h b/drivers/media/usb/tlg2300/vendorcmds.h
similarity index 100%
rename from drivers/media/video/tlg2300/vendorcmds.h
rename to drivers/media/usb/tlg2300/vendorcmds.h
diff --git a/drivers/media/video/tm6000/Kconfig b/drivers/media/usb/tm6000/Kconfig
similarity index 100%
rename from drivers/media/video/tm6000/Kconfig
rename to drivers/media/usb/tm6000/Kconfig
diff --git a/drivers/media/video/tm6000/Makefile b/drivers/media/usb/tm6000/Makefile
similarity index 100%
rename from drivers/media/video/tm6000/Makefile
rename to drivers/media/usb/tm6000/Makefile
diff --git a/drivers/media/video/tm6000/tm6000-alsa.c b/drivers/media/usb/tm6000/tm6000-alsa.c
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-alsa.c
rename to drivers/media/usb/tm6000/tm6000-alsa.c
diff --git a/drivers/media/video/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm6000-cards.c
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-cards.c
rename to drivers/media/usb/tm6000/tm6000-cards.c
diff --git a/drivers/media/video/tm6000/tm6000-core.c b/drivers/media/usb/tm6000/tm6000-core.c
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-core.c
rename to drivers/media/usb/tm6000/tm6000-core.c
diff --git a/drivers/media/video/tm6000/tm6000-dvb.c b/drivers/media/usb/tm6000/tm6000-dvb.c
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-dvb.c
rename to drivers/media/usb/tm6000/tm6000-dvb.c
diff --git a/drivers/media/video/tm6000/tm6000-i2c.c b/drivers/media/usb/tm6000/tm6000-i2c.c
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-i2c.c
rename to drivers/media/usb/tm6000/tm6000-i2c.c
diff --git a/drivers/media/video/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-input.c
rename to drivers/media/usb/tm6000/tm6000-input.c
diff --git a/drivers/media/video/tm6000/tm6000-regs.h b/drivers/media/usb/tm6000/tm6000-regs.h
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-regs.h
rename to drivers/media/usb/tm6000/tm6000-regs.h
diff --git a/drivers/media/video/tm6000/tm6000-stds.c b/drivers/media/usb/tm6000/tm6000-stds.c
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-stds.c
rename to drivers/media/usb/tm6000/tm6000-stds.c
diff --git a/drivers/media/video/tm6000/tm6000-usb-isoc.h b/drivers/media/usb/tm6000/tm6000-usb-isoc.h
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-usb-isoc.h
rename to drivers/media/usb/tm6000/tm6000-usb-isoc.h
diff --git a/drivers/media/video/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c
similarity index 100%
rename from drivers/media/video/tm6000/tm6000-video.c
rename to drivers/media/usb/tm6000/tm6000-video.c
diff --git a/drivers/media/video/tm6000/tm6000.h b/drivers/media/usb/tm6000/tm6000.h
similarity index 100%
rename from drivers/media/video/tm6000/tm6000.h
rename to drivers/media/usb/tm6000/tm6000.h
diff --git a/drivers/media/video/usbvision/Kconfig b/drivers/media/usb/usbvision/Kconfig
similarity index 100%
rename from drivers/media/video/usbvision/Kconfig
rename to drivers/media/usb/usbvision/Kconfig
diff --git a/drivers/media/video/usbvision/Makefile b/drivers/media/usb/usbvision/Makefile
similarity index 100%
rename from drivers/media/video/usbvision/Makefile
rename to drivers/media/usb/usbvision/Makefile
diff --git a/drivers/media/video/usbvision/usbvision-cards.c b/drivers/media/usb/usbvision/usbvision-cards.c
similarity index 100%
rename from drivers/media/video/usbvision/usbvision-cards.c
rename to drivers/media/usb/usbvision/usbvision-cards.c
diff --git a/drivers/media/video/usbvision/usbvision-cards.h b/drivers/media/usb/usbvision/usbvision-cards.h
similarity index 100%
rename from drivers/media/video/usbvision/usbvision-cards.h
rename to drivers/media/usb/usbvision/usbvision-cards.h
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/usb/usbvision/usbvision-core.c
similarity index 100%
rename from drivers/media/video/usbvision/usbvision-core.c
rename to drivers/media/usb/usbvision/usbvision-core.c
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/usb/usbvision/usbvision-i2c.c
similarity index 100%
rename from drivers/media/video/usbvision/usbvision-i2c.c
rename to drivers/media/usb/usbvision/usbvision-i2c.c
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
similarity index 100%
rename from drivers/media/video/usbvision/usbvision-video.c
rename to drivers/media/usb/usbvision/usbvision-video.c
diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/usb/usbvision/usbvision.h
similarity index 100%
rename from drivers/media/video/usbvision/usbvision.h
rename to drivers/media/usb/usbvision/usbvision.h
diff --git a/drivers/media/video/uvc/Kconfig b/drivers/media/usb/uvc/Kconfig
similarity index 100%
rename from drivers/media/video/uvc/Kconfig
rename to drivers/media/usb/uvc/Kconfig
diff --git a/drivers/media/video/uvc/Makefile b/drivers/media/usb/uvc/Makefile
similarity index 100%
rename from drivers/media/video/uvc/Makefile
rename to drivers/media/usb/uvc/Makefile
diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
similarity index 100%
rename from drivers/media/video/uvc/uvc_ctrl.c
rename to drivers/media/usb/uvc/uvc_ctrl.c
diff --git a/drivers/media/video/uvc/uvc_debugfs.c b/drivers/media/usb/uvc/uvc_debugfs.c
similarity index 100%
rename from drivers/media/video/uvc/uvc_debugfs.c
rename to drivers/media/usb/uvc/uvc_debugfs.c
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
similarity index 100%
rename from drivers/media/video/uvc/uvc_driver.c
rename to drivers/media/usb/uvc/uvc_driver.c
diff --git a/drivers/media/video/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc_entity.c
similarity index 100%
rename from drivers/media/video/uvc/uvc_entity.c
rename to drivers/media/usb/uvc/uvc_entity.c
diff --git a/drivers/media/video/uvc/uvc_isight.c b/drivers/media/usb/uvc/uvc_isight.c
similarity index 100%
rename from drivers/media/video/uvc/uvc_isight.c
rename to drivers/media/usb/uvc/uvc_isight.c
diff --git a/drivers/media/video/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c
similarity index 100%
rename from drivers/media/video/uvc/uvc_queue.c
rename to drivers/media/usb/uvc/uvc_queue.c
diff --git a/drivers/media/video/uvc/uvc_status.c b/drivers/media/usb/uvc/uvc_status.c
similarity index 100%
rename from drivers/media/video/uvc/uvc_status.c
rename to drivers/media/usb/uvc/uvc_status.c
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
similarity index 100%
rename from drivers/media/video/uvc/uvc_v4l2.c
rename to drivers/media/usb/uvc/uvc_v4l2.c
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
similarity index 100%
rename from drivers/media/video/uvc/uvc_video.c
rename to drivers/media/usb/uvc/uvc_video.c
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
similarity index 100%
rename from drivers/media/video/uvc/uvcvideo.h
rename to drivers/media/usb/uvc/uvcvideo.h
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 068e8da..097b17ce 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -616,16 +616,6 @@ menuconfig V4L_USB_DRIVERS
 
 if V4L_USB_DRIVERS && MEDIA_CAMERA_SUPPORT
 
-	comment "Webcam devices"
-
-source "drivers/media/video/uvc/Kconfig"
-
-source "drivers/media/video/gspca/Kconfig"
-
-source "drivers/media/video/pwc/Kconfig"
-
-source "drivers/media/video/cpia2/Kconfig"
-
 config USB_ZR364XX
 	tristate "USB ZR364XX Camera support"
 	depends on VIDEO_V4L2
@@ -662,40 +652,9 @@ config USB_S2255
 	  Say Y here if you want support for the Sensoray 2255 USB device.
 	  This driver can be compiled as a module, called s2255drv.
 
-source "drivers/media/video/sn9c102/Kconfig"
 
 endif # V4L_USB_DRIVERS && MEDIA_CAMERA_SUPPORT
 
-if V4L_USB_DRIVERS
-
-	comment "Webcam and/or TV USB devices"
-
-source "drivers/media/video/em28xx/Kconfig"
-
-endif
-
-if V4L_USB_DRIVERS && MEDIA_ANALOG_TV_SUPPORT
-
-	comment "TV USB devices"
-
-source "drivers/media/video/au0828/Kconfig"
-
-source "drivers/media/video/pvrusb2/Kconfig"
-
-source "drivers/media/video/hdpvr/Kconfig"
-
-source "drivers/media/video/tlg2300/Kconfig"
-
-source "drivers/media/video/cx231xx/Kconfig"
-
-source "drivers/media/video/tm6000/Kconfig"
-
-source "drivers/media/video/usbvision/Kconfig"
-
-source "drivers/media/video/stk1160/Kconfig"
-
-endif # V4L_USB_DRIVERS
-
 #
 # PCI drivers configuration - No devices here are for webcams
 #
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 9dff3e2..a22a258 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -99,20 +99,12 @@ obj-$(CONFIG_VIDEO_VINO) += vino.o
 obj-$(CONFIG_VIDEO_MEYE) += meye.o
 obj-$(CONFIG_VIDEO_SAA7134) += saa7134/
 obj-$(CONFIG_VIDEO_CX88) += cx88/
-obj-$(CONFIG_VIDEO_EM28XX) += em28xx/
-obj-$(CONFIG_VIDEO_TLG2300) += tlg2300/
-obj-$(CONFIG_VIDEO_CX231XX) += cx231xx/
 obj-$(CONFIG_VIDEO_CX25821) += cx25821/
-obj-$(CONFIG_VIDEO_USBVISION) += usbvision/
-obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2/
-obj-$(CONFIG_VIDEO_CPIA2) += cpia2/
-obj-$(CONFIG_VIDEO_TM6000) += tm6000/
 obj-$(CONFIG_VIDEO_MXB) += mxb.o
 obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
 obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
 obj-$(CONFIG_STA2X11_VIP) += sta2x11_vip.o
 obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
-obj-$(CONFIG_VIDEO_STK1160) += stk1160/
 
 obj-$(CONFIG_VIDEO_BTCX)  += btcx-risc.o
 
@@ -130,11 +122,6 @@ obj-$(CONFIG_VIDEO_OMAP3)	+= omap3isp/
 obj-$(CONFIG_USB_ZR364XX)       += zr364xx.o
 obj-$(CONFIG_USB_STKWEBCAM)     += stkwebcam.o
 
-obj-$(CONFIG_USB_SN9C102)       += sn9c102/
-obj-$(CONFIG_USB_PWC)           += pwc/
-obj-$(CONFIG_USB_GSPCA)         += gspca/
-
-obj-$(CONFIG_VIDEO_HDPVR)	+= hdpvr/
 
 obj-$(CONFIG_USB_S2255)		+= s2255drv.o
 
@@ -179,9 +166,6 @@ obj-$(CONFIG_ARCH_DAVINCI)		+= davinci/
 
 obj-$(CONFIG_VIDEO_SH_VOU)		+= sh_vou.o
 
-obj-$(CONFIG_VIDEO_AU0828) += au0828/
-
-obj-$(CONFIG_USB_VIDEO_CLASS)	+= uvc/
 obj-$(CONFIG_VIDEO_SAA7164)     += saa7164/
 
 obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 02/12] [media] move the remaining USB drivers to drivers/media/usb
  2012-08-15 13:48   ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 01/12] [media] rename most media/video usb drivers to media/usb Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 03/12] [media] bt8xx: move analog TV part to be together with DTV one Mauro Carvalho Chehab
                       ` (9 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Move the 3 remaining usb drivers to their proper space.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 MAINTAINERS                                        |  2 +-
 drivers/media/usb/Kconfig                          |  3 ++
 drivers/media/usb/Makefile                         |  2 +
 drivers/media/usb/s2255/Kconfig                    |  9 ++++
 drivers/media/usb/s2255/Makefile                   |  2 +
 drivers/media/{video => usb/s2255}/s2255drv.c      |  0
 drivers/media/usb/stkwebcam/Kconfig                | 13 ++++++
 drivers/media/usb/stkwebcam/Makefile               |  4 ++
 .../media/{video => usb/stkwebcam}/stk-sensor.c    |  0
 .../media/{video => usb/stkwebcam}/stk-webcam.c    |  0
 .../media/{video => usb/stkwebcam}/stk-webcam.h    |  0
 drivers/media/usb/zr364xx/Kconfig                  | 14 ++++++
 drivers/media/usb/zr364xx/Makefile                 |  2 +
 drivers/media/{video => usb/zr364xx}/zr364xx.c     |  0
 drivers/media/video/Kconfig                        | 50 ----------------------
 drivers/media/video/Makefile                       |  8 ----
 16 files changed, 50 insertions(+), 59 deletions(-)
 create mode 100644 drivers/media/usb/s2255/Kconfig
 create mode 100644 drivers/media/usb/s2255/Makefile
 rename drivers/media/{video => usb/s2255}/s2255drv.c (100%)
 create mode 100644 drivers/media/usb/stkwebcam/Kconfig
 create mode 100644 drivers/media/usb/stkwebcam/Makefile
 rename drivers/media/{video => usb/stkwebcam}/stk-sensor.c (100%)
 rename drivers/media/{video => usb/stkwebcam}/stk-webcam.c (100%)
 rename drivers/media/{video => usb/stkwebcam}/stk-webcam.h (100%)
 create mode 100644 drivers/media/usb/zr364xx/Kconfig
 create mode 100644 drivers/media/usb/zr364xx/Makefile
 rename drivers/media/{video => usb/zr364xx}/zr364xx.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 13fd97f..99a930d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7371,7 +7371,7 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
 W:	http://royale.zerezo.com/zr364xx/
 S:	Maintained
 F:	Documentation/video4linux/zr364xx.txt
-F:	drivers/media/video/zr364xx.c
+F:	drivers/media/usb/zr364xx.c
 
 USER-MODE LINUX (UML)
 M:	Jeff Dike <jdike@addtoit.com>
diff --git a/drivers/media/usb/Kconfig b/drivers/media/usb/Kconfig
index a1e25ee..069a3c1 100644
--- a/drivers/media/usb/Kconfig
+++ b/drivers/media/usb/Kconfig
@@ -11,6 +11,9 @@ source "drivers/media/usb/uvc/Kconfig"
 source "drivers/media/usb/gspca/Kconfig"
 source "drivers/media/usb/pwc/Kconfig"
 source "drivers/media/usb/cpia2/Kconfig"
+source "drivers/media/usb/zr364xx/Kconfig"
+source "drivers/media/usb/stkwebcam/Kconfig"
+source "drivers/media/usb/s2255/Kconfig"
 source "drivers/media/usb/sn9c102/Kconfig"
 endif
 
diff --git a/drivers/media/usb/Makefile b/drivers/media/usb/Makefile
index 428827a..63e37bb 100644
--- a/drivers/media/usb/Makefile
+++ b/drivers/media/usb/Makefile
@@ -4,6 +4,8 @@
 
 # DVB USB-only drivers
 obj-y := ttusb-dec/ ttusb-budget/ dvb-usb/ dvb-usb-v2/ siano/ b2c2/
+obj-y := zr364xx/ stkwebcam/ s2255/
+
 obj-$(CONFIG_USB_VIDEO_CLASS)	+= uvc/
 obj-$(CONFIG_USB_GSPCA)         += gspca/
 obj-$(CONFIG_USB_PWC)           += pwc/
diff --git a/drivers/media/usb/s2255/Kconfig b/drivers/media/usb/s2255/Kconfig
new file mode 100644
index 0000000..7e8ee1f
--- /dev/null
+++ b/drivers/media/usb/s2255/Kconfig
@@ -0,0 +1,9 @@
+config USB_S2255
+	tristate "USB Sensoray 2255 video capture device"
+	depends on VIDEO_V4L2
+	select VIDEOBUF_VMALLOC
+	default n
+	help
+	  Say Y here if you want support for the Sensoray 2255 USB device.
+	  This driver can be compiled as a module, called s2255drv.
+
diff --git a/drivers/media/usb/s2255/Makefile b/drivers/media/usb/s2255/Makefile
new file mode 100644
index 0000000..197d0bb
--- /dev/null
+++ b/drivers/media/usb/s2255/Makefile
@@ -0,0 +1,2 @@
+obj-$(CONFIG_USB_S2255)		+= s2255drv.o
+
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
similarity index 100%
rename from drivers/media/video/s2255drv.c
rename to drivers/media/usb/s2255/s2255drv.c
diff --git a/drivers/media/usb/stkwebcam/Kconfig b/drivers/media/usb/stkwebcam/Kconfig
new file mode 100644
index 0000000..2fb0c2b
--- /dev/null
+++ b/drivers/media/usb/stkwebcam/Kconfig
@@ -0,0 +1,13 @@
+config USB_STKWEBCAM
+	tristate "USB Syntek DC1125 Camera support"
+	depends on VIDEO_V4L2 && EXPERIMENTAL
+	---help---
+	  Say Y here if you want to use this type of camera.
+	  Supported devices are typically found in some Asus laptops,
+	  with USB id 174f:a311 and 05e1:0501. Other Syntek cameras
+	  may be supported by the stk11xx driver, from which this is
+	  derived, see <http://sourceforge.net/projects/syntekdriver/>
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called stkwebcam.
+
diff --git a/drivers/media/usb/stkwebcam/Makefile b/drivers/media/usb/stkwebcam/Makefile
new file mode 100644
index 0000000..20ef8a4
--- /dev/null
+++ b/drivers/media/usb/stkwebcam/Makefile
@@ -0,0 +1,4 @@
+stkwebcam-objs	:=	stk-webcam.o stk-sensor.o
+
+obj-$(CONFIG_USB_STKWEBCAM)     += stkwebcam.o
+
diff --git a/drivers/media/video/stk-sensor.c b/drivers/media/usb/stkwebcam/stk-sensor.c
similarity index 100%
rename from drivers/media/video/stk-sensor.c
rename to drivers/media/usb/stkwebcam/stk-sensor.c
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
similarity index 100%
rename from drivers/media/video/stk-webcam.c
rename to drivers/media/usb/stkwebcam/stk-webcam.c
diff --git a/drivers/media/video/stk-webcam.h b/drivers/media/usb/stkwebcam/stk-webcam.h
similarity index 100%
rename from drivers/media/video/stk-webcam.h
rename to drivers/media/usb/stkwebcam/stk-webcam.h
diff --git a/drivers/media/usb/zr364xx/Kconfig b/drivers/media/usb/zr364xx/Kconfig
new file mode 100644
index 0000000..0f58566
--- /dev/null
+++ b/drivers/media/usb/zr364xx/Kconfig
@@ -0,0 +1,14 @@
+config USB_ZR364XX
+	tristate "USB ZR364XX Camera support"
+	depends on VIDEO_V4L2
+	select VIDEOBUF_GEN
+	select VIDEOBUF_VMALLOC
+	---help---
+	  Say Y here if you want to connect this type of camera to your
+	  computer's USB port.
+	  See <file:Documentation/video4linux/zr364xx.txt> for more info
+	  and list of supported cameras.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called zr364xx.
+
diff --git a/drivers/media/usb/zr364xx/Makefile b/drivers/media/usb/zr364xx/Makefile
new file mode 100644
index 0000000..a577788
--- /dev/null
+++ b/drivers/media/usb/zr364xx/Makefile
@@ -0,0 +1,2 @@
+obj-$(CONFIG_USB_ZR364XX)       += zr364xx.o
+
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c
similarity index 100%
rename from drivers/media/video/zr364xx.c
rename to drivers/media/usb/zr364xx/zr364xx.c
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 097b17ce..f527992 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -606,56 +606,6 @@ config VIDEO_VIVI
 	  In doubt, say N.
 
 #
-# USB Multimedia device configuration
-#
-
-menuconfig V4L_USB_DRIVERS
-	bool "V4L USB devices"
-	depends on USB
-	default y
-
-if V4L_USB_DRIVERS && MEDIA_CAMERA_SUPPORT
-
-config USB_ZR364XX
-	tristate "USB ZR364XX Camera support"
-	depends on VIDEO_V4L2
-	select VIDEOBUF_GEN
-	select VIDEOBUF_VMALLOC
-	---help---
-	  Say Y here if you want to connect this type of camera to your
-	  computer's USB port.
-	  See <file:Documentation/video4linux/zr364xx.txt> for more info
-	  and list of supported cameras.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called zr364xx.
-
-config USB_STKWEBCAM
-	tristate "USB Syntek DC1125 Camera support"
-	depends on VIDEO_V4L2 && EXPERIMENTAL
-	---help---
-	  Say Y here if you want to use this type of camera.
-	  Supported devices are typically found in some Asus laptops,
-	  with USB id 174f:a311 and 05e1:0501. Other Syntek cameras
-	  may be supported by the stk11xx driver, from which this is
-	  derived, see <http://sourceforge.net/projects/syntekdriver/>
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called stkwebcam.
-
-config USB_S2255
-	tristate "USB Sensoray 2255 video capture device"
-	depends on VIDEO_V4L2
-	select VIDEOBUF_VMALLOC
-	default n
-	help
-	  Say Y here if you want support for the Sensoray 2255 USB device.
-	  This driver can be compiled as a module, called s2255drv.
-
-
-endif # V4L_USB_DRIVERS && MEDIA_CAMERA_SUPPORT
-
-#
 # PCI drivers configuration - No devices here are for webcams
 #
 
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index a22a258..4ad5bd9 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -4,8 +4,6 @@
 
 msp3400-objs	:=	msp3400-driver.o msp3400-kthreads.o
 
-stkwebcam-objs	:=	stk-webcam.o stk-sensor.o
-
 omap2cam-objs	:=	omap24xxcam.o omap24xxcam-dma.o
 
 # Helper modules
@@ -119,12 +117,6 @@ obj-$(CONFIG_VIDEO_VIA_CAMERA) += via-camera.o
 
 obj-$(CONFIG_VIDEO_OMAP3)	+= omap3isp/
 
-obj-$(CONFIG_USB_ZR364XX)       += zr364xx.o
-obj-$(CONFIG_USB_STKWEBCAM)     += stkwebcam.o
-
-
-obj-$(CONFIG_USB_S2255)		+= s2255drv.o
-
 obj-$(CONFIG_VIDEO_IVTV) += ivtv/
 obj-$(CONFIG_VIDEO_CX18) += cx18/
 
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 03/12] [media] bt8xx: move analog TV part to be together with DTV one
  2012-08-15 13:48   ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 01/12] [media] rename most media/video usb drivers to media/usb Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 02/12] [media] move the remaining USB drivers to drivers/media/usb Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 04/12] [media] rename most media/video pci drivers to media/pci Mauro Carvalho Chehab
                       ` (8 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/bt8xx/Kconfig                    | 23 +++++++++++++++++-
 drivers/media/pci/bt8xx/Makefile                   |  7 +++++-
 drivers/media/{video => pci}/bt8xx/bt848.h         |  0
 .../media/{video => pci}/bt8xx/bttv-audio-hook.c   |  0
 .../media/{video => pci}/bt8xx/bttv-audio-hook.h   |  0
 drivers/media/{video => pci}/bt8xx/bttv-cards.c    |  0
 drivers/media/{video => pci}/bt8xx/bttv-driver.c   |  0
 drivers/media/{video => pci}/bt8xx/bttv-gpio.c     |  0
 drivers/media/{video => pci}/bt8xx/bttv-i2c.c      |  0
 drivers/media/{video => pci}/bt8xx/bttv-if.c       |  0
 drivers/media/{video => pci}/bt8xx/bttv-input.c    |  0
 drivers/media/{video => pci}/bt8xx/bttv-risc.c     |  0
 drivers/media/{video => pci}/bt8xx/bttv-vbi.c      |  0
 drivers/media/{video => pci}/bt8xx/bttv.h          |  0
 drivers/media/{video => pci}/bt8xx/bttvp.h         |  0
 drivers/media/video/Kconfig                        |  2 --
 drivers/media/video/Makefile                       |  1 -
 drivers/media/video/bt8xx/Kconfig                  | 27 ----------------------
 drivers/media/video/bt8xx/Makefile                 | 13 -----------
 19 files changed, 28 insertions(+), 45 deletions(-)
 rename drivers/media/{video => pci}/bt8xx/bt848.h (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-audio-hook.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-audio-hook.h (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-cards.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-driver.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-gpio.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-i2c.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-if.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-input.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-risc.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv-vbi.c (100%)
 rename drivers/media/{video => pci}/bt8xx/bttv.h (100%)
 rename drivers/media/{video => pci}/bt8xx/bttvp.h (100%)
 delete mode 100644 drivers/media/video/bt8xx/Kconfig
 delete mode 100644 drivers/media/video/bt8xx/Makefile

diff --git a/drivers/media/pci/bt8xx/Kconfig b/drivers/media/pci/bt8xx/Kconfig
index 8668e63..f2667a5 100644
--- a/drivers/media/pci/bt8xx/Kconfig
+++ b/drivers/media/pci/bt8xx/Kconfig
@@ -1,5 +1,26 @@
+config VIDEO_BT848
+	tristate "BT848 Video For Linux"
+	depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2
+	select I2C_ALGOBIT
+	select VIDEO_BTCX
+	select VIDEOBUF_DMA_SG
+	depends on RC_CORE
+	select VIDEO_TUNER
+	select VIDEO_TVEEPROM
+	select VIDEO_MSP3400 if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TVAUDIO if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TDA7432 if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_SAA6588 if VIDEO_HELPER_CHIPS_AUTO
+	---help---
+	  Support for BT848 based frame grabber/overlay boards. This includes
+	  the Miro, Hauppauge and STB boards. Please read the material in
+	  <file:Documentation/video4linux/bttv/> for more information.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called bttv.
+
 config DVB_BT8XX
-	tristate "BT8xx based PCI cards"
+	tristate "DVB/ATSC Support for bt878 based TV cards"
 	depends on DVB_CORE && PCI && I2C && VIDEO_BT848
 	select DVB_MT352 if !DVB_FE_CUSTOMISE
 	select DVB_SP887X if !DVB_FE_CUSTOMISE
diff --git a/drivers/media/pci/bt8xx/Makefile b/drivers/media/pci/bt8xx/Makefile
index c008d0c..ae347b7 100644
--- a/drivers/media/pci/bt8xx/Makefile
+++ b/drivers/media/pci/bt8xx/Makefile
@@ -1,6 +1,11 @@
+bttv-objs      :=      bttv-driver.o bttv-cards.o bttv-if.o \
+		       bttv-risc.o bttv-vbi.o bttv-i2c.o bttv-gpio.o \
+		       bttv-input.o bttv-audio-hook.o
+
+obj-$(CONFIG_VIDEO_BT848) += bttv.o
 obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o
 
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
-ccflags-y += -Idrivers/media/video/bt8xx
+ccflags-y += -Idrivers/media/video
 ccflags-y += -Idrivers/media/tuners
diff --git a/drivers/media/video/bt8xx/bt848.h b/drivers/media/pci/bt8xx/bt848.h
similarity index 100%
rename from drivers/media/video/bt8xx/bt848.h
rename to drivers/media/pci/bt8xx/bt848.h
diff --git a/drivers/media/video/bt8xx/bttv-audio-hook.c b/drivers/media/pci/bt8xx/bttv-audio-hook.c
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-audio-hook.c
rename to drivers/media/pci/bt8xx/bttv-audio-hook.c
diff --git a/drivers/media/video/bt8xx/bttv-audio-hook.h b/drivers/media/pci/bt8xx/bttv-audio-hook.h
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-audio-hook.h
rename to drivers/media/pci/bt8xx/bttv-audio-hook.h
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-cards.c
rename to drivers/media/pci/bt8xx/bttv-cards.c
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-driver.c
rename to drivers/media/pci/bt8xx/bttv-driver.c
diff --git a/drivers/media/video/bt8xx/bttv-gpio.c b/drivers/media/pci/bt8xx/bttv-gpio.c
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-gpio.c
rename to drivers/media/pci/bt8xx/bttv-gpio.c
diff --git a/drivers/media/video/bt8xx/bttv-i2c.c b/drivers/media/pci/bt8xx/bttv-i2c.c
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-i2c.c
rename to drivers/media/pci/bt8xx/bttv-i2c.c
diff --git a/drivers/media/video/bt8xx/bttv-if.c b/drivers/media/pci/bt8xx/bttv-if.c
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-if.c
rename to drivers/media/pci/bt8xx/bttv-if.c
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-input.c
rename to drivers/media/pci/bt8xx/bttv-input.c
diff --git a/drivers/media/video/bt8xx/bttv-risc.c b/drivers/media/pci/bt8xx/bttv-risc.c
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-risc.c
rename to drivers/media/pci/bt8xx/bttv-risc.c
diff --git a/drivers/media/video/bt8xx/bttv-vbi.c b/drivers/media/pci/bt8xx/bttv-vbi.c
similarity index 100%
rename from drivers/media/video/bt8xx/bttv-vbi.c
rename to drivers/media/pci/bt8xx/bttv-vbi.c
diff --git a/drivers/media/video/bt8xx/bttv.h b/drivers/media/pci/bt8xx/bttv.h
similarity index 100%
rename from drivers/media/video/bt8xx/bttv.h
rename to drivers/media/pci/bt8xx/bttv.h
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/pci/bt8xx/bttvp.h
similarity index 100%
rename from drivers/media/video/bt8xx/bttvp.h
rename to drivers/media/pci/bt8xx/bttvp.h
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index f527992..f3d4228 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -619,8 +619,6 @@ menuconfig V4L_PCI_DRIVERS
 
 if V4L_PCI_DRIVERS
 
-source "drivers/media/video/bt8xx/Kconfig"
-
 source "drivers/media/video/cx18/Kconfig"
 
 source "drivers/media/video/cx23885/Kconfig"
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 4ad5bd9..df60ffa 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -87,7 +87,6 @@ obj-$(CONFIG_SOC_CAMERA_TW9910)		+= tw9910.o
 
 # And now the v4l2 drivers:
 
-obj-$(CONFIG_VIDEO_BT848) += bt8xx/
 obj-$(CONFIG_VIDEO_ZORAN) += zoran/
 obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
 obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
diff --git a/drivers/media/video/bt8xx/Kconfig b/drivers/media/video/bt8xx/Kconfig
deleted file mode 100644
index 7da5c2e..0000000
--- a/drivers/media/video/bt8xx/Kconfig
+++ /dev/null
@@ -1,27 +0,0 @@
-config VIDEO_BT848
-	tristate "BT848 Video For Linux"
-	depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2
-	select I2C_ALGOBIT
-	select VIDEO_BTCX
-	select VIDEOBUF_DMA_SG
-	depends on RC_CORE
-	select VIDEO_TUNER
-	select VIDEO_TVEEPROM
-	select VIDEO_MSP3400 if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TVAUDIO if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TDA7432 if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_SAA6588 if VIDEO_HELPER_CHIPS_AUTO
-	---help---
-	  Support for BT848 based frame grabber/overlay boards. This includes
-	  the Miro, Hauppauge and STB boards. Please read the material in
-	  <file:Documentation/video4linux/bttv/> for more information.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called bttv.
-
-config VIDEO_BT848_DVB
-	bool "DVB/ATSC Support for bt878 based TV cards"
-	depends on VIDEO_BT848 && DVB_CORE
-	select DVB_BT8XX
-	---help---
-	  This adds support for DVB/ATSC cards based on the BT878 chip.
diff --git a/drivers/media/video/bt8xx/Makefile b/drivers/media/video/bt8xx/Makefile
deleted file mode 100644
index f6351a2..0000000
--- a/drivers/media/video/bt8xx/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Makefile for the video capture/playback device drivers.
-#
-
-bttv-objs      :=      bttv-driver.o bttv-cards.o bttv-if.o \
-		       bttv-risc.o bttv-vbi.o bttv-i2c.o bttv-gpio.o \
-		       bttv-input.o bttv-audio-hook.o
-
-obj-$(CONFIG_VIDEO_BT848) += bttv.o
-
-ccflags-y += -Idrivers/media/video
-ccflags-y += -Idrivers/media/tuners
-ccflags-y += -Idrivers/media/dvb-core
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 04/12] [media] rename most media/video pci drivers to media/pci
  2012-08-15 13:48   ` Mauro Carvalho Chehab
                       ` (2 preceding siblings ...)
  2012-08-15 13:48     ` [PATCH 03/12] [media] bt8xx: move analog TV part to be together with DTV one Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir Mauro Carvalho Chehab
                       ` (7 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Rename all PCI drivers with their own directory under
drivers/media/video into drivers/media/pci and update the
building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/Kconfig                          | 50 ++++++++++------------
 drivers/media/pci/Makefile                         | 11 ++++-
 drivers/media/{video => pci}/cx18/Kconfig          |  0
 drivers/media/{video => pci}/cx18/Makefile         |  0
 drivers/media/{video => pci}/cx18/cx18-alsa-main.c |  0
 .../media/{video => pci}/cx18/cx18-alsa-mixer.c    |  0
 .../media/{video => pci}/cx18/cx18-alsa-mixer.h    |  0
 drivers/media/{video => pci}/cx18/cx18-alsa-pcm.c  |  0
 drivers/media/{video => pci}/cx18/cx18-alsa-pcm.h  |  0
 drivers/media/{video => pci}/cx18/cx18-alsa.h      |  0
 drivers/media/{video => pci}/cx18/cx18-audio.c     |  0
 drivers/media/{video => pci}/cx18/cx18-audio.h     |  0
 drivers/media/{video => pci}/cx18/cx18-av-audio.c  |  0
 drivers/media/{video => pci}/cx18/cx18-av-core.c   |  0
 drivers/media/{video => pci}/cx18/cx18-av-core.h   |  0
 .../media/{video => pci}/cx18/cx18-av-firmware.c   |  0
 drivers/media/{video => pci}/cx18/cx18-av-vbi.c    |  0
 drivers/media/{video => pci}/cx18/cx18-cards.c     |  0
 drivers/media/{video => pci}/cx18/cx18-cards.h     |  0
 drivers/media/{video => pci}/cx18/cx18-controls.c  |  0
 drivers/media/{video => pci}/cx18/cx18-controls.h  |  0
 drivers/media/{video => pci}/cx18/cx18-driver.c    |  0
 drivers/media/{video => pci}/cx18/cx18-driver.h    |  0
 drivers/media/{video => pci}/cx18/cx18-dvb.c       |  0
 drivers/media/{video => pci}/cx18/cx18-dvb.h       |  0
 drivers/media/{video => pci}/cx18/cx18-fileops.c   |  0
 drivers/media/{video => pci}/cx18/cx18-fileops.h   |  0
 drivers/media/{video => pci}/cx18/cx18-firmware.c  |  0
 drivers/media/{video => pci}/cx18/cx18-firmware.h  |  0
 drivers/media/{video => pci}/cx18/cx18-gpio.c      |  0
 drivers/media/{video => pci}/cx18/cx18-gpio.h      |  0
 drivers/media/{video => pci}/cx18/cx18-i2c.c       |  0
 drivers/media/{video => pci}/cx18/cx18-i2c.h       |  0
 drivers/media/{video => pci}/cx18/cx18-io.c        |  0
 drivers/media/{video => pci}/cx18/cx18-io.h        |  0
 drivers/media/{video => pci}/cx18/cx18-ioctl.c     |  0
 drivers/media/{video => pci}/cx18/cx18-ioctl.h     |  0
 drivers/media/{video => pci}/cx18/cx18-irq.c       |  0
 drivers/media/{video => pci}/cx18/cx18-irq.h       |  0
 drivers/media/{video => pci}/cx18/cx18-mailbox.c   |  0
 drivers/media/{video => pci}/cx18/cx18-mailbox.h   |  0
 drivers/media/{video => pci}/cx18/cx18-queue.c     |  0
 drivers/media/{video => pci}/cx18/cx18-queue.h     |  0
 drivers/media/{video => pci}/cx18/cx18-scb.c       |  0
 drivers/media/{video => pci}/cx18/cx18-scb.h       |  0
 drivers/media/{video => pci}/cx18/cx18-streams.c   |  0
 drivers/media/{video => pci}/cx18/cx18-streams.h   |  0
 drivers/media/{video => pci}/cx18/cx18-vbi.c       |  0
 drivers/media/{video => pci}/cx18/cx18-vbi.h       |  0
 drivers/media/{video => pci}/cx18/cx18-version.h   |  0
 drivers/media/{video => pci}/cx18/cx18-video.c     |  0
 drivers/media/{video => pci}/cx18/cx18-video.h     |  0
 drivers/media/{video => pci}/cx18/cx23418.h        |  0
 drivers/media/{video => pci}/cx23885/Kconfig       |  0
 drivers/media/{video => pci}/cx23885/Makefile      |  0
 drivers/media/{video => pci}/cx23885/altera-ci.c   |  0
 drivers/media/{video => pci}/cx23885/altera-ci.h   |  0
 drivers/media/{video => pci}/cx23885/cimax2.c      |  0
 drivers/media/{video => pci}/cx23885/cimax2.h      |  0
 drivers/media/{video => pci}/cx23885/cx23885-417.c |  0
 .../media/{video => pci}/cx23885/cx23885-alsa.c    |  0
 drivers/media/{video => pci}/cx23885/cx23885-av.c  |  0
 drivers/media/{video => pci}/cx23885/cx23885-av.h  |  0
 .../media/{video => pci}/cx23885/cx23885-cards.c   |  0
 .../media/{video => pci}/cx23885/cx23885-core.c    |  0
 drivers/media/{video => pci}/cx23885/cx23885-dvb.c |  0
 .../media/{video => pci}/cx23885/cx23885-f300.c    |  0
 .../media/{video => pci}/cx23885/cx23885-f300.h    |  0
 drivers/media/{video => pci}/cx23885/cx23885-i2c.c |  0
 .../media/{video => pci}/cx23885/cx23885-input.c   |  0
 .../media/{video => pci}/cx23885/cx23885-input.h   |  0
 .../media/{video => pci}/cx23885/cx23885-ioctl.c   |  0
 .../media/{video => pci}/cx23885/cx23885-ioctl.h   |  0
 drivers/media/{video => pci}/cx23885/cx23885-ir.c  |  0
 drivers/media/{video => pci}/cx23885/cx23885-ir.h  |  0
 drivers/media/{video => pci}/cx23885/cx23885-reg.h |  0
 drivers/media/{video => pci}/cx23885/cx23885-vbi.c |  0
 .../media/{video => pci}/cx23885/cx23885-video.c   |  0
 drivers/media/{video => pci}/cx23885/cx23885.h     |  0
 drivers/media/{video => pci}/cx23885/cx23888-ir.c  |  0
 drivers/media/{video => pci}/cx23885/cx23888-ir.h  |  0
 .../media/{video => pci}/cx23885/netup-eeprom.c    |  0
 .../media/{video => pci}/cx23885/netup-eeprom.h    |  0
 drivers/media/{video => pci}/cx23885/netup-init.c  |  0
 drivers/media/{video => pci}/cx23885/netup-init.h  |  0
 drivers/media/{video => pci}/cx25821/Kconfig       |  0
 drivers/media/{video => pci}/cx25821/Makefile      |  0
 .../media/{video => pci}/cx25821/cx25821-alsa.c    |  0
 .../cx25821/cx25821-audio-upstream.c               |  0
 .../cx25821/cx25821-audio-upstream.h               |  0
 .../media/{video => pci}/cx25821/cx25821-audio.h   |  0
 .../{video => pci}/cx25821/cx25821-biffuncs.h      |  0
 .../media/{video => pci}/cx25821/cx25821-cards.c   |  0
 .../media/{video => pci}/cx25821/cx25821-core.c    |  0
 .../media/{video => pci}/cx25821/cx25821-gpio.c    |  0
 drivers/media/{video => pci}/cx25821/cx25821-i2c.c |  0
 .../cx25821/cx25821-medusa-defines.h               |  0
 .../{video => pci}/cx25821/cx25821-medusa-reg.h    |  0
 .../{video => pci}/cx25821/cx25821-medusa-video.c  |  0
 .../{video => pci}/cx25821/cx25821-medusa-video.h  |  0
 drivers/media/{video => pci}/cx25821/cx25821-reg.h |  0
 .../media/{video => pci}/cx25821/cx25821-sram.h    |  0
 .../cx25821/cx25821-video-upstream-ch2.c           |  0
 .../cx25821/cx25821-video-upstream-ch2.h           |  0
 .../cx25821/cx25821-video-upstream.c               |  0
 .../cx25821/cx25821-video-upstream.h               |  0
 .../media/{video => pci}/cx25821/cx25821-video.c   |  0
 .../media/{video => pci}/cx25821/cx25821-video.h   |  0
 drivers/media/{video => pci}/cx25821/cx25821.h     |  0
 drivers/media/{video => pci}/cx88/Kconfig          |  0
 drivers/media/{video => pci}/cx88/Makefile         |  0
 drivers/media/{video => pci}/cx88/cx88-alsa.c      |  0
 drivers/media/{video => pci}/cx88/cx88-blackbird.c |  0
 drivers/media/{video => pci}/cx88/cx88-cards.c     |  0
 drivers/media/{video => pci}/cx88/cx88-core.c      |  0
 drivers/media/{video => pci}/cx88/cx88-dsp.c       |  0
 drivers/media/{video => pci}/cx88/cx88-dvb.c       |  0
 drivers/media/{video => pci}/cx88/cx88-i2c.c       |  0
 drivers/media/{video => pci}/cx88/cx88-input.c     |  0
 drivers/media/{video => pci}/cx88/cx88-mpeg.c      |  0
 drivers/media/{video => pci}/cx88/cx88-reg.h       |  0
 drivers/media/{video => pci}/cx88/cx88-tvaudio.c   |  0
 drivers/media/{video => pci}/cx88/cx88-vbi.c       |  0
 drivers/media/{video => pci}/cx88/cx88-video.c     |  0
 .../media/{video => pci}/cx88/cx88-vp3054-i2c.c    |  0
 .../media/{video => pci}/cx88/cx88-vp3054-i2c.h    |  0
 drivers/media/{video => pci}/cx88/cx88.h           |  0
 drivers/media/{video => pci}/ivtv/Kconfig          |  0
 drivers/media/{video => pci}/ivtv/Makefile         |  0
 drivers/media/{video => pci}/ivtv/ivtv-cards.c     |  0
 drivers/media/{video => pci}/ivtv/ivtv-cards.h     |  0
 drivers/media/{video => pci}/ivtv/ivtv-controls.c  |  0
 drivers/media/{video => pci}/ivtv/ivtv-controls.h  |  0
 drivers/media/{video => pci}/ivtv/ivtv-driver.c    |  0
 drivers/media/{video => pci}/ivtv/ivtv-driver.h    |  0
 drivers/media/{video => pci}/ivtv/ivtv-fileops.c   |  0
 drivers/media/{video => pci}/ivtv/ivtv-fileops.h   |  0
 drivers/media/{video => pci}/ivtv/ivtv-firmware.c  |  0
 drivers/media/{video => pci}/ivtv/ivtv-firmware.h  |  0
 drivers/media/{video => pci}/ivtv/ivtv-gpio.c      |  0
 drivers/media/{video => pci}/ivtv/ivtv-gpio.h      |  0
 drivers/media/{video => pci}/ivtv/ivtv-i2c.c       |  0
 drivers/media/{video => pci}/ivtv/ivtv-i2c.h       |  0
 drivers/media/{video => pci}/ivtv/ivtv-ioctl.c     |  0
 drivers/media/{video => pci}/ivtv/ivtv-ioctl.h     |  0
 drivers/media/{video => pci}/ivtv/ivtv-irq.c       |  0
 drivers/media/{video => pci}/ivtv/ivtv-irq.h       |  0
 drivers/media/{video => pci}/ivtv/ivtv-mailbox.c   |  0
 drivers/media/{video => pci}/ivtv/ivtv-mailbox.h   |  0
 drivers/media/{video => pci}/ivtv/ivtv-queue.c     |  0
 drivers/media/{video => pci}/ivtv/ivtv-queue.h     |  0
 drivers/media/{video => pci}/ivtv/ivtv-routing.c   |  0
 drivers/media/{video => pci}/ivtv/ivtv-routing.h   |  0
 drivers/media/{video => pci}/ivtv/ivtv-streams.c   |  0
 drivers/media/{video => pci}/ivtv/ivtv-streams.h   |  0
 drivers/media/{video => pci}/ivtv/ivtv-udma.c      |  0
 drivers/media/{video => pci}/ivtv/ivtv-udma.h      |  0
 drivers/media/{video => pci}/ivtv/ivtv-vbi.c       |  0
 drivers/media/{video => pci}/ivtv/ivtv-vbi.h       |  0
 drivers/media/{video => pci}/ivtv/ivtv-version.h   |  0
 drivers/media/{video => pci}/ivtv/ivtv-yuv.c       |  0
 drivers/media/{video => pci}/ivtv/ivtv-yuv.h       |  0
 drivers/media/{video => pci}/ivtv/ivtvfb.c         |  0
 drivers/media/{video => pci}/saa7134/Kconfig       |  0
 drivers/media/{video => pci}/saa7134/Makefile      |  0
 drivers/media/{video => pci}/saa7134/saa6752hs.c   |  0
 .../media/{video => pci}/saa7134/saa7134-alsa.c    |  0
 .../media/{video => pci}/saa7134/saa7134-cards.c   |  0
 .../media/{video => pci}/saa7134/saa7134-core.c    |  0
 drivers/media/{video => pci}/saa7134/saa7134-dvb.c |  0
 .../media/{video => pci}/saa7134/saa7134-empress.c |  0
 drivers/media/{video => pci}/saa7134/saa7134-i2c.c |  0
 .../media/{video => pci}/saa7134/saa7134-input.c   |  0
 drivers/media/{video => pci}/saa7134/saa7134-reg.h |  0
 drivers/media/{video => pci}/saa7134/saa7134-ts.c  |  0
 .../media/{video => pci}/saa7134/saa7134-tvaudio.c |  0
 drivers/media/{video => pci}/saa7134/saa7134-vbi.c |  0
 .../media/{video => pci}/saa7134/saa7134-video.c   |  0
 drivers/media/{video => pci}/saa7134/saa7134.h     |  0
 drivers/media/{video => pci}/saa7164/Kconfig       |  0
 drivers/media/{video => pci}/saa7164/Makefile      |  0
 drivers/media/{video => pci}/saa7164/saa7164-api.c |  0
 .../media/{video => pci}/saa7164/saa7164-buffer.c  |  0
 drivers/media/{video => pci}/saa7164/saa7164-bus.c |  0
 .../media/{video => pci}/saa7164/saa7164-cards.c   |  0
 drivers/media/{video => pci}/saa7164/saa7164-cmd.c |  0
 .../media/{video => pci}/saa7164/saa7164-core.c    |  0
 drivers/media/{video => pci}/saa7164/saa7164-dvb.c |  0
 .../media/{video => pci}/saa7164/saa7164-encoder.c |  0
 drivers/media/{video => pci}/saa7164/saa7164-fw.c  |  0
 drivers/media/{video => pci}/saa7164/saa7164-i2c.c |  0
 drivers/media/{video => pci}/saa7164/saa7164-reg.h |  0
 .../media/{video => pci}/saa7164/saa7164-types.h   |  0
 drivers/media/{video => pci}/saa7164/saa7164-vbi.c |  0
 drivers/media/{video => pci}/saa7164/saa7164.h     |  0
 drivers/media/{video => pci}/zoran/Kconfig         |  0
 drivers/media/{video => pci}/zoran/Makefile        |  0
 drivers/media/{video => pci}/zoran/videocodec.c    |  0
 drivers/media/{video => pci}/zoran/videocodec.h    |  0
 drivers/media/{video => pci}/zoran/zoran.h         |  0
 drivers/media/{video => pci}/zoran/zoran_card.c    |  0
 drivers/media/{video => pci}/zoran/zoran_card.h    |  0
 drivers/media/{video => pci}/zoran/zoran_device.c  |  0
 drivers/media/{video => pci}/zoran/zoran_device.h  |  0
 drivers/media/{video => pci}/zoran/zoran_driver.c  |  0
 drivers/media/{video => pci}/zoran/zoran_procfs.c  |  0
 drivers/media/{video => pci}/zoran/zoran_procfs.h  |  0
 drivers/media/{video => pci}/zoran/zr36016.c       |  0
 drivers/media/{video => pci}/zoran/zr36016.h       |  0
 drivers/media/{video => pci}/zoran/zr36050.c       |  0
 drivers/media/{video => pci}/zoran/zr36050.h       |  0
 drivers/media/{video => pci}/zoran/zr36057.h       |  0
 drivers/media/{video => pci}/zoran/zr36060.c       |  0
 drivers/media/{video => pci}/zoran/zr36060.h       |  0
 drivers/media/video/Kconfig                        | 15 -------
 drivers/media/video/Makefile                       | 10 -----
 216 files changed, 33 insertions(+), 53 deletions(-)
 rename drivers/media/{video => pci}/cx18/Kconfig (100%)
 rename drivers/media/{video => pci}/cx18/Makefile (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-main.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-mixer.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-mixer.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-pcm.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa-pcm.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-alsa.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-audio.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-audio.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-audio.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-core.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-core.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-firmware.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-av-vbi.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-cards.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-cards.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-controls.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-controls.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-driver.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-driver.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-dvb.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-dvb.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-fileops.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-fileops.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-firmware.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-firmware.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-gpio.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-gpio.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-i2c.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-i2c.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-io.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-io.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-ioctl.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-ioctl.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-irq.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-irq.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-mailbox.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-mailbox.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-queue.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-queue.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-scb.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-scb.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-streams.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-streams.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-vbi.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-vbi.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-version.h (100%)
 rename drivers/media/{video => pci}/cx18/cx18-video.c (100%)
 rename drivers/media/{video => pci}/cx18/cx18-video.h (100%)
 rename drivers/media/{video => pci}/cx18/cx23418.h (100%)
 rename drivers/media/{video => pci}/cx23885/Kconfig (100%)
 rename drivers/media/{video => pci}/cx23885/Makefile (100%)
 rename drivers/media/{video => pci}/cx23885/altera-ci.c (100%)
 rename drivers/media/{video => pci}/cx23885/altera-ci.h (100%)
 rename drivers/media/{video => pci}/cx23885/cimax2.c (100%)
 rename drivers/media/{video => pci}/cx23885/cimax2.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-417.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-alsa.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-av.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-av.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-cards.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-core.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-dvb.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-f300.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-f300.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-i2c.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-input.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-input.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-ioctl.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-ioctl.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-ir.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-ir.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-reg.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-vbi.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885-video.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23885.h (100%)
 rename drivers/media/{video => pci}/cx23885/cx23888-ir.c (100%)
 rename drivers/media/{video => pci}/cx23885/cx23888-ir.h (100%)
 rename drivers/media/{video => pci}/cx23885/netup-eeprom.c (100%)
 rename drivers/media/{video => pci}/cx23885/netup-eeprom.h (100%)
 rename drivers/media/{video => pci}/cx23885/netup-init.c (100%)
 rename drivers/media/{video => pci}/cx23885/netup-init.h (100%)
 rename drivers/media/{video => pci}/cx25821/Kconfig (100%)
 rename drivers/media/{video => pci}/cx25821/Makefile (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-alsa.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-audio-upstream.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-audio-upstream.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-audio.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-biffuncs.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-cards.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-core.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-gpio.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-i2c.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-medusa-defines.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-medusa-reg.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-medusa-video.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-medusa-video.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-reg.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-sram.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video-upstream-ch2.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video-upstream-ch2.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video-upstream.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video-upstream.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video.c (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821-video.h (100%)
 rename drivers/media/{video => pci}/cx25821/cx25821.h (100%)
 rename drivers/media/{video => pci}/cx88/Kconfig (100%)
 rename drivers/media/{video => pci}/cx88/Makefile (100%)
 rename drivers/media/{video => pci}/cx88/cx88-alsa.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-blackbird.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-cards.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-core.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-dsp.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-dvb.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-i2c.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-input.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-mpeg.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-reg.h (100%)
 rename drivers/media/{video => pci}/cx88/cx88-tvaudio.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-vbi.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-video.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-vp3054-i2c.c (100%)
 rename drivers/media/{video => pci}/cx88/cx88-vp3054-i2c.h (100%)
 rename drivers/media/{video => pci}/cx88/cx88.h (100%)
 rename drivers/media/{video => pci}/ivtv/Kconfig (100%)
 rename drivers/media/{video => pci}/ivtv/Makefile (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-cards.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-cards.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-controls.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-controls.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-driver.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-driver.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-fileops.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-fileops.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-firmware.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-firmware.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-gpio.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-gpio.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-i2c.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-i2c.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-ioctl.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-ioctl.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-irq.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-irq.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-mailbox.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-mailbox.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-queue.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-queue.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-routing.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-routing.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-streams.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-streams.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-udma.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-udma.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-vbi.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-vbi.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-version.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-yuv.c (100%)
 rename drivers/media/{video => pci}/ivtv/ivtv-yuv.h (100%)
 rename drivers/media/{video => pci}/ivtv/ivtvfb.c (100%)
 rename drivers/media/{video => pci}/saa7134/Kconfig (100%)
 rename drivers/media/{video => pci}/saa7134/Makefile (100%)
 rename drivers/media/{video => pci}/saa7134/saa6752hs.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-alsa.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-cards.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-core.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-dvb.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-empress.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-i2c.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-input.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-reg.h (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-ts.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-tvaudio.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-vbi.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134-video.c (100%)
 rename drivers/media/{video => pci}/saa7134/saa7134.h (100%)
 rename drivers/media/{video => pci}/saa7164/Kconfig (100%)
 rename drivers/media/{video => pci}/saa7164/Makefile (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-api.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-buffer.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-bus.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-cards.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-cmd.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-core.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-dvb.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-encoder.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-fw.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-i2c.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-reg.h (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-types.h (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164-vbi.c (100%)
 rename drivers/media/{video => pci}/saa7164/saa7164.h (100%)
 rename drivers/media/{video => pci}/zoran/Kconfig (100%)
 rename drivers/media/{video => pci}/zoran/Makefile (100%)
 rename drivers/media/{video => pci}/zoran/videocodec.c (100%)
 rename drivers/media/{video => pci}/zoran/videocodec.h (100%)
 rename drivers/media/{video => pci}/zoran/zoran.h (100%)
 rename drivers/media/{video => pci}/zoran/zoran_card.c (100%)
 rename drivers/media/{video => pci}/zoran/zoran_card.h (100%)
 rename drivers/media/{video => pci}/zoran/zoran_device.c (100%)
 rename drivers/media/{video => pci}/zoran/zoran_device.h (100%)
 rename drivers/media/{video => pci}/zoran/zoran_driver.c (100%)
 rename drivers/media/{video => pci}/zoran/zoran_procfs.c (100%)
 rename drivers/media/{video => pci}/zoran/zoran_procfs.h (100%)
 rename drivers/media/{video => pci}/zoran/zr36016.c (100%)
 rename drivers/media/{video => pci}/zoran/zr36016.h (100%)
 rename drivers/media/{video => pci}/zoran/zr36050.c (100%)
 rename drivers/media/{video => pci}/zoran/zr36050.h (100%)
 rename drivers/media/{video => pci}/zoran/zr36057.h (100%)
 rename drivers/media/{video => pci}/zoran/zr36060.c (100%)
 rename drivers/media/{video => pci}/zoran/zr36060.h (100%)

diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index b16529b..b69cb12 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -2,40 +2,36 @@
 # DVB device configuration
 #
 
-menuconfig DVB_CAPTURE_DRIVERS
-	bool "DVB/ATSC PCI adapters"
-	depends on DVB_CORE
-	default y
-	---help---
-	  Say Y to select Digital TV adapters
-
-if DVB_CAPTURE_DRIVERS && DVB_CORE && PCI && I2C
+menu "Media PCI Adapters"
+	visible if PCI && MEDIA_SUPPORT
+
+if MEDIA_ANALOG_TV_SUPPORT
+	comment "Media capture/analog TV support"
+source "drivers/media/pci/ivtv/Kconfig"
+source "drivers/media/pci/zoran/Kconfig"
+endif
+
+if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
+	comment "Media capture/analog/hybrid TV support"
+source "drivers/media/pci/cx18/Kconfig"
+source "drivers/media/pci/cx23885/Kconfig"
+source "drivers/media/pci/cx25821/Kconfig"
+source "drivers/media/pci/cx88/Kconfig"
+source "drivers/media/pci/bt8xx/Kconfig"
+source "drivers/media/pci/saa7134/Kconfig"
+source "drivers/media/pci/saa7164/Kconfig"
+endif
 
-comment "Supported SAA7146 based PCI Adapters"
+if MEDIA_DIGITAL_TV_SUPPORT
+	comment "Media digital TV PCI Adapters"
 source "drivers/media/pci/ttpci/Kconfig"
-
-comment "Supported FlexCopII (B2C2) PCI Adapters"
 source "drivers/media/pci/b2c2/Kconfig"
-
-comment "Supported BT878 Adapters"
-source "drivers/media/pci/bt8xx/Kconfig"
-
-comment "Supported Pluto2 Adapters"
 source "drivers/media/pci/pluto2/Kconfig"
-
-comment "Supported SDMC DM1105 Adapters"
 source "drivers/media/pci/dm1105/Kconfig"
-
-comment "Supported Earthsoft PT1 Adapters"
 source "drivers/media/pci/pt1/Kconfig"
-
-comment "Supported Mantis Adapters"
 source "drivers/media/pci/mantis/Kconfig"
-
-comment "Supported nGene Adapters"
 source "drivers/media/pci/ngene/Kconfig"
-
-comment "Supported ddbridge ('Octopus') Adapters"
 source "drivers/media/pci/ddbridge/Kconfig"
+endif
 
-endif # DVB_CAPTURE_DRIVERS
+endmenu
diff --git a/drivers/media/pci/Makefile b/drivers/media/pci/Makefile
index 1d44fbd..d47c222 100644
--- a/drivers/media/pci/Makefile
+++ b/drivers/media/pci/Makefile
@@ -4,7 +4,6 @@
 
 obj-y        :=	ttpci/		\
 		b2c2/		\
-		bt8xx/		\
 		pluto2/		\
 		dm1105/		\
 		pt1/		\
@@ -12,3 +11,13 @@ obj-y        :=	ttpci/		\
 		ngene/		\
 		ddbridge/	\
 		b2c2/
+
+obj-$(CONFIG_VIDEO_IVTV) += ivtv/
+obj-$(CONFIG_VIDEO_ZORAN) += zoran/
+obj-$(CONFIG_VIDEO_CX18) += cx18/
+obj-$(CONFIG_VIDEO_CX23885) += cx23885/
+obj-$(CONFIG_VIDEO_CX25821) += cx25821/
+obj-$(CONFIG_VIDEO_CX88) += cx88/
+obj-$(CONFIG_VIDEO_BT848) += bt8xx/
+obj-$(CONFIG_VIDEO_SAA7134) += saa7134/
+obj-$(CONFIG_VIDEO_SAA7164) += saa7164/
diff --git a/drivers/media/video/cx18/Kconfig b/drivers/media/pci/cx18/Kconfig
similarity index 100%
rename from drivers/media/video/cx18/Kconfig
rename to drivers/media/pci/cx18/Kconfig
diff --git a/drivers/media/video/cx18/Makefile b/drivers/media/pci/cx18/Makefile
similarity index 100%
rename from drivers/media/video/cx18/Makefile
rename to drivers/media/pci/cx18/Makefile
diff --git a/drivers/media/video/cx18/cx18-alsa-main.c b/drivers/media/pci/cx18/cx18-alsa-main.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-alsa-main.c
rename to drivers/media/pci/cx18/cx18-alsa-main.c
diff --git a/drivers/media/video/cx18/cx18-alsa-mixer.c b/drivers/media/pci/cx18/cx18-alsa-mixer.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-alsa-mixer.c
rename to drivers/media/pci/cx18/cx18-alsa-mixer.c
diff --git a/drivers/media/video/cx18/cx18-alsa-mixer.h b/drivers/media/pci/cx18/cx18-alsa-mixer.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-alsa-mixer.h
rename to drivers/media/pci/cx18/cx18-alsa-mixer.h
diff --git a/drivers/media/video/cx18/cx18-alsa-pcm.c b/drivers/media/pci/cx18/cx18-alsa-pcm.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-alsa-pcm.c
rename to drivers/media/pci/cx18/cx18-alsa-pcm.c
diff --git a/drivers/media/video/cx18/cx18-alsa-pcm.h b/drivers/media/pci/cx18/cx18-alsa-pcm.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-alsa-pcm.h
rename to drivers/media/pci/cx18/cx18-alsa-pcm.h
diff --git a/drivers/media/video/cx18/cx18-alsa.h b/drivers/media/pci/cx18/cx18-alsa.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-alsa.h
rename to drivers/media/pci/cx18/cx18-alsa.h
diff --git a/drivers/media/video/cx18/cx18-audio.c b/drivers/media/pci/cx18/cx18-audio.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-audio.c
rename to drivers/media/pci/cx18/cx18-audio.c
diff --git a/drivers/media/video/cx18/cx18-audio.h b/drivers/media/pci/cx18/cx18-audio.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-audio.h
rename to drivers/media/pci/cx18/cx18-audio.h
diff --git a/drivers/media/video/cx18/cx18-av-audio.c b/drivers/media/pci/cx18/cx18-av-audio.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-av-audio.c
rename to drivers/media/pci/cx18/cx18-av-audio.c
diff --git a/drivers/media/video/cx18/cx18-av-core.c b/drivers/media/pci/cx18/cx18-av-core.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-av-core.c
rename to drivers/media/pci/cx18/cx18-av-core.c
diff --git a/drivers/media/video/cx18/cx18-av-core.h b/drivers/media/pci/cx18/cx18-av-core.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-av-core.h
rename to drivers/media/pci/cx18/cx18-av-core.h
diff --git a/drivers/media/video/cx18/cx18-av-firmware.c b/drivers/media/pci/cx18/cx18-av-firmware.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-av-firmware.c
rename to drivers/media/pci/cx18/cx18-av-firmware.c
diff --git a/drivers/media/video/cx18/cx18-av-vbi.c b/drivers/media/pci/cx18/cx18-av-vbi.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-av-vbi.c
rename to drivers/media/pci/cx18/cx18-av-vbi.c
diff --git a/drivers/media/video/cx18/cx18-cards.c b/drivers/media/pci/cx18/cx18-cards.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-cards.c
rename to drivers/media/pci/cx18/cx18-cards.c
diff --git a/drivers/media/video/cx18/cx18-cards.h b/drivers/media/pci/cx18/cx18-cards.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-cards.h
rename to drivers/media/pci/cx18/cx18-cards.h
diff --git a/drivers/media/video/cx18/cx18-controls.c b/drivers/media/pci/cx18/cx18-controls.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-controls.c
rename to drivers/media/pci/cx18/cx18-controls.c
diff --git a/drivers/media/video/cx18/cx18-controls.h b/drivers/media/pci/cx18/cx18-controls.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-controls.h
rename to drivers/media/pci/cx18/cx18-controls.h
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/pci/cx18/cx18-driver.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-driver.c
rename to drivers/media/pci/cx18/cx18-driver.c
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/pci/cx18/cx18-driver.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-driver.h
rename to drivers/media/pci/cx18/cx18-driver.h
diff --git a/drivers/media/video/cx18/cx18-dvb.c b/drivers/media/pci/cx18/cx18-dvb.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-dvb.c
rename to drivers/media/pci/cx18/cx18-dvb.c
diff --git a/drivers/media/video/cx18/cx18-dvb.h b/drivers/media/pci/cx18/cx18-dvb.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-dvb.h
rename to drivers/media/pci/cx18/cx18-dvb.h
diff --git a/drivers/media/video/cx18/cx18-fileops.c b/drivers/media/pci/cx18/cx18-fileops.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-fileops.c
rename to drivers/media/pci/cx18/cx18-fileops.c
diff --git a/drivers/media/video/cx18/cx18-fileops.h b/drivers/media/pci/cx18/cx18-fileops.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-fileops.h
rename to drivers/media/pci/cx18/cx18-fileops.h
diff --git a/drivers/media/video/cx18/cx18-firmware.c b/drivers/media/pci/cx18/cx18-firmware.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-firmware.c
rename to drivers/media/pci/cx18/cx18-firmware.c
diff --git a/drivers/media/video/cx18/cx18-firmware.h b/drivers/media/pci/cx18/cx18-firmware.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-firmware.h
rename to drivers/media/pci/cx18/cx18-firmware.h
diff --git a/drivers/media/video/cx18/cx18-gpio.c b/drivers/media/pci/cx18/cx18-gpio.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-gpio.c
rename to drivers/media/pci/cx18/cx18-gpio.c
diff --git a/drivers/media/video/cx18/cx18-gpio.h b/drivers/media/pci/cx18/cx18-gpio.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-gpio.h
rename to drivers/media/pci/cx18/cx18-gpio.h
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/pci/cx18/cx18-i2c.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-i2c.c
rename to drivers/media/pci/cx18/cx18-i2c.c
diff --git a/drivers/media/video/cx18/cx18-i2c.h b/drivers/media/pci/cx18/cx18-i2c.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-i2c.h
rename to drivers/media/pci/cx18/cx18-i2c.h
diff --git a/drivers/media/video/cx18/cx18-io.c b/drivers/media/pci/cx18/cx18-io.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-io.c
rename to drivers/media/pci/cx18/cx18-io.c
diff --git a/drivers/media/video/cx18/cx18-io.h b/drivers/media/pci/cx18/cx18-io.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-io.h
rename to drivers/media/pci/cx18/cx18-io.h
diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-ioctl.c
rename to drivers/media/pci/cx18/cx18-ioctl.c
diff --git a/drivers/media/video/cx18/cx18-ioctl.h b/drivers/media/pci/cx18/cx18-ioctl.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-ioctl.h
rename to drivers/media/pci/cx18/cx18-ioctl.h
diff --git a/drivers/media/video/cx18/cx18-irq.c b/drivers/media/pci/cx18/cx18-irq.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-irq.c
rename to drivers/media/pci/cx18/cx18-irq.c
diff --git a/drivers/media/video/cx18/cx18-irq.h b/drivers/media/pci/cx18/cx18-irq.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-irq.h
rename to drivers/media/pci/cx18/cx18-irq.h
diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/pci/cx18/cx18-mailbox.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-mailbox.c
rename to drivers/media/pci/cx18/cx18-mailbox.c
diff --git a/drivers/media/video/cx18/cx18-mailbox.h b/drivers/media/pci/cx18/cx18-mailbox.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-mailbox.h
rename to drivers/media/pci/cx18/cx18-mailbox.h
diff --git a/drivers/media/video/cx18/cx18-queue.c b/drivers/media/pci/cx18/cx18-queue.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-queue.c
rename to drivers/media/pci/cx18/cx18-queue.c
diff --git a/drivers/media/video/cx18/cx18-queue.h b/drivers/media/pci/cx18/cx18-queue.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-queue.h
rename to drivers/media/pci/cx18/cx18-queue.h
diff --git a/drivers/media/video/cx18/cx18-scb.c b/drivers/media/pci/cx18/cx18-scb.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-scb.c
rename to drivers/media/pci/cx18/cx18-scb.c
diff --git a/drivers/media/video/cx18/cx18-scb.h b/drivers/media/pci/cx18/cx18-scb.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-scb.h
rename to drivers/media/pci/cx18/cx18-scb.h
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-streams.c
rename to drivers/media/pci/cx18/cx18-streams.c
diff --git a/drivers/media/video/cx18/cx18-streams.h b/drivers/media/pci/cx18/cx18-streams.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-streams.h
rename to drivers/media/pci/cx18/cx18-streams.h
diff --git a/drivers/media/video/cx18/cx18-vbi.c b/drivers/media/pci/cx18/cx18-vbi.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-vbi.c
rename to drivers/media/pci/cx18/cx18-vbi.c
diff --git a/drivers/media/video/cx18/cx18-vbi.h b/drivers/media/pci/cx18/cx18-vbi.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-vbi.h
rename to drivers/media/pci/cx18/cx18-vbi.h
diff --git a/drivers/media/video/cx18/cx18-version.h b/drivers/media/pci/cx18/cx18-version.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-version.h
rename to drivers/media/pci/cx18/cx18-version.h
diff --git a/drivers/media/video/cx18/cx18-video.c b/drivers/media/pci/cx18/cx18-video.c
similarity index 100%
rename from drivers/media/video/cx18/cx18-video.c
rename to drivers/media/pci/cx18/cx18-video.c
diff --git a/drivers/media/video/cx18/cx18-video.h b/drivers/media/pci/cx18/cx18-video.h
similarity index 100%
rename from drivers/media/video/cx18/cx18-video.h
rename to drivers/media/pci/cx18/cx18-video.h
diff --git a/drivers/media/video/cx18/cx23418.h b/drivers/media/pci/cx18/cx23418.h
similarity index 100%
rename from drivers/media/video/cx18/cx23418.h
rename to drivers/media/pci/cx18/cx23418.h
diff --git a/drivers/media/video/cx23885/Kconfig b/drivers/media/pci/cx23885/Kconfig
similarity index 100%
rename from drivers/media/video/cx23885/Kconfig
rename to drivers/media/pci/cx23885/Kconfig
diff --git a/drivers/media/video/cx23885/Makefile b/drivers/media/pci/cx23885/Makefile
similarity index 100%
rename from drivers/media/video/cx23885/Makefile
rename to drivers/media/pci/cx23885/Makefile
diff --git a/drivers/media/video/cx23885/altera-ci.c b/drivers/media/pci/cx23885/altera-ci.c
similarity index 100%
rename from drivers/media/video/cx23885/altera-ci.c
rename to drivers/media/pci/cx23885/altera-ci.c
diff --git a/drivers/media/video/cx23885/altera-ci.h b/drivers/media/pci/cx23885/altera-ci.h
similarity index 100%
rename from drivers/media/video/cx23885/altera-ci.h
rename to drivers/media/pci/cx23885/altera-ci.h
diff --git a/drivers/media/video/cx23885/cimax2.c b/drivers/media/pci/cx23885/cimax2.c
similarity index 100%
rename from drivers/media/video/cx23885/cimax2.c
rename to drivers/media/pci/cx23885/cimax2.c
diff --git a/drivers/media/video/cx23885/cimax2.h b/drivers/media/pci/cx23885/cimax2.h
similarity index 100%
rename from drivers/media/video/cx23885/cimax2.h
rename to drivers/media/pci/cx23885/cimax2.h
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-417.c
rename to drivers/media/pci/cx23885/cx23885-417.c
diff --git a/drivers/media/video/cx23885/cx23885-alsa.c b/drivers/media/pci/cx23885/cx23885-alsa.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-alsa.c
rename to drivers/media/pci/cx23885/cx23885-alsa.c
diff --git a/drivers/media/video/cx23885/cx23885-av.c b/drivers/media/pci/cx23885/cx23885-av.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-av.c
rename to drivers/media/pci/cx23885/cx23885-av.c
diff --git a/drivers/media/video/cx23885/cx23885-av.h b/drivers/media/pci/cx23885/cx23885-av.h
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-av.h
rename to drivers/media/pci/cx23885/cx23885-av.h
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-cards.c
rename to drivers/media/pci/cx23885/cx23885-cards.c
diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-core.c
rename to drivers/media/pci/cx23885/cx23885-core.c
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-dvb.c
rename to drivers/media/pci/cx23885/cx23885-dvb.c
diff --git a/drivers/media/video/cx23885/cx23885-f300.c b/drivers/media/pci/cx23885/cx23885-f300.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-f300.c
rename to drivers/media/pci/cx23885/cx23885-f300.c
diff --git a/drivers/media/video/cx23885/cx23885-f300.h b/drivers/media/pci/cx23885/cx23885-f300.h
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-f300.h
rename to drivers/media/pci/cx23885/cx23885-f300.h
diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/pci/cx23885/cx23885-i2c.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-i2c.c
rename to drivers/media/pci/cx23885/cx23885-i2c.c
diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/pci/cx23885/cx23885-input.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-input.c
rename to drivers/media/pci/cx23885/cx23885-input.c
diff --git a/drivers/media/video/cx23885/cx23885-input.h b/drivers/media/pci/cx23885/cx23885-input.h
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-input.h
rename to drivers/media/pci/cx23885/cx23885-input.h
diff --git a/drivers/media/video/cx23885/cx23885-ioctl.c b/drivers/media/pci/cx23885/cx23885-ioctl.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-ioctl.c
rename to drivers/media/pci/cx23885/cx23885-ioctl.c
diff --git a/drivers/media/video/cx23885/cx23885-ioctl.h b/drivers/media/pci/cx23885/cx23885-ioctl.h
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-ioctl.h
rename to drivers/media/pci/cx23885/cx23885-ioctl.h
diff --git a/drivers/media/video/cx23885/cx23885-ir.c b/drivers/media/pci/cx23885/cx23885-ir.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-ir.c
rename to drivers/media/pci/cx23885/cx23885-ir.c
diff --git a/drivers/media/video/cx23885/cx23885-ir.h b/drivers/media/pci/cx23885/cx23885-ir.h
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-ir.h
rename to drivers/media/pci/cx23885/cx23885-ir.h
diff --git a/drivers/media/video/cx23885/cx23885-reg.h b/drivers/media/pci/cx23885/cx23885-reg.h
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-reg.h
rename to drivers/media/pci/cx23885/cx23885-reg.h
diff --git a/drivers/media/video/cx23885/cx23885-vbi.c b/drivers/media/pci/cx23885/cx23885-vbi.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-vbi.c
rename to drivers/media/pci/cx23885/cx23885-vbi.c
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23885-video.c
rename to drivers/media/pci/cx23885/cx23885-video.c
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/pci/cx23885/cx23885.h
similarity index 100%
rename from drivers/media/video/cx23885/cx23885.h
rename to drivers/media/pci/cx23885/cx23885.h
diff --git a/drivers/media/video/cx23885/cx23888-ir.c b/drivers/media/pci/cx23885/cx23888-ir.c
similarity index 100%
rename from drivers/media/video/cx23885/cx23888-ir.c
rename to drivers/media/pci/cx23885/cx23888-ir.c
diff --git a/drivers/media/video/cx23885/cx23888-ir.h b/drivers/media/pci/cx23885/cx23888-ir.h
similarity index 100%
rename from drivers/media/video/cx23885/cx23888-ir.h
rename to drivers/media/pci/cx23885/cx23888-ir.h
diff --git a/drivers/media/video/cx23885/netup-eeprom.c b/drivers/media/pci/cx23885/netup-eeprom.c
similarity index 100%
rename from drivers/media/video/cx23885/netup-eeprom.c
rename to drivers/media/pci/cx23885/netup-eeprom.c
diff --git a/drivers/media/video/cx23885/netup-eeprom.h b/drivers/media/pci/cx23885/netup-eeprom.h
similarity index 100%
rename from drivers/media/video/cx23885/netup-eeprom.h
rename to drivers/media/pci/cx23885/netup-eeprom.h
diff --git a/drivers/media/video/cx23885/netup-init.c b/drivers/media/pci/cx23885/netup-init.c
similarity index 100%
rename from drivers/media/video/cx23885/netup-init.c
rename to drivers/media/pci/cx23885/netup-init.c
diff --git a/drivers/media/video/cx23885/netup-init.h b/drivers/media/pci/cx23885/netup-init.h
similarity index 100%
rename from drivers/media/video/cx23885/netup-init.h
rename to drivers/media/pci/cx23885/netup-init.h
diff --git a/drivers/media/video/cx25821/Kconfig b/drivers/media/pci/cx25821/Kconfig
similarity index 100%
rename from drivers/media/video/cx25821/Kconfig
rename to drivers/media/pci/cx25821/Kconfig
diff --git a/drivers/media/video/cx25821/Makefile b/drivers/media/pci/cx25821/Makefile
similarity index 100%
rename from drivers/media/video/cx25821/Makefile
rename to drivers/media/pci/cx25821/Makefile
diff --git a/drivers/media/video/cx25821/cx25821-alsa.c b/drivers/media/pci/cx25821/cx25821-alsa.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-alsa.c
rename to drivers/media/pci/cx25821/cx25821-alsa.c
diff --git a/drivers/media/video/cx25821/cx25821-audio-upstream.c b/drivers/media/pci/cx25821/cx25821-audio-upstream.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-audio-upstream.c
rename to drivers/media/pci/cx25821/cx25821-audio-upstream.c
diff --git a/drivers/media/video/cx25821/cx25821-audio-upstream.h b/drivers/media/pci/cx25821/cx25821-audio-upstream.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-audio-upstream.h
rename to drivers/media/pci/cx25821/cx25821-audio-upstream.h
diff --git a/drivers/media/video/cx25821/cx25821-audio.h b/drivers/media/pci/cx25821/cx25821-audio.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-audio.h
rename to drivers/media/pci/cx25821/cx25821-audio.h
diff --git a/drivers/media/video/cx25821/cx25821-biffuncs.h b/drivers/media/pci/cx25821/cx25821-biffuncs.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-biffuncs.h
rename to drivers/media/pci/cx25821/cx25821-biffuncs.h
diff --git a/drivers/media/video/cx25821/cx25821-cards.c b/drivers/media/pci/cx25821/cx25821-cards.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-cards.c
rename to drivers/media/pci/cx25821/cx25821-cards.c
diff --git a/drivers/media/video/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-core.c
rename to drivers/media/pci/cx25821/cx25821-core.c
diff --git a/drivers/media/video/cx25821/cx25821-gpio.c b/drivers/media/pci/cx25821/cx25821-gpio.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-gpio.c
rename to drivers/media/pci/cx25821/cx25821-gpio.c
diff --git a/drivers/media/video/cx25821/cx25821-i2c.c b/drivers/media/pci/cx25821/cx25821-i2c.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-i2c.c
rename to drivers/media/pci/cx25821/cx25821-i2c.c
diff --git a/drivers/media/video/cx25821/cx25821-medusa-defines.h b/drivers/media/pci/cx25821/cx25821-medusa-defines.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-medusa-defines.h
rename to drivers/media/pci/cx25821/cx25821-medusa-defines.h
diff --git a/drivers/media/video/cx25821/cx25821-medusa-reg.h b/drivers/media/pci/cx25821/cx25821-medusa-reg.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-medusa-reg.h
rename to drivers/media/pci/cx25821/cx25821-medusa-reg.h
diff --git a/drivers/media/video/cx25821/cx25821-medusa-video.c b/drivers/media/pci/cx25821/cx25821-medusa-video.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-medusa-video.c
rename to drivers/media/pci/cx25821/cx25821-medusa-video.c
diff --git a/drivers/media/video/cx25821/cx25821-medusa-video.h b/drivers/media/pci/cx25821/cx25821-medusa-video.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-medusa-video.h
rename to drivers/media/pci/cx25821/cx25821-medusa-video.h
diff --git a/drivers/media/video/cx25821/cx25821-reg.h b/drivers/media/pci/cx25821/cx25821-reg.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-reg.h
rename to drivers/media/pci/cx25821/cx25821-reg.h
diff --git a/drivers/media/video/cx25821/cx25821-sram.h b/drivers/media/pci/cx25821/cx25821-sram.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-sram.h
rename to drivers/media/pci/cx25821/cx25821-sram.h
diff --git a/drivers/media/video/cx25821/cx25821-video-upstream-ch2.c b/drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-video-upstream-ch2.c
rename to drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c
diff --git a/drivers/media/video/cx25821/cx25821-video-upstream-ch2.h b/drivers/media/pci/cx25821/cx25821-video-upstream-ch2.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-video-upstream-ch2.h
rename to drivers/media/pci/cx25821/cx25821-video-upstream-ch2.h
diff --git a/drivers/media/video/cx25821/cx25821-video-upstream.c b/drivers/media/pci/cx25821/cx25821-video-upstream.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-video-upstream.c
rename to drivers/media/pci/cx25821/cx25821-video-upstream.c
diff --git a/drivers/media/video/cx25821/cx25821-video-upstream.h b/drivers/media/pci/cx25821/cx25821-video-upstream.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-video-upstream.h
rename to drivers/media/pci/cx25821/cx25821-video-upstream.h
diff --git a/drivers/media/video/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-video.c
rename to drivers/media/pci/cx25821/cx25821-video.c
diff --git a/drivers/media/video/cx25821/cx25821-video.h b/drivers/media/pci/cx25821/cx25821-video.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821-video.h
rename to drivers/media/pci/cx25821/cx25821-video.h
diff --git a/drivers/media/video/cx25821/cx25821.h b/drivers/media/pci/cx25821/cx25821.h
similarity index 100%
rename from drivers/media/video/cx25821/cx25821.h
rename to drivers/media/pci/cx25821/cx25821.h
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/pci/cx88/Kconfig
similarity index 100%
rename from drivers/media/video/cx88/Kconfig
rename to drivers/media/pci/cx88/Kconfig
diff --git a/drivers/media/video/cx88/Makefile b/drivers/media/pci/cx88/Makefile
similarity index 100%
rename from drivers/media/video/cx88/Makefile
rename to drivers/media/pci/cx88/Makefile
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-alsa.c
rename to drivers/media/pci/cx88/cx88-alsa.c
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-blackbird.c
rename to drivers/media/pci/cx88/cx88-blackbird.c
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/pci/cx88/cx88-cards.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-cards.c
rename to drivers/media/pci/cx88/cx88-cards.c
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/pci/cx88/cx88-core.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-core.c
rename to drivers/media/pci/cx88/cx88-core.c
diff --git a/drivers/media/video/cx88/cx88-dsp.c b/drivers/media/pci/cx88/cx88-dsp.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-dsp.c
rename to drivers/media/pci/cx88/cx88-dsp.c
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-dvb.c
rename to drivers/media/pci/cx88/cx88-dvb.c
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/pci/cx88/cx88-i2c.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-i2c.c
rename to drivers/media/pci/cx88/cx88-i2c.c
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/pci/cx88/cx88-input.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-input.c
rename to drivers/media/pci/cx88/cx88-input.c
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-mpeg.c
rename to drivers/media/pci/cx88/cx88-mpeg.c
diff --git a/drivers/media/video/cx88/cx88-reg.h b/drivers/media/pci/cx88/cx88-reg.h
similarity index 100%
rename from drivers/media/video/cx88/cx88-reg.h
rename to drivers/media/pci/cx88/cx88-reg.h
diff --git a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/pci/cx88/cx88-tvaudio.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-tvaudio.c
rename to drivers/media/pci/cx88/cx88-tvaudio.c
diff --git a/drivers/media/video/cx88/cx88-vbi.c b/drivers/media/pci/cx88/cx88-vbi.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-vbi.c
rename to drivers/media/pci/cx88/cx88-vbi.c
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-video.c
rename to drivers/media/pci/cx88/cx88-video.c
diff --git a/drivers/media/video/cx88/cx88-vp3054-i2c.c b/drivers/media/pci/cx88/cx88-vp3054-i2c.c
similarity index 100%
rename from drivers/media/video/cx88/cx88-vp3054-i2c.c
rename to drivers/media/pci/cx88/cx88-vp3054-i2c.c
diff --git a/drivers/media/video/cx88/cx88-vp3054-i2c.h b/drivers/media/pci/cx88/cx88-vp3054-i2c.h
similarity index 100%
rename from drivers/media/video/cx88/cx88-vp3054-i2c.h
rename to drivers/media/pci/cx88/cx88-vp3054-i2c.h
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h
similarity index 100%
rename from drivers/media/video/cx88/cx88.h
rename to drivers/media/pci/cx88/cx88.h
diff --git a/drivers/media/video/ivtv/Kconfig b/drivers/media/pci/ivtv/Kconfig
similarity index 100%
rename from drivers/media/video/ivtv/Kconfig
rename to drivers/media/pci/ivtv/Kconfig
diff --git a/drivers/media/video/ivtv/Makefile b/drivers/media/pci/ivtv/Makefile
similarity index 100%
rename from drivers/media/video/ivtv/Makefile
rename to drivers/media/pci/ivtv/Makefile
diff --git a/drivers/media/video/ivtv/ivtv-cards.c b/drivers/media/pci/ivtv/ivtv-cards.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-cards.c
rename to drivers/media/pci/ivtv/ivtv-cards.c
diff --git a/drivers/media/video/ivtv/ivtv-cards.h b/drivers/media/pci/ivtv/ivtv-cards.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-cards.h
rename to drivers/media/pci/ivtv/ivtv-cards.h
diff --git a/drivers/media/video/ivtv/ivtv-controls.c b/drivers/media/pci/ivtv/ivtv-controls.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-controls.c
rename to drivers/media/pci/ivtv/ivtv-controls.c
diff --git a/drivers/media/video/ivtv/ivtv-controls.h b/drivers/media/pci/ivtv/ivtv-controls.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-controls.h
rename to drivers/media/pci/ivtv/ivtv-controls.h
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-driver.c
rename to drivers/media/pci/ivtv/ivtv-driver.c
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/pci/ivtv/ivtv-driver.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-driver.h
rename to drivers/media/pci/ivtv/ivtv-driver.h
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/pci/ivtv/ivtv-fileops.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-fileops.c
rename to drivers/media/pci/ivtv/ivtv-fileops.c
diff --git a/drivers/media/video/ivtv/ivtv-fileops.h b/drivers/media/pci/ivtv/ivtv-fileops.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-fileops.h
rename to drivers/media/pci/ivtv/ivtv-fileops.h
diff --git a/drivers/media/video/ivtv/ivtv-firmware.c b/drivers/media/pci/ivtv/ivtv-firmware.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-firmware.c
rename to drivers/media/pci/ivtv/ivtv-firmware.c
diff --git a/drivers/media/video/ivtv/ivtv-firmware.h b/drivers/media/pci/ivtv/ivtv-firmware.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-firmware.h
rename to drivers/media/pci/ivtv/ivtv-firmware.h
diff --git a/drivers/media/video/ivtv/ivtv-gpio.c b/drivers/media/pci/ivtv/ivtv-gpio.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-gpio.c
rename to drivers/media/pci/ivtv/ivtv-gpio.c
diff --git a/drivers/media/video/ivtv/ivtv-gpio.h b/drivers/media/pci/ivtv/ivtv-gpio.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-gpio.h
rename to drivers/media/pci/ivtv/ivtv-gpio.h
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/pci/ivtv/ivtv-i2c.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-i2c.c
rename to drivers/media/pci/ivtv/ivtv-i2c.c
diff --git a/drivers/media/video/ivtv/ivtv-i2c.h b/drivers/media/pci/ivtv/ivtv-i2c.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-i2c.h
rename to drivers/media/pci/ivtv/ivtv-i2c.h
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-ioctl.c
rename to drivers/media/pci/ivtv/ivtv-ioctl.c
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.h b/drivers/media/pci/ivtv/ivtv-ioctl.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-ioctl.h
rename to drivers/media/pci/ivtv/ivtv-ioctl.h
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/pci/ivtv/ivtv-irq.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-irq.c
rename to drivers/media/pci/ivtv/ivtv-irq.c
diff --git a/drivers/media/video/ivtv/ivtv-irq.h b/drivers/media/pci/ivtv/ivtv-irq.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-irq.h
rename to drivers/media/pci/ivtv/ivtv-irq.h
diff --git a/drivers/media/video/ivtv/ivtv-mailbox.c b/drivers/media/pci/ivtv/ivtv-mailbox.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-mailbox.c
rename to drivers/media/pci/ivtv/ivtv-mailbox.c
diff --git a/drivers/media/video/ivtv/ivtv-mailbox.h b/drivers/media/pci/ivtv/ivtv-mailbox.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-mailbox.h
rename to drivers/media/pci/ivtv/ivtv-mailbox.h
diff --git a/drivers/media/video/ivtv/ivtv-queue.c b/drivers/media/pci/ivtv/ivtv-queue.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-queue.c
rename to drivers/media/pci/ivtv/ivtv-queue.c
diff --git a/drivers/media/video/ivtv/ivtv-queue.h b/drivers/media/pci/ivtv/ivtv-queue.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-queue.h
rename to drivers/media/pci/ivtv/ivtv-queue.h
diff --git a/drivers/media/video/ivtv/ivtv-routing.c b/drivers/media/pci/ivtv/ivtv-routing.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-routing.c
rename to drivers/media/pci/ivtv/ivtv-routing.c
diff --git a/drivers/media/video/ivtv/ivtv-routing.h b/drivers/media/pci/ivtv/ivtv-routing.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-routing.h
rename to drivers/media/pci/ivtv/ivtv-routing.h
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/pci/ivtv/ivtv-streams.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-streams.c
rename to drivers/media/pci/ivtv/ivtv-streams.c
diff --git a/drivers/media/video/ivtv/ivtv-streams.h b/drivers/media/pci/ivtv/ivtv-streams.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-streams.h
rename to drivers/media/pci/ivtv/ivtv-streams.h
diff --git a/drivers/media/video/ivtv/ivtv-udma.c b/drivers/media/pci/ivtv/ivtv-udma.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-udma.c
rename to drivers/media/pci/ivtv/ivtv-udma.c
diff --git a/drivers/media/video/ivtv/ivtv-udma.h b/drivers/media/pci/ivtv/ivtv-udma.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-udma.h
rename to drivers/media/pci/ivtv/ivtv-udma.h
diff --git a/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/pci/ivtv/ivtv-vbi.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-vbi.c
rename to drivers/media/pci/ivtv/ivtv-vbi.c
diff --git a/drivers/media/video/ivtv/ivtv-vbi.h b/drivers/media/pci/ivtv/ivtv-vbi.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-vbi.h
rename to drivers/media/pci/ivtv/ivtv-vbi.h
diff --git a/drivers/media/video/ivtv/ivtv-version.h b/drivers/media/pci/ivtv/ivtv-version.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-version.h
rename to drivers/media/pci/ivtv/ivtv-version.h
diff --git a/drivers/media/video/ivtv/ivtv-yuv.c b/drivers/media/pci/ivtv/ivtv-yuv.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-yuv.c
rename to drivers/media/pci/ivtv/ivtv-yuv.c
diff --git a/drivers/media/video/ivtv/ivtv-yuv.h b/drivers/media/pci/ivtv/ivtv-yuv.h
similarity index 100%
rename from drivers/media/video/ivtv/ivtv-yuv.h
rename to drivers/media/pci/ivtv/ivtv-yuv.h
diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/pci/ivtv/ivtvfb.c
similarity index 100%
rename from drivers/media/video/ivtv/ivtvfb.c
rename to drivers/media/pci/ivtv/ivtvfb.c
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/pci/saa7134/Kconfig
similarity index 100%
rename from drivers/media/video/saa7134/Kconfig
rename to drivers/media/pci/saa7134/Kconfig
diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/pci/saa7134/Makefile
similarity index 100%
rename from drivers/media/video/saa7134/Makefile
rename to drivers/media/pci/saa7134/Makefile
diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/pci/saa7134/saa6752hs.c
similarity index 100%
rename from drivers/media/video/saa7134/saa6752hs.c
rename to drivers/media/pci/saa7134/saa6752hs.c
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/pci/saa7134/saa7134-alsa.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-alsa.c
rename to drivers/media/pci/saa7134/saa7134-alsa.c
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/pci/saa7134/saa7134-cards.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-cards.c
rename to drivers/media/pci/saa7134/saa7134-cards.c
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-core.c
rename to drivers/media/pci/saa7134/saa7134-core.c
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/pci/saa7134/saa7134-dvb.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-dvb.c
rename to drivers/media/pci/saa7134/saa7134-dvb.c
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/pci/saa7134/saa7134-empress.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-empress.c
rename to drivers/media/pci/saa7134/saa7134-empress.c
diff --git a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/pci/saa7134/saa7134-i2c.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-i2c.c
rename to drivers/media/pci/saa7134/saa7134-i2c.c
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/pci/saa7134/saa7134-input.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-input.c
rename to drivers/media/pci/saa7134/saa7134-input.c
diff --git a/drivers/media/video/saa7134/saa7134-reg.h b/drivers/media/pci/saa7134/saa7134-reg.h
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-reg.h
rename to drivers/media/pci/saa7134/saa7134-reg.h
diff --git a/drivers/media/video/saa7134/saa7134-ts.c b/drivers/media/pci/saa7134/saa7134-ts.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-ts.c
rename to drivers/media/pci/saa7134/saa7134-ts.c
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/pci/saa7134/saa7134-tvaudio.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-tvaudio.c
rename to drivers/media/pci/saa7134/saa7134-tvaudio.c
diff --git a/drivers/media/video/saa7134/saa7134-vbi.c b/drivers/media/pci/saa7134/saa7134-vbi.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-vbi.c
rename to drivers/media/pci/saa7134/saa7134-vbi.c
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
similarity index 100%
rename from drivers/media/video/saa7134/saa7134-video.c
rename to drivers/media/pci/saa7134/saa7134-video.c
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h
similarity index 100%
rename from drivers/media/video/saa7134/saa7134.h
rename to drivers/media/pci/saa7134/saa7134.h
diff --git a/drivers/media/video/saa7164/Kconfig b/drivers/media/pci/saa7164/Kconfig
similarity index 100%
rename from drivers/media/video/saa7164/Kconfig
rename to drivers/media/pci/saa7164/Kconfig
diff --git a/drivers/media/video/saa7164/Makefile b/drivers/media/pci/saa7164/Makefile
similarity index 100%
rename from drivers/media/video/saa7164/Makefile
rename to drivers/media/pci/saa7164/Makefile
diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/pci/saa7164/saa7164-api.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-api.c
rename to drivers/media/pci/saa7164/saa7164-api.c
diff --git a/drivers/media/video/saa7164/saa7164-buffer.c b/drivers/media/pci/saa7164/saa7164-buffer.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-buffer.c
rename to drivers/media/pci/saa7164/saa7164-buffer.c
diff --git a/drivers/media/video/saa7164/saa7164-bus.c b/drivers/media/pci/saa7164/saa7164-bus.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-bus.c
rename to drivers/media/pci/saa7164/saa7164-bus.c
diff --git a/drivers/media/video/saa7164/saa7164-cards.c b/drivers/media/pci/saa7164/saa7164-cards.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-cards.c
rename to drivers/media/pci/saa7164/saa7164-cards.c
diff --git a/drivers/media/video/saa7164/saa7164-cmd.c b/drivers/media/pci/saa7164/saa7164-cmd.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-cmd.c
rename to drivers/media/pci/saa7164/saa7164-cmd.c
diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-core.c
rename to drivers/media/pci/saa7164/saa7164-core.c
diff --git a/drivers/media/video/saa7164/saa7164-dvb.c b/drivers/media/pci/saa7164/saa7164-dvb.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-dvb.c
rename to drivers/media/pci/saa7164/saa7164-dvb.c
diff --git a/drivers/media/video/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-encoder.c
rename to drivers/media/pci/saa7164/saa7164-encoder.c
diff --git a/drivers/media/video/saa7164/saa7164-fw.c b/drivers/media/pci/saa7164/saa7164-fw.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-fw.c
rename to drivers/media/pci/saa7164/saa7164-fw.c
diff --git a/drivers/media/video/saa7164/saa7164-i2c.c b/drivers/media/pci/saa7164/saa7164-i2c.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-i2c.c
rename to drivers/media/pci/saa7164/saa7164-i2c.c
diff --git a/drivers/media/video/saa7164/saa7164-reg.h b/drivers/media/pci/saa7164/saa7164-reg.h
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-reg.h
rename to drivers/media/pci/saa7164/saa7164-reg.h
diff --git a/drivers/media/video/saa7164/saa7164-types.h b/drivers/media/pci/saa7164/saa7164-types.h
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-types.h
rename to drivers/media/pci/saa7164/saa7164-types.h
diff --git a/drivers/media/video/saa7164/saa7164-vbi.c b/drivers/media/pci/saa7164/saa7164-vbi.c
similarity index 100%
rename from drivers/media/video/saa7164/saa7164-vbi.c
rename to drivers/media/pci/saa7164/saa7164-vbi.c
diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/pci/saa7164/saa7164.h
similarity index 100%
rename from drivers/media/video/saa7164/saa7164.h
rename to drivers/media/pci/saa7164/saa7164.h
diff --git a/drivers/media/video/zoran/Kconfig b/drivers/media/pci/zoran/Kconfig
similarity index 100%
rename from drivers/media/video/zoran/Kconfig
rename to drivers/media/pci/zoran/Kconfig
diff --git a/drivers/media/video/zoran/Makefile b/drivers/media/pci/zoran/Makefile
similarity index 100%
rename from drivers/media/video/zoran/Makefile
rename to drivers/media/pci/zoran/Makefile
diff --git a/drivers/media/video/zoran/videocodec.c b/drivers/media/pci/zoran/videocodec.c
similarity index 100%
rename from drivers/media/video/zoran/videocodec.c
rename to drivers/media/pci/zoran/videocodec.c
diff --git a/drivers/media/video/zoran/videocodec.h b/drivers/media/pci/zoran/videocodec.h
similarity index 100%
rename from drivers/media/video/zoran/videocodec.h
rename to drivers/media/pci/zoran/videocodec.h
diff --git a/drivers/media/video/zoran/zoran.h b/drivers/media/pci/zoran/zoran.h
similarity index 100%
rename from drivers/media/video/zoran/zoran.h
rename to drivers/media/pci/zoran/zoran.h
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/pci/zoran/zoran_card.c
similarity index 100%
rename from drivers/media/video/zoran/zoran_card.c
rename to drivers/media/pci/zoran/zoran_card.c
diff --git a/drivers/media/video/zoran/zoran_card.h b/drivers/media/pci/zoran/zoran_card.h
similarity index 100%
rename from drivers/media/video/zoran/zoran_card.h
rename to drivers/media/pci/zoran/zoran_card.h
diff --git a/drivers/media/video/zoran/zoran_device.c b/drivers/media/pci/zoran/zoran_device.c
similarity index 100%
rename from drivers/media/video/zoran/zoran_device.c
rename to drivers/media/pci/zoran/zoran_device.c
diff --git a/drivers/media/video/zoran/zoran_device.h b/drivers/media/pci/zoran/zoran_device.h
similarity index 100%
rename from drivers/media/video/zoran/zoran_device.h
rename to drivers/media/pci/zoran/zoran_device.h
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c
similarity index 100%
rename from drivers/media/video/zoran/zoran_driver.c
rename to drivers/media/pci/zoran/zoran_driver.c
diff --git a/drivers/media/video/zoran/zoran_procfs.c b/drivers/media/pci/zoran/zoran_procfs.c
similarity index 100%
rename from drivers/media/video/zoran/zoran_procfs.c
rename to drivers/media/pci/zoran/zoran_procfs.c
diff --git a/drivers/media/video/zoran/zoran_procfs.h b/drivers/media/pci/zoran/zoran_procfs.h
similarity index 100%
rename from drivers/media/video/zoran/zoran_procfs.h
rename to drivers/media/pci/zoran/zoran_procfs.h
diff --git a/drivers/media/video/zoran/zr36016.c b/drivers/media/pci/zoran/zr36016.c
similarity index 100%
rename from drivers/media/video/zoran/zr36016.c
rename to drivers/media/pci/zoran/zr36016.c
diff --git a/drivers/media/video/zoran/zr36016.h b/drivers/media/pci/zoran/zr36016.h
similarity index 100%
rename from drivers/media/video/zoran/zr36016.h
rename to drivers/media/pci/zoran/zr36016.h
diff --git a/drivers/media/video/zoran/zr36050.c b/drivers/media/pci/zoran/zr36050.c
similarity index 100%
rename from drivers/media/video/zoran/zr36050.c
rename to drivers/media/pci/zoran/zr36050.c
diff --git a/drivers/media/video/zoran/zr36050.h b/drivers/media/pci/zoran/zr36050.h
similarity index 100%
rename from drivers/media/video/zoran/zr36050.h
rename to drivers/media/pci/zoran/zr36050.h
diff --git a/drivers/media/video/zoran/zr36057.h b/drivers/media/pci/zoran/zr36057.h
similarity index 100%
rename from drivers/media/video/zoran/zr36057.h
rename to drivers/media/pci/zoran/zr36057.h
diff --git a/drivers/media/video/zoran/zr36060.c b/drivers/media/pci/zoran/zr36060.c
similarity index 100%
rename from drivers/media/video/zoran/zr36060.c
rename to drivers/media/pci/zoran/zr36060.c
diff --git a/drivers/media/video/zoran/zr36060.h b/drivers/media/pci/zoran/zr36060.h
similarity index 100%
rename from drivers/media/video/zoran/zr36060.h
rename to drivers/media/pci/zoran/zr36060.h
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index f3d4228..a837194 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -619,14 +619,6 @@ menuconfig V4L_PCI_DRIVERS
 
 if V4L_PCI_DRIVERS
 
-source "drivers/media/video/cx18/Kconfig"
-
-source "drivers/media/video/cx23885/Kconfig"
-
-source "drivers/media/video/cx25821/Kconfig"
-
-source "drivers/media/video/cx88/Kconfig"
-
 config VIDEO_HEXIUM_GEMINI
 	tristate "Hexium Gemini frame grabber"
 	depends on PCI && VIDEO_V4L2 && I2C
@@ -650,8 +642,6 @@ config VIDEO_HEXIUM_ORION
 	  To compile this driver as a module, choose M here: the
 	  module will be called hexium_orion.
 
-source "drivers/media/video/ivtv/Kconfig"
-
 config VIDEO_MEYE
 	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
 	depends on PCI && SONY_LAPTOP && VIDEO_V4L2
@@ -682,11 +672,6 @@ config VIDEO_MXB
 	  To compile this driver as a module, choose M here: the
 	  module will be called mxb.
 
-source "drivers/media/video/saa7134/Kconfig"
-
-source "drivers/media/video/saa7164/Kconfig"
-
-source "drivers/media/video/zoran/Kconfig"
 
 config STA2X11_VIP
 	tristate "STA2X11 VIP Video For Linux"
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index df60ffa..322a159 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -87,16 +87,12 @@ obj-$(CONFIG_SOC_CAMERA_TW9910)		+= tw9910.o
 
 # And now the v4l2 drivers:
 
-obj-$(CONFIG_VIDEO_ZORAN) += zoran/
 obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
 obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
 obj-$(CONFIG_VIDEO_W9966) += w9966.o
 obj-$(CONFIG_VIDEO_PMS) += pms.o
 obj-$(CONFIG_VIDEO_VINO) += vino.o
 obj-$(CONFIG_VIDEO_MEYE) += meye.o
-obj-$(CONFIG_VIDEO_SAA7134) += saa7134/
-obj-$(CONFIG_VIDEO_CX88) += cx88/
-obj-$(CONFIG_VIDEO_CX25821) += cx25821/
 obj-$(CONFIG_VIDEO_MXB) += mxb.o
 obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
 obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
@@ -116,13 +112,9 @@ obj-$(CONFIG_VIDEO_VIA_CAMERA) += via-camera.o
 
 obj-$(CONFIG_VIDEO_OMAP3)	+= omap3isp/
 
-obj-$(CONFIG_VIDEO_IVTV) += ivtv/
-obj-$(CONFIG_VIDEO_CX18) += cx18/
-
 obj-$(CONFIG_VIDEO_VIU) += fsl-viu.o
 obj-$(CONFIG_VIDEO_VIVI) += vivi.o
 obj-$(CONFIG_VIDEO_MEM2MEM_TESTDEV) += mem2mem_testdev.o
-obj-$(CONFIG_VIDEO_CX23885) += cx23885/
 
 obj-$(CONFIG_VIDEO_AK881X)		+= ak881x.o
 
@@ -157,8 +149,6 @@ obj-$(CONFIG_ARCH_DAVINCI)		+= davinci/
 
 obj-$(CONFIG_VIDEO_SH_VOU)		+= sh_vou.o
 
-obj-$(CONFIG_VIDEO_SAA7164)     += saa7164/
-
 obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
 
 obj-y	+= davinci/
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir
  2012-08-15 13:48   ` Mauro Carvalho Chehab
                       ` (3 preceding siblings ...)
  2012-08-15 13:48     ` [PATCH 04/12] [media] rename most media/video pci drivers to media/pci Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 06/12] [media] move the remaining PCI devices to drivers/media/pci Mauro Carvalho Chehab
                       ` (6 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Instead of having them under drivers/media/video, move them
to their own directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/Kconfig                          |  2 ++
 drivers/media/pci/Makefile                         |  3 +-
 drivers/media/pci/saa7146/Kconfig                  | 38 ++++++++++++++++++++++
 drivers/media/pci/saa7146/Makefile                 |  5 +++
 .../media/{video => pci/saa7146}/hexium_gemini.c   |  0
 .../media/{video => pci/saa7146}/hexium_orion.c    |  0
 drivers/media/{video => pci/saa7146}/mxb.c         |  0
 drivers/media/video/Kconfig                        | 38 ----------------------
 drivers/media/video/Makefile                       |  3 --
 9 files changed, 47 insertions(+), 42 deletions(-)
 create mode 100644 drivers/media/pci/saa7146/Kconfig
 create mode 100644 drivers/media/pci/saa7146/Makefile
 rename drivers/media/{video => pci/saa7146}/hexium_gemini.c (100%)
 rename drivers/media/{video => pci/saa7146}/hexium_orion.c (100%)
 rename drivers/media/{video => pci/saa7146}/mxb.c (100%)

diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index b69cb12..e1a9e1a 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -9,6 +9,7 @@ if MEDIA_ANALOG_TV_SUPPORT
 	comment "Media capture/analog TV support"
 source "drivers/media/pci/ivtv/Kconfig"
 source "drivers/media/pci/zoran/Kconfig"
+source "drivers/media/pci/saa7146/Kconfig"
 endif
 
 if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
@@ -20,6 +21,7 @@ source "drivers/media/pci/cx88/Kconfig"
 source "drivers/media/pci/bt8xx/Kconfig"
 source "drivers/media/pci/saa7134/Kconfig"
 source "drivers/media/pci/saa7164/Kconfig"
+
 endif
 
 if MEDIA_DIGITAL_TV_SUPPORT
diff --git a/drivers/media/pci/Makefile b/drivers/media/pci/Makefile
index d47c222..bb71e30 100644
--- a/drivers/media/pci/Makefile
+++ b/drivers/media/pci/Makefile
@@ -10,7 +10,8 @@ obj-y        :=	ttpci/		\
 		mantis/		\
 		ngene/		\
 		ddbridge/	\
-		b2c2/
+		b2c2/		\
+		saa7146/
 
 obj-$(CONFIG_VIDEO_IVTV) += ivtv/
 obj-$(CONFIG_VIDEO_ZORAN) += zoran/
diff --git a/drivers/media/pci/saa7146/Kconfig b/drivers/media/pci/saa7146/Kconfig
new file mode 100644
index 0000000..8923b76
--- /dev/null
+++ b/drivers/media/pci/saa7146/Kconfig
@@ -0,0 +1,38 @@
+config VIDEO_HEXIUM_GEMINI
+	tristate "Hexium Gemini frame grabber"
+	depends on PCI && VIDEO_V4L2 && I2C
+	select VIDEO_SAA7146_VV
+	---help---
+	  This is a video4linux driver for the Hexium Gemini frame
+	  grabber card by Hexium. Please note that the Gemini Dual
+	  card is *not* fully supported.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called hexium_gemini.
+
+config VIDEO_HEXIUM_ORION
+	tristate "Hexium HV-PCI6 and Orion frame grabber"
+	depends on PCI && VIDEO_V4L2 && I2C
+	select VIDEO_SAA7146_VV
+	---help---
+	  This is a video4linux driver for the Hexium HV-PCI6 and
+	  Orion frame grabber cards by Hexium.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called hexium_orion.
+
+config VIDEO_MXB
+	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
+	depends on PCI && VIDEO_V4L2 && I2C
+	select VIDEO_SAA7146_VV
+	select VIDEO_TUNER
+	select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TDA9840 if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TEA6415C if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEO_TEA6420 if VIDEO_HELPER_CHIPS_AUTO
+	---help---
+	  This is a video4linux driver for the 'Multimedia eXtension Board'
+	  TV card by Siemens-Nixdorf.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called mxb.
diff --git a/drivers/media/pci/saa7146/Makefile b/drivers/media/pci/saa7146/Makefile
new file mode 100644
index 0000000..362a38b
--- /dev/null
+++ b/drivers/media/pci/saa7146/Makefile
@@ -0,0 +1,5 @@
+obj-$(CONFIG_VIDEO_MXB) += mxb.o
+obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
+obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
+
+ccflags-y += -I$(srctree)/drivers/media/video
diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/pci/saa7146/hexium_gemini.c
similarity index 100%
rename from drivers/media/video/hexium_gemini.c
rename to drivers/media/pci/saa7146/hexium_gemini.c
diff --git a/drivers/media/video/hexium_orion.c b/drivers/media/pci/saa7146/hexium_orion.c
similarity index 100%
rename from drivers/media/video/hexium_orion.c
rename to drivers/media/pci/saa7146/hexium_orion.c
diff --git a/drivers/media/video/mxb.c b/drivers/media/pci/saa7146/mxb.c
similarity index 100%
rename from drivers/media/video/mxb.c
rename to drivers/media/pci/saa7146/mxb.c
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index a837194..4d79dfd 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -619,29 +619,6 @@ menuconfig V4L_PCI_DRIVERS
 
 if V4L_PCI_DRIVERS
 
-config VIDEO_HEXIUM_GEMINI
-	tristate "Hexium Gemini frame grabber"
-	depends on PCI && VIDEO_V4L2 && I2C
-	select VIDEO_SAA7146_VV
-	---help---
-	  This is a video4linux driver for the Hexium Gemini frame
-	  grabber card by Hexium. Please note that the Gemini Dual
-	  card is *not* fully supported.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called hexium_gemini.
-
-config VIDEO_HEXIUM_ORION
-	tristate "Hexium HV-PCI6 and Orion frame grabber"
-	depends on PCI && VIDEO_V4L2 && I2C
-	select VIDEO_SAA7146_VV
-	---help---
-	  This is a video4linux driver for the Hexium HV-PCI6 and
-	  Orion frame grabber cards by Hexium.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called hexium_orion.
-
 config VIDEO_MEYE
 	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
 	depends on PCI && SONY_LAPTOP && VIDEO_V4L2
@@ -656,21 +633,6 @@ config VIDEO_MEYE
 	  To compile this driver as a module, choose M here: the
 	  module will be called meye.
 
-config VIDEO_MXB
-	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
-	depends on PCI && VIDEO_V4L2 && I2C
-	select VIDEO_SAA7146_VV
-	select VIDEO_TUNER
-	select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TDA9840 if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TEA6415C if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEO_TEA6420 if VIDEO_HELPER_CHIPS_AUTO
-	---help---
-	  This is a video4linux driver for the 'Multimedia eXtension Board'
-	  TV card by Siemens-Nixdorf.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called mxb.
 
 
 config STA2X11_VIP
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 322a159..8df694d 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -93,9 +93,6 @@ obj-$(CONFIG_VIDEO_W9966) += w9966.o
 obj-$(CONFIG_VIDEO_PMS) += pms.o
 obj-$(CONFIG_VIDEO_VINO) += vino.o
 obj-$(CONFIG_VIDEO_MEYE) += meye.o
-obj-$(CONFIG_VIDEO_MXB) += mxb.o
-obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
-obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
 obj-$(CONFIG_STA2X11_VIP) += sta2x11_vip.o
 obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
 
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 06/12] [media] move the remaining PCI devices to drivers/media/pci
  2012-08-15 13:48   ` Mauro Carvalho Chehab
                       ` (4 preceding siblings ...)
  2012-08-15 13:48     ` [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/ Mauro Carvalho Chehab
                       ` (5 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Move meye and sta2x11_vip into the drivers/media/pci subdirs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/pci/Kconfig                          |  6 +++
 drivers/media/pci/Makefile                         |  2 +
 drivers/media/pci/meye/Kconfig                     | 13 +++++++
 drivers/media/pci/meye/Makefile                    |  1 +
 drivers/media/{video => pci/meye}/meye.c           |  0
 drivers/media/{video => pci/meye}/meye.h           |  0
 drivers/media/pci/sta2x11/Kconfig                  | 12 ++++++
 drivers/media/pci/sta2x11/Makefile                 |  1 +
 drivers/media/{video => pci/sta2x11}/sta2x11_vip.c |  0
 drivers/media/{video => pci/sta2x11}/sta2x11_vip.h |  0
 drivers/media/video/Kconfig                        | 45 ----------------------
 drivers/media/video/Makefile                       |  2 -
 12 files changed, 35 insertions(+), 47 deletions(-)
 create mode 100644 drivers/media/pci/meye/Kconfig
 create mode 100644 drivers/media/pci/meye/Makefile
 rename drivers/media/{video => pci/meye}/meye.c (100%)
 rename drivers/media/{video => pci/meye}/meye.h (100%)
 create mode 100644 drivers/media/pci/sta2x11/Kconfig
 create mode 100644 drivers/media/pci/sta2x11/Makefile
 rename drivers/media/{video => pci/sta2x11}/sta2x11_vip.c (100%)
 rename drivers/media/{video => pci/sta2x11}/sta2x11_vip.h (100%)

diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index e1a9e1a..4243d5d 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -5,6 +5,12 @@
 menu "Media PCI Adapters"
 	visible if PCI && MEDIA_SUPPORT
 
+if MEDIA_CAMERA_SUPPORT
+	comment "Media capture support"
+source "drivers/media/pci/meye/Kconfig"
+source "drivers/media/pci/sta2x11/Kconfig"
+endif
+
 if MEDIA_ANALOG_TV_SUPPORT
 	comment "Media capture/analog TV support"
 source "drivers/media/pci/ivtv/Kconfig"
diff --git a/drivers/media/pci/Makefile b/drivers/media/pci/Makefile
index bb71e30..c8dc6c7 100644
--- a/drivers/media/pci/Makefile
+++ b/drivers/media/pci/Makefile
@@ -22,3 +22,5 @@ obj-$(CONFIG_VIDEO_CX88) += cx88/
 obj-$(CONFIG_VIDEO_BT848) += bt8xx/
 obj-$(CONFIG_VIDEO_SAA7134) += saa7134/
 obj-$(CONFIG_VIDEO_SAA7164) += saa7164/
+obj-$(CONFIG_VIDEO_MEYE) += meye/
+obj-$(CONFIG_STA2X11_VIP) += sta2x11/
diff --git a/drivers/media/pci/meye/Kconfig b/drivers/media/pci/meye/Kconfig
new file mode 100644
index 0000000..b4bf848
--- /dev/null
+++ b/drivers/media/pci/meye/Kconfig
@@ -0,0 +1,13 @@
+config VIDEO_MEYE
+	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
+	depends on PCI && SONY_LAPTOP && VIDEO_V4L2
+	---help---
+	  This is the video4linux driver for the Motion Eye camera found
+	  in the Vaio Picturebook laptops. Please read the material in
+	  <file:Documentation/video4linux/meye.txt> for more information.
+
+	  If you say Y or M here, you need to say Y or M to "Sony Laptop
+	  Extras" in the misc device section.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called meye.
diff --git a/drivers/media/pci/meye/Makefile b/drivers/media/pci/meye/Makefile
new file mode 100644
index 0000000..4938851
--- /dev/null
+++ b/drivers/media/pci/meye/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_VIDEO_MEYE) += meye.o
diff --git a/drivers/media/video/meye.c b/drivers/media/pci/meye/meye.c
similarity index 100%
rename from drivers/media/video/meye.c
rename to drivers/media/pci/meye/meye.c
diff --git a/drivers/media/video/meye.h b/drivers/media/pci/meye/meye.h
similarity index 100%
rename from drivers/media/video/meye.h
rename to drivers/media/pci/meye/meye.h
diff --git a/drivers/media/pci/sta2x11/Kconfig b/drivers/media/pci/sta2x11/Kconfig
new file mode 100644
index 0000000..04a82cb
--- /dev/null
+++ b/drivers/media/pci/sta2x11/Kconfig
@@ -0,0 +1,12 @@
+config STA2X11_VIP
+	tristate "STA2X11 VIP Video For Linux"
+	depends on STA2X11
+	select VIDEO_ADV7180 if VIDEO_HELPER_CHIPS_AUTO
+	select VIDEOBUF_DMA_CONTIG
+	depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS
+	help
+	  Say Y for support for STA2X11 VIP (Video Input Port) capture
+	  device.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called sta2x11_vip.
diff --git a/drivers/media/pci/sta2x11/Makefile b/drivers/media/pci/sta2x11/Makefile
new file mode 100644
index 0000000..d6c471d
--- /dev/null
+++ b/drivers/media/pci/sta2x11/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_STA2X11_VIP) += sta2x11_vip.o
diff --git a/drivers/media/video/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c
similarity index 100%
rename from drivers/media/video/sta2x11_vip.c
rename to drivers/media/pci/sta2x11/sta2x11_vip.c
diff --git a/drivers/media/video/sta2x11_vip.h b/drivers/media/pci/sta2x11/sta2x11_vip.h
similarity index 100%
rename from drivers/media/video/sta2x11_vip.h
rename to drivers/media/pci/sta2x11/sta2x11_vip.h
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 4d79dfd..d545d93 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -606,51 +606,6 @@ config VIDEO_VIVI
 	  In doubt, say N.
 
 #
-# PCI drivers configuration - No devices here are for webcams
-#
-
-menuconfig V4L_PCI_DRIVERS
-	bool "V4L PCI(e) devices"
-	depends on PCI
-	depends on MEDIA_ANALOG_TV_SUPPORT
-	default y
-	---help---
-	  Say Y here to enable support for these PCI(e) drivers.
-
-if V4L_PCI_DRIVERS
-
-config VIDEO_MEYE
-	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
-	depends on PCI && SONY_LAPTOP && VIDEO_V4L2
-	---help---
-	  This is the video4linux driver for the Motion Eye camera found
-	  in the Vaio Picturebook laptops. Please read the material in
-	  <file:Documentation/video4linux/meye.txt> for more information.
-
-	  If you say Y or M here, you need to say Y or M to "Sony Laptop
-	  Extras" in the misc device section.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called meye.
-
-
-
-config STA2X11_VIP
-	tristate "STA2X11 VIP Video For Linux"
-	depends on STA2X11
-	select VIDEO_ADV7180 if VIDEO_HELPER_CHIPS_AUTO
-	select VIDEOBUF_DMA_CONTIG
-	depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS
-	help
-	  Say Y for support for STA2X11 VIP (Video Input Port) capture
-	  device.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called sta2x11_vip.
-
-endif # V4L_PCI_DRIVERS
-
-#
 # ISA & parallel port drivers configuration
 #	All devices here are webcam or grabber devices
 #
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 8df694d..f212af3 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -92,8 +92,6 @@ obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
 obj-$(CONFIG_VIDEO_W9966) += w9966.o
 obj-$(CONFIG_VIDEO_PMS) += pms.o
 obj-$(CONFIG_VIDEO_VINO) += vino.o
-obj-$(CONFIG_VIDEO_MEYE) += meye.o
-obj-$(CONFIG_STA2X11_VIP) += sta2x11_vip.o
 obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
 
 obj-$(CONFIG_VIDEO_BTCX)  += btcx-risc.o
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/
  2012-08-15 13:48   ` Mauro Carvalho Chehab
                       ` (5 preceding siblings ...)
  2012-08-15 13:48     ` [PATCH 06/12] [media] move the remaining PCI devices to drivers/media/pci Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver Mauro Carvalho Chehab
                       ` (4 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

We should keep just the I2C drivers under drivers/media/video, and
then rename it to drivers/media/i2c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/Kconfig                      |  1 +
 drivers/media/Makefile                     |  8 ++--
 drivers/media/parport/Kconfig              | 47 +++++++++++++++++++++++
 drivers/media/parport/Makefile             |  4 ++
 drivers/media/{video => parport}/bw-qcam.c |  0
 drivers/media/{video => parport}/c-qcam.c  |  0
 drivers/media/{video => parport}/pms.c     |  0
 drivers/media/{video => parport}/w9966.c   |  0
 drivers/media/video/Kconfig                | 61 ------------------------------
 drivers/media/video/Makefile               |  4 --
 10 files changed, 56 insertions(+), 69 deletions(-)
 create mode 100644 drivers/media/parport/Kconfig
 create mode 100644 drivers/media/parport/Makefile
 rename drivers/media/{video => parport}/bw-qcam.c (100%)
 rename drivers/media/{video => parport}/c-qcam.c (100%)
 rename drivers/media/{video => parport}/pms.c (100%)
 rename drivers/media/{video => parport}/w9966.c (100%)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 7970c24..c6d8658 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -164,6 +164,7 @@ source "drivers/media/dvb-core/Kconfig"
 source "drivers/media/pci/Kconfig"
 source "drivers/media/usb/Kconfig"
 source "drivers/media/mmc/Kconfig"
+source "drivers/media/parport/Kconfig"
 
 comment "Supported FireWire (IEEE 1394) Adapters"
 	depends on DVB_CORE && FIREWIRE
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index 3265a9a..360c44d 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -8,8 +8,8 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
   obj-$(CONFIG_MEDIA_SUPPORT) += media.o
 endif
 
-obj-y += v4l2-core/ tuners/ common/ rc/ video/
+obj-y += tuners/ common/ rc/ video/
+obj-y += pci/ usb/ mmc/ firewire/ parport/
 
-obj-$(CONFIG_VIDEO_DEV) += radio/
-obj-$(CONFIG_DVB_CORE)  += dvb-core/ pci/ dvb-frontends/ usb/ mmc/
-obj-$(CONFIG_DVB_FIREDTV) += firewire/
+obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
+obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/
diff --git a/drivers/media/parport/Kconfig b/drivers/media/parport/Kconfig
new file mode 100644
index 0000000..48138fe
--- /dev/null
+++ b/drivers/media/parport/Kconfig
@@ -0,0 +1,47 @@
+menu "V4L ISA and parallel port devices"
+	visible if (ISA || PARPORT) && MEDIA_CAMERA_SUPPORT
+
+config VIDEO_BWQCAM
+	tristate "Quickcam BW Video For Linux"
+	depends on PARPORT && VIDEO_V4L2
+	help
+	  Say Y have if you the black and white version of the QuickCam
+	  camera. See the next option for the color version.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called bw-qcam.
+
+config VIDEO_CQCAM
+	tristate "QuickCam Colour Video For Linux"
+	depends on PARPORT && VIDEO_V4L2
+	help
+	  This is the video4linux driver for the colour version of the
+	  Connectix QuickCam.  If you have one of these cameras, say Y here,
+	  otherwise say N.  This driver does not work with the original
+	  monochrome QuickCam, QuickCam VC or QuickClip.  It is also available
+	  as a module (c-qcam).
+	  Read <file:Documentation/video4linux/CQcam.txt> for more information.
+
+config VIDEO_PMS
+	tristate "Mediavision Pro Movie Studio Video For Linux"
+	depends on ISA && VIDEO_V4L2
+	help
+	  Say Y if you have the ISA Mediavision Pro Movie Studio
+	  capture card.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called pms.
+
+config VIDEO_W9966
+	tristate "W9966CF Webcam (FlyCam Supra and others) Video For Linux"
+	depends on PARPORT_1284 && PARPORT && VIDEO_V4L2
+	help
+	  Video4linux driver for Winbond's w9966 based Webcams.
+	  Currently tested with the LifeView FlyCam Supra.
+	  If you have one of these cameras, say Y here
+	  otherwise say N.
+	  This driver is also available as a module (w9966).
+
+	  Check out <file:Documentation/video4linux/w9966.txt> for more
+	  information.
+endmenu
diff --git a/drivers/media/parport/Makefile b/drivers/media/parport/Makefile
new file mode 100644
index 0000000..4eea06d
--- /dev/null
+++ b/drivers/media/parport/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
+obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
+obj-$(CONFIG_VIDEO_W9966) += w9966.o
+obj-$(CONFIG_VIDEO_PMS) += pms.o
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/parport/bw-qcam.c
similarity index 100%
rename from drivers/media/video/bw-qcam.c
rename to drivers/media/parport/bw-qcam.c
diff --git a/drivers/media/video/c-qcam.c b/drivers/media/parport/c-qcam.c
similarity index 100%
rename from drivers/media/video/c-qcam.c
rename to drivers/media/parport/c-qcam.c
diff --git a/drivers/media/video/pms.c b/drivers/media/parport/pms.c
similarity index 100%
rename from drivers/media/video/pms.c
rename to drivers/media/parport/pms.c
diff --git a/drivers/media/video/w9966.c b/drivers/media/parport/w9966.c
similarity index 100%
rename from drivers/media/video/w9966.c
rename to drivers/media/parport/w9966.c
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index d545d93..f9703a0 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -606,67 +606,6 @@ config VIDEO_VIVI
 	  In doubt, say N.
 
 #
-# ISA & parallel port drivers configuration
-#	All devices here are webcam or grabber devices
-#
-
-menuconfig V4L_ISA_PARPORT_DRIVERS
-	bool "V4L ISA and parallel port devices"
-	depends on ISA || PARPORT
-	depends on MEDIA_CAMERA_SUPPORT
-	default n
-	---help---
-	  Say Y here to enable support for these ISA and parallel port drivers.
-
-if V4L_ISA_PARPORT_DRIVERS
-
-config VIDEO_BWQCAM
-	tristate "Quickcam BW Video For Linux"
-	depends on PARPORT && VIDEO_V4L2
-	help
-	  Say Y have if you the black and white version of the QuickCam
-	  camera. See the next option for the color version.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called bw-qcam.
-
-config VIDEO_CQCAM
-	tristate "QuickCam Colour Video For Linux"
-	depends on PARPORT && VIDEO_V4L2
-	help
-	  This is the video4linux driver for the colour version of the
-	  Connectix QuickCam.  If you have one of these cameras, say Y here,
-	  otherwise say N.  This driver does not work with the original
-	  monochrome QuickCam, QuickCam VC or QuickClip.  It is also available
-	  as a module (c-qcam).
-	  Read <file:Documentation/video4linux/CQcam.txt> for more information.
-
-config VIDEO_PMS
-	tristate "Mediavision Pro Movie Studio Video For Linux"
-	depends on ISA && VIDEO_V4L2
-	help
-	  Say Y if you have the ISA Mediavision Pro Movie Studio
-	  capture card.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called pms.
-
-config VIDEO_W9966
-	tristate "W9966CF Webcam (FlyCam Supra and others) Video For Linux"
-	depends on PARPORT_1284 && PARPORT && VIDEO_V4L2
-	help
-	  Video4linux driver for Winbond's w9966 based Webcams.
-	  Currently tested with the LifeView FlyCam Supra.
-	  If you have one of these cameras, say Y here
-	  otherwise say N.
-	  This driver is also available as a module (w9966).
-
-	  Check out <file:Documentation/video4linux/w9966.txt> for more
-	  information.
-
-endif # V4L_ISA_PARPORT_DRIVERS
-
-#
 # Platform drivers
 #	All drivers here are currently for webcam support
 
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index f212af3..a0c6692 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -87,10 +87,6 @@ obj-$(CONFIG_SOC_CAMERA_TW9910)		+= tw9910.o
 
 # And now the v4l2 drivers:
 
-obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
-obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
-obj-$(CONFIG_VIDEO_W9966) += w9966.o
-obj-$(CONFIG_VIDEO_PMS) += pms.o
 obj-$(CONFIG_VIDEO_VINO) += vino.o
 obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
 
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver
  2012-08-15 13:48   ` Mauro Carvalho Chehab
                       ` (6 preceding siblings ...)
  2012-08-15 13:48     ` [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/ Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 09/12] [media] reorganize the API core items Mauro Carvalho Chehab
                       ` (3 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/mmc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/mmc/Kconfig b/drivers/media/mmc/Kconfig
index 0f2a957..8c30ada 100644
--- a/drivers/media/mmc/Kconfig
+++ b/drivers/media/mmc/Kconfig
@@ -1 +1,2 @@
+comment "Supported MMC/SDIO adapters"
 source "drivers/media/mmc/siano/Kconfig"
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 09/12] [media] reorganize the API core items
  2012-08-15 13:48   ` Mauro Carvalho Chehab
                       ` (7 preceding siblings ...)
  2012-08-15 13:48     ` [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 10/12] [media] move i2c files into drivers/media/i2c Mauro Carvalho Chehab
                       ` (2 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Reorganize the API core changes for them to appear closer to
the items that enable them, and not at the drivers part of
the menu.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/Kconfig           |  6 ++++--
 drivers/media/v4l2-core/Kconfig | 32 ++++++++++++++++++++++++--------
 drivers/media/video/Kconfig     | 17 -----------------
 3 files changed, 28 insertions(+), 27 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index c6d8658..c9cdc61 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -113,6 +113,8 @@ config VIDEO_V4L2_SUBDEV_API
 
 	  This API is mostly used by camera interfaces in embedded platforms.
 
+source "drivers/media/v4l2-core/Kconfig"
+
 #
 # DVB Core
 #	Only enables if one of DTV is selected
@@ -138,6 +140,8 @@ config DVB_NET
 	  You may want to disable the network support on embedded devices. If
 	  unsure say Y.
 
+source "drivers/media/dvb-core/Kconfig"
+
 comment "Media drivers"
 source "drivers/media/rc/Kconfig"
 
@@ -151,7 +155,6 @@ source "drivers/media/tuners/Kconfig"
 # Video/Radio/Hybrid adapters
 #
 
-source "drivers/media/v4l2-core/Kconfig"
 source "drivers/media/video/Kconfig"
 
 source "drivers/media/radio/Kconfig"
@@ -160,7 +163,6 @@ source "drivers/media/radio/Kconfig"
 # DVB adapters
 #
 
-source "drivers/media/dvb-core/Kconfig"
 source "drivers/media/pci/Kconfig"
 source "drivers/media/usb/Kconfig"
 source "drivers/media/mmc/Kconfig"
diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
index 6f53337..05e530c 100644
--- a/drivers/media/v4l2-core/Kconfig
+++ b/drivers/media/v4l2-core/Kconfig
@@ -2,27 +2,44 @@
 # Generic video config states
 #
 
+config VIDEO_ADV_DEBUG
+	bool "Enable advanced debug functionality on V4L2 drivers"
+	default n
+	---help---
+	  Say Y here to enable advanced debugging functionality on some
+	  V4L devices.
+	  In doubt, say N.
+
+config VIDEO_FIXED_MINOR_RANGES
+	bool "Enable old-style fixed minor ranges on drivers/video devices"
+	default n
+	---help---
+	  Say Y here to enable the old-style fixed-range minor assignments.
+	  Only useful if you rely on the old behavior and use mknod instead of udev.
+
+	  When in doubt, say N.
+
 config VIDEO_V4L2
 	tristate
-	depends on VIDEO_DEV && VIDEO_V4L2_COMMON
+	depends on VIDEO_V4L2_COMMON
 	default y
 
 config VIDEOBUF_GEN
 	tristate
 
 config VIDEOBUF_DMA_SG
+	tristate
 	depends on HAS_DMA
 	select VIDEOBUF_GEN
-	tristate
 
 config VIDEOBUF_VMALLOC
-	select VIDEOBUF_GEN
 	tristate
+	select VIDEOBUF_GEN
 
 config VIDEOBUF_DMA_CONTIG
+	tristate
 	depends on HAS_DMA
 	select VIDEOBUF_GEN
-	tristate
 
 config VIDEOBUF_DVB
 	tristate
@@ -43,18 +60,17 @@ config VIDEOBUF2_MEMOPS
 	tristate
 
 config VIDEOBUF2_DMA_CONTIG
+	tristate
 	select VIDEOBUF2_CORE
 	select VIDEOBUF2_MEMOPS
-	tristate
 
 config VIDEOBUF2_VMALLOC
+	tristate
 	select VIDEOBUF2_CORE
 	select VIDEOBUF2_MEMOPS
-	tristate
 
 config VIDEOBUF2_DMA_SG
+	tristate
 	#depends on HAS_DMA
 	select VIDEOBUF2_CORE
 	select VIDEOBUF2_MEMOPS
-	tristate
-
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index f9703a0..a7bd9576c 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -26,23 +26,6 @@ menuconfig VIDEO_CAPTURE_DRIVERS
 
 if VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2
 
-config VIDEO_ADV_DEBUG
-	bool "Enable advanced debug functionality"
-	default n
-	---help---
-	  Say Y here to enable advanced debugging functionality on some
-	  V4L devices.
-	  In doubt, say N.
-
-config VIDEO_FIXED_MINOR_RANGES
-	bool "Enable old-style fixed minor ranges for video devices"
-	default n
-	---help---
-	  Say Y here to enable the old-style fixed-range minor assignments.
-	  Only useful if you rely on the old behavior and use mknod instead of udev.
-
-	  When in doubt, say N.
-
 config VIDEO_HELPER_CHIPS_AUTO
 	bool "Autoselect pertinent encoders/decoders and other helper chips"
 	default y if !EXPERT
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 10/12] [media] move i2c files into drivers/media/i2c
  2012-08-15 13:48   ` Mauro Carvalho Chehab
                       ` (8 preceding siblings ...)
  2012-08-15 13:48     ` [PATCH 09/12] [media] reorganize the API core items Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-24 23:44       ` Sylwester Nawrocki
  2012-08-15 13:48     ` [PATCH 11/12] [media] move soc_camera i2c drivers into its own dir Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 12/12] [media] rename drivers/media/video to platform Mauro Carvalho Chehab
  11 siblings, 1 reply; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Move ancillary I2C drivers into drivers/media/i2c, in order to
better organize them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/Kconfig                              |   9 +-
 drivers/media/Makefile                             |   2 +-
 drivers/media/i2c/Kconfig                          | 566 ++++++++++++++++++++
 drivers/media/i2c/Makefile                         |  63 +++
 drivers/media/{video => i2c}/adp1653.c             |   2 +-
 drivers/media/{video => i2c}/adv7170.c             |   0
 drivers/media/{video => i2c}/adv7175.c             |   0
 drivers/media/{video => i2c}/adv7180.c             |   0
 drivers/media/{video => i2c}/adv7183.c             |   0
 drivers/media/{video => i2c}/adv7183_regs.h        |   0
 drivers/media/{video => i2c}/adv7343.c             |   0
 drivers/media/{video => i2c}/adv7343_regs.h        |   0
 drivers/media/{video => i2c}/adv7393.c             |   0
 drivers/media/{video => i2c}/adv7393_regs.h        |   0
 drivers/media/{video => i2c}/ak881x.c              |   0
 drivers/media/{video => i2c}/aptina-pll.c          |   0
 drivers/media/{video => i2c}/aptina-pll.h          |   0
 drivers/media/{video => i2c}/as3645a.c             |   2 +-
 drivers/media/{video => i2c}/bt819.c               |   0
 drivers/media/{video => i2c}/bt856.c               |   0
 drivers/media/{video => i2c}/bt866.c               |   0
 drivers/media/{video => i2c}/btcx-risc.c           |   0
 drivers/media/{video => i2c}/btcx-risc.h           |   0
 drivers/media/{video => i2c}/cs5345.c              |   0
 drivers/media/{video => i2c}/cs53l32a.c            |   0
 drivers/media/{video => i2c}/cx2341x.c             |   0
 drivers/media/{video => i2c}/cx25840/Kconfig       |   0
 drivers/media/{video => i2c}/cx25840/Makefile      |   2 +-
 .../media/{video => i2c}/cx25840/cx25840-audio.c   |   0
 .../media/{video => i2c}/cx25840/cx25840-core.c    |   0
 .../media/{video => i2c}/cx25840/cx25840-core.h    |   0
 .../{video => i2c}/cx25840/cx25840-firmware.c      |   0
 drivers/media/{video => i2c}/cx25840/cx25840-ir.c  |   0
 drivers/media/{video => i2c}/cx25840/cx25840-vbi.c |   0
 drivers/media/{video => i2c}/ir-kbd-i2c.c          |   0
 drivers/media/{video => i2c}/ks0127.c              |   0
 drivers/media/{video => i2c}/ks0127.h              |   0
 drivers/media/{video => i2c}/m52790.c              |   0
 drivers/media/{video => i2c}/m5mols/Kconfig        |   0
 drivers/media/{video => i2c}/m5mols/Makefile       |   0
 drivers/media/{video => i2c}/m5mols/m5mols.h       |   0
 .../media/{video => i2c}/m5mols/m5mols_capture.c   |   0
 .../media/{video => i2c}/m5mols/m5mols_controls.c  |   0
 drivers/media/{video => i2c}/m5mols/m5mols_core.c  |   0
 drivers/media/{video => i2c}/m5mols/m5mols_reg.h   |   0
 drivers/media/{video => i2c}/msp3400-driver.c      |   0
 drivers/media/{video => i2c}/msp3400-driver.h      |   0
 drivers/media/{video => i2c}/msp3400-kthreads.c    |   0
 drivers/media/{video => i2c}/mt9m032.c             |   0
 drivers/media/{video => i2c}/mt9p031.c             |   0
 drivers/media/{video => i2c}/mt9t001.c             |   0
 drivers/media/{video => i2c}/mt9v011.c             |   0
 drivers/media/{video => i2c}/mt9v032.c             |   0
 drivers/media/{video => i2c}/noon010pc30.c         |   0
 drivers/media/{video => i2c}/ov7670.c              |   0
 drivers/media/{video => i2c}/s5k6aa.c              |   0
 drivers/media/{video => i2c}/saa6588.c             |   0
 drivers/media/{video => i2c}/saa7110.c             |   0
 drivers/media/{video => i2c}/saa7115.c             |   0
 drivers/media/{video => i2c}/saa711x_regs.h        |   0
 drivers/media/{video => i2c}/saa7127.c             |   0
 drivers/media/{video => i2c}/saa717x.c             |   0
 drivers/media/{video => i2c}/saa7185.c             |   0
 drivers/media/{video => i2c}/saa7191.c             |   0
 drivers/media/{video => i2c}/saa7191.h             |   0
 drivers/media/{video => i2c}/smiapp-pll.c          |   2 +-
 drivers/media/{video => i2c}/smiapp-pll.h          |   2 +-
 drivers/media/{video => i2c}/smiapp/Kconfig        |   0
 drivers/media/{video => i2c}/smiapp/Makefile       |   2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-core.c  |   2 +-
 .../media/{video => i2c}/smiapp/smiapp-limits.c    |   2 +-
 .../media/{video => i2c}/smiapp/smiapp-limits.h    |   2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-quirk.c |   2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-quirk.h |   2 +-
 .../media/{video => i2c}/smiapp/smiapp-reg-defs.h  |   2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-reg.h   |   2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-regs.c  |   2 +-
 drivers/media/{video => i2c}/smiapp/smiapp-regs.h  |   0
 drivers/media/{video => i2c}/smiapp/smiapp.h       |   2 +-
 drivers/media/{video => i2c}/sr030pc30.c           |   0
 drivers/media/{video => i2c}/tcm825x.c             |   2 +-
 drivers/media/{video => i2c}/tcm825x.h             |   2 +-
 drivers/media/{video => i2c}/tda7432.c             |   0
 drivers/media/{video => i2c}/tda9840.c             |   0
 drivers/media/{video => i2c}/tea6415c.c            |   0
 drivers/media/{video => i2c}/tea6415c.h            |   0
 drivers/media/{video => i2c}/tea6420.c             |   0
 drivers/media/{video => i2c}/tea6420.h             |   0
 drivers/media/{video => i2c}/ths7303.c             |   0
 drivers/media/{video => i2c}/tlv320aic23b.c        |   0
 drivers/media/{video => i2c}/tvaudio.c             |   0
 drivers/media/{video => i2c}/tveeprom.c            |   0
 drivers/media/{video => i2c}/tvp514x.c             |   2 +-
 drivers/media/{video => i2c}/tvp514x_regs.h        |   2 +-
 drivers/media/{video => i2c}/tvp5150.c             |   0
 drivers/media/{video => i2c}/tvp5150_reg.h         |   0
 drivers/media/{video => i2c}/tvp7002.c             |   0
 drivers/media/{video => i2c}/tvp7002_reg.h         |   0
 drivers/media/{video => i2c}/upd64031a.c           |   0
 drivers/media/{video => i2c}/upd64083.c            |   0
 drivers/media/{video => i2c}/vp27smpx.c            |   0
 drivers/media/{video => i2c}/vpx3220.c             |   0
 drivers/media/{video => i2c}/vs6624.c              |   0
 drivers/media/{video => i2c}/vs6624_regs.h         |   0
 drivers/media/{video => i2c}/wm8739.c              |   0
 drivers/media/{video => i2c}/wm8775.c              |   0
 drivers/media/pci/bt8xx/Makefile                   |   2 +-
 drivers/media/pci/cx23885/Makefile                 |   2 +-
 drivers/media/pci/cx25821/Makefile                 |   2 +-
 drivers/media/pci/cx88/Makefile                    |   2 +-
 drivers/media/pci/ivtv/Makefile                    |   2 +-
 drivers/media/pci/saa7134/Makefile                 |   2 +-
 drivers/media/pci/saa7146/Makefile                 |   2 +-
 drivers/media/pci/saa7164/Makefile                 |   2 +-
 drivers/media/usb/cx231xx/Makefile                 |   2 +-
 drivers/media/usb/em28xx/Makefile                  |   2 +-
 drivers/media/usb/hdpvr/Makefile                   |   2 +-
 drivers/media/usb/pvrusb2/Makefile                 |   2 +-
 drivers/media/usb/stk1160/Makefile                 |   2 +-
 drivers/media/usb/tlg2300/Makefile                 |   2 +-
 drivers/media/usb/tm6000/Makefile                  |   2 +-
 drivers/media/usb/usbvision/Makefile               |   2 +-
 drivers/media/video/Kconfig                        | 579 +--------------------
 drivers/media/video/Makefile                       |  71 ---
 124 files changed, 671 insertions(+), 689 deletions(-)
 create mode 100644 drivers/media/i2c/Kconfig
 create mode 100644 drivers/media/i2c/Makefile
 rename drivers/media/{video => i2c}/adp1653.c (99%)
 rename drivers/media/{video => i2c}/adv7170.c (100%)
 rename drivers/media/{video => i2c}/adv7175.c (100%)
 rename drivers/media/{video => i2c}/adv7180.c (100%)
 rename drivers/media/{video => i2c}/adv7183.c (100%)
 rename drivers/media/{video => i2c}/adv7183_regs.h (100%)
 rename drivers/media/{video => i2c}/adv7343.c (100%)
 rename drivers/media/{video => i2c}/adv7343_regs.h (100%)
 rename drivers/media/{video => i2c}/adv7393.c (100%)
 rename drivers/media/{video => i2c}/adv7393_regs.h (100%)
 rename drivers/media/{video => i2c}/ak881x.c (100%)
 rename drivers/media/{video => i2c}/aptina-pll.c (100%)
 rename drivers/media/{video => i2c}/aptina-pll.h (100%)
 rename drivers/media/{video => i2c}/as3645a.c (99%)
 rename drivers/media/{video => i2c}/bt819.c (100%)
 rename drivers/media/{video => i2c}/bt856.c (100%)
 rename drivers/media/{video => i2c}/bt866.c (100%)
 rename drivers/media/{video => i2c}/btcx-risc.c (100%)
 rename drivers/media/{video => i2c}/btcx-risc.h (100%)
 rename drivers/media/{video => i2c}/cs5345.c (100%)
 rename drivers/media/{video => i2c}/cs53l32a.c (100%)
 rename drivers/media/{video => i2c}/cx2341x.c (100%)
 rename drivers/media/{video => i2c}/cx25840/Kconfig (100%)
 rename drivers/media/{video => i2c}/cx25840/Makefile (80%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-audio.c (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-core.c (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-core.h (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-firmware.c (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-ir.c (100%)
 rename drivers/media/{video => i2c}/cx25840/cx25840-vbi.c (100%)
 rename drivers/media/{video => i2c}/ir-kbd-i2c.c (100%)
 rename drivers/media/{video => i2c}/ks0127.c (100%)
 rename drivers/media/{video => i2c}/ks0127.h (100%)
 rename drivers/media/{video => i2c}/m52790.c (100%)
 rename drivers/media/{video => i2c}/m5mols/Kconfig (100%)
 rename drivers/media/{video => i2c}/m5mols/Makefile (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols.h (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols_capture.c (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols_controls.c (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols_core.c (100%)
 rename drivers/media/{video => i2c}/m5mols/m5mols_reg.h (100%)
 rename drivers/media/{video => i2c}/msp3400-driver.c (100%)
 rename drivers/media/{video => i2c}/msp3400-driver.h (100%)
 rename drivers/media/{video => i2c}/msp3400-kthreads.c (100%)
 rename drivers/media/{video => i2c}/mt9m032.c (100%)
 rename drivers/media/{video => i2c}/mt9p031.c (100%)
 rename drivers/media/{video => i2c}/mt9t001.c (100%)
 rename drivers/media/{video => i2c}/mt9v011.c (100%)
 rename drivers/media/{video => i2c}/mt9v032.c (100%)
 rename drivers/media/{video => i2c}/noon010pc30.c (100%)
 rename drivers/media/{video => i2c}/ov7670.c (100%)
 rename drivers/media/{video => i2c}/s5k6aa.c (100%)
 rename drivers/media/{video => i2c}/saa6588.c (100%)
 rename drivers/media/{video => i2c}/saa7110.c (100%)
 rename drivers/media/{video => i2c}/saa7115.c (100%)
 rename drivers/media/{video => i2c}/saa711x_regs.h (100%)
 rename drivers/media/{video => i2c}/saa7127.c (100%)
 rename drivers/media/{video => i2c}/saa717x.c (100%)
 rename drivers/media/{video => i2c}/saa7185.c (100%)
 rename drivers/media/{video => i2c}/saa7191.c (100%)
 rename drivers/media/{video => i2c}/saa7191.h (100%)
 rename drivers/media/{video => i2c}/smiapp-pll.c (99%)
 rename drivers/media/{video => i2c}/smiapp-pll.h (98%)
 rename drivers/media/{video => i2c}/smiapp/Kconfig (100%)
 rename drivers/media/{video => i2c}/smiapp/Makefile (78%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-core.c (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-limits.c (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-limits.h (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-quirk.c (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-quirk.h (98%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-reg-defs.h (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-reg.h (98%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-regs.c (99%)
 rename drivers/media/{video => i2c}/smiapp/smiapp-regs.h (100%)
 rename drivers/media/{video => i2c}/smiapp/smiapp.h (99%)
 rename drivers/media/{video => i2c}/sr030pc30.c (100%)
 rename drivers/media/{video => i2c}/tcm825x.c (99%)
 rename drivers/media/{video => i2c}/tcm825x.h (99%)
 rename drivers/media/{video => i2c}/tda7432.c (100%)
 rename drivers/media/{video => i2c}/tda9840.c (100%)
 rename drivers/media/{video => i2c}/tea6415c.c (100%)
 rename drivers/media/{video => i2c}/tea6415c.h (100%)
 rename drivers/media/{video => i2c}/tea6420.c (100%)
 rename drivers/media/{video => i2c}/tea6420.h (100%)
 rename drivers/media/{video => i2c}/ths7303.c (100%)
 rename drivers/media/{video => i2c}/tlv320aic23b.c (100%)
 rename drivers/media/{video => i2c}/tvaudio.c (100%)
 rename drivers/media/{video => i2c}/tveeprom.c (100%)
 rename drivers/media/{video => i2c}/tvp514x.c (99%)
 rename drivers/media/{video => i2c}/tvp514x_regs.h (99%)
 rename drivers/media/{video => i2c}/tvp5150.c (100%)
 rename drivers/media/{video => i2c}/tvp5150_reg.h (100%)
 rename drivers/media/{video => i2c}/tvp7002.c (100%)
 rename drivers/media/{video => i2c}/tvp7002_reg.h (100%)
 rename drivers/media/{video => i2c}/upd64031a.c (100%)
 rename drivers/media/{video => i2c}/upd64083.c (100%)
 rename drivers/media/{video => i2c}/vp27smpx.c (100%)
 rename drivers/media/{video => i2c}/vpx3220.c (100%)
 rename drivers/media/{video => i2c}/vs6624.c (100%)
 rename drivers/media/{video => i2c}/vs6624_regs.h (100%)
 rename drivers/media/{video => i2c}/wm8739.c (100%)
 rename drivers/media/{video => i2c}/wm8775.c (100%)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index c9cdc61..26f3de5 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -151,18 +151,15 @@ source "drivers/media/rc/Kconfig"
 
 source "drivers/media/tuners/Kconfig"
 
+source "drivers/media/i2c/Kconfig"
+
 #
-# Video/Radio/Hybrid adapters
+# V4L platform/mem2mem drivers
 #
-
 source "drivers/media/video/Kconfig"
 
 source "drivers/media/radio/Kconfig"
 
-#
-# DVB adapters
-#
-
 source "drivers/media/pci/Kconfig"
 source "drivers/media/usb/Kconfig"
 source "drivers/media/mmc/Kconfig"
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index 360c44d..e1be196 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -9,7 +9,7 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
 endif
 
 obj-y += tuners/ common/ rc/ video/
-obj-y += pci/ usb/ mmc/ firewire/ parport/
+obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
 
 obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
 obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
new file mode 100644
index 0000000..1c677f5
--- /dev/null
+++ b/drivers/media/i2c/Kconfig
@@ -0,0 +1,566 @@
+#
+# Generic video config states
+#
+
+config VIDEO_BTCX
+	depends on PCI
+	tristate
+
+config VIDEO_TVEEPROM
+	tristate
+	depends on I2C
+
+#
+# Multimedia Video device configuration
+#
+
+if VIDEO_V4L2
+
+config VIDEO_HELPER_CHIPS_AUTO
+	bool "Autoselect pertinent encoders/decoders and other helper chips"
+	default y if !EXPERT
+	---help---
+	  Most video cards may require additional modules to encode or
+	  decode audio/video standards. This option will autoselect
+	  all pertinent modules to each selected video module.
+
+	  Unselect this only if you know exactly what you are doing, since
+	  it may break support on some boards.
+
+	  In doubt, say Y.
+
+config VIDEO_IR_I2C
+	tristate "I2C module for IR" if !VIDEO_HELPER_CHIPS_AUTO
+	depends on I2C && RC_CORE
+	default y
+	---help---
+	  Most boards have an IR chip directly connected via GPIO. However,
+	  some video boards have the IR connected via I2C bus.
+
+	  If your board doesn't have an I2C IR chip, you may disable this
+	  option.
+
+	  In doubt, say Y.
+
+#
+# Encoder / Decoder module configuration
+#
+
+menu "Encoders, decoders, sensors and other helper chips"
+	visible if !VIDEO_HELPER_CHIPS_AUTO
+
+comment "Audio decoders, processors and mixers"
+
+config VIDEO_TVAUDIO
+	tristate "Simple audio decoder chips"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for several audio decoder chips found on some bt8xx boards:
+	  Philips: tda9840, tda9873h, tda9874h/a, tda9850, tda985x, tea6300,
+		   tea6320, tea6420, tda8425, ta8874z.
+	  Microchip: pic16c54 based design on ProVideo PV951 board.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tvaudio.
+
+config VIDEO_TDA7432
+	tristate "Philips TDA7432 audio processor"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for tda7432 audio decoder chip found on some bt8xx boards.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tda7432.
+
+config VIDEO_TDA9840
+	tristate "Philips TDA9840 audio processor"
+	depends on I2C
+	---help---
+	  Support for tda9840 audio decoder chip found on some Zoran boards.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tda9840.
+
+config VIDEO_TEA6415C
+	tristate "Philips TEA6415C audio processor"
+	depends on I2C
+	---help---
+	  Support for tea6415c audio decoder chip found on some bt8xx boards.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tea6415c.
+
+config VIDEO_TEA6420
+	tristate "Philips TEA6420 audio processor"
+	depends on I2C
+	---help---
+	  Support for tea6420 audio decoder chip found on some bt8xx boards.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tea6420.
+
+config VIDEO_MSP3400
+	tristate "Micronas MSP34xx audio decoders"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Micronas MSP34xx series of audio decoders.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called msp3400.
+
+config VIDEO_CS5345
+	tristate "Cirrus Logic CS5345 audio ADC"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Cirrus Logic CS5345 24-bit, 192 kHz
+	  stereo A/D converter.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called cs5345.
+
+config VIDEO_CS53L32A
+	tristate "Cirrus Logic CS53L32A audio ADC"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Cirrus Logic CS53L32A low voltage
+	  stereo A/D converter.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called cs53l32a.
+
+config VIDEO_TLV320AIC23B
+	tristate "Texas Instruments TLV320AIC23B audio codec"
+	depends on VIDEO_V4L2 && I2C && EXPERIMENTAL
+	---help---
+	  Support for the Texas Instruments TLV320AIC23B audio codec.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tlv320aic23b.
+
+config VIDEO_WM8775
+	tristate "Wolfson Microelectronics WM8775 audio ADC with input mixer"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Wolfson Microelectronics WM8775 high
+	  performance stereo A/D Converter with a 4 channel input mixer.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called wm8775.
+
+config VIDEO_WM8739
+	tristate "Wolfson Microelectronics WM8739 stereo audio ADC"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Wolfson Microelectronics WM8739
+	  stereo A/D Converter.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called wm8739.
+
+config VIDEO_VP27SMPX
+	tristate "Panasonic VP27s internal MPX"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the internal MPX of the Panasonic VP27s tuner.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called vp27smpx.
+
+comment "RDS decoders"
+
+config VIDEO_SAA6588
+	tristate "SAA6588 Radio Chip RDS decoder support"
+	depends on VIDEO_V4L2 && I2C
+
+	help
+	  Support for this Radio Data System (RDS) decoder. This allows
+	  seeing radio station identification transmitted using this
+	  standard.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called saa6588.
+
+comment "Video decoders"
+
+config VIDEO_ADV7180
+	tristate "Analog Devices ADV7180 decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Analog Devices ADV7180 video decoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called adv7180.
+
+config VIDEO_ADV7183
+	tristate "Analog Devices ADV7183 decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  V4l2 subdevice driver for the Analog Devices
+	  ADV7183 video decoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called adv7183.
+
+config VIDEO_BT819
+	tristate "BT819A VideoStream decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for BT819A video decoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called bt819.
+
+config VIDEO_BT856
+	tristate "BT856 VideoStream decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for BT856 video decoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called bt856.
+
+config VIDEO_BT866
+	tristate "BT866 VideoStream decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for BT866 video decoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called bt866.
+
+config VIDEO_KS0127
+	tristate "KS0127 video decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for KS0127 video decoder.
+
+	  This chip is used on AverMedia AVS6EYES Zoran-based MJPEG
+	  cards.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called ks0127.
+
+config VIDEO_SAA7110
+	tristate "Philips SAA7110 video decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Philips SAA7110 video decoders.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called saa7110.
+
+config VIDEO_SAA711X
+	tristate "Philips SAA7111/3/4/5 video decoders"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Philips SAA7111/3/4/5 video decoders.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called saa7115.
+
+config VIDEO_SAA7191
+	tristate "Philips SAA7191 video decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Philips SAA7191 video decoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called saa7191.
+
+config VIDEO_TVP514X
+	tristate "Texas Instruments TVP514x video decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  This is a Video4Linux2 sensor-level driver for the TI TVP5146/47
+	  decoder. It is currently working with the TI OMAP3 camera
+	  controller.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tvp514x.
+
+config VIDEO_TVP5150
+	tristate "Texas Instruments TVP5150 video decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Texas Instruments TVP5150 video decoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tvp5150.
+
+config VIDEO_TVP7002
+	tristate "Texas Instruments TVP7002 video decoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Texas Instruments TVP7002 video decoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tvp7002.
+
+config VIDEO_VPX3220
+	tristate "vpx3220a, vpx3216b & vpx3214c video decoders"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for VPX322x video decoders.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called vpx3220.
+
+comment "Video and audio decoders"
+
+config VIDEO_SAA717X
+	tristate "Philips SAA7171/3/4 audio/video decoders"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Philips SAA7171/3/4 audio/video decoders.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called saa717x.
+
+source "drivers/media/i2c/cx25840/Kconfig"
+
+comment "MPEG video encoders"
+
+config VIDEO_CX2341X
+	tristate "Conexant CX2341x MPEG encoders"
+	depends on VIDEO_V4L2 && VIDEO_V4L2_COMMON
+	---help---
+	  Support for the Conexant CX23416 MPEG encoders
+	  and CX23415 MPEG encoder/decoders.
+
+	  This module currently supports the encoding functions only.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called cx2341x.
+
+comment "Video encoders"
+
+config VIDEO_SAA7127
+	tristate "Philips SAA7127/9 digital video encoders"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Philips SAA7127/9 digital video encoders.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called saa7127.
+
+config VIDEO_SAA7185
+	tristate "Philips SAA7185 video encoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Philips SAA7185 video encoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called saa7185.
+
+config VIDEO_ADV7170
+	tristate "Analog Devices ADV7170 video encoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Analog Devices ADV7170 video encoder driver
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called adv7170.
+
+config VIDEO_ADV7175
+	tristate "Analog Devices ADV7175 video encoder"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the Analog Devices ADV7175 video encoder driver
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called adv7175.
+
+config VIDEO_ADV7343
+	tristate "ADV7343 video encoder"
+	depends on I2C
+	help
+	  Support for Analog Devices I2C bus based ADV7343 encoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called adv7343.
+
+config VIDEO_ADV7393
+	tristate "ADV7393 video encoder"
+	depends on I2C
+	help
+	  Support for Analog Devices I2C bus based ADV7393 encoder.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called adv7393.
+
+config VIDEO_AK881X
+	tristate "AK8813/AK8814 video encoders"
+	depends on I2C
+	help
+	  Video output driver for AKM AK8813 and AK8814 TV encoders
+
+comment "Camera sensor devices"
+
+config VIDEO_APTINA_PLL
+	tristate
+
+config VIDEO_SMIAPP_PLL
+	tristate
+
+config VIDEO_OV7670
+	tristate "OmniVision OV7670 sensor support"
+	depends on I2C && VIDEO_V4L2
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This is a Video4Linux2 sensor-level driver for the OmniVision
+	  OV7670 VGA camera.  It currently only works with the M88ALP01
+	  controller.
+
+config VIDEO_VS6624
+	tristate "ST VS6624 sensor support"
+	depends on VIDEO_V4L2 && I2C
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This is a Video4Linux2 sensor-level driver for the ST VS6624
+	  camera.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called vs6624.
+
+config VIDEO_MT9M032
+	tristate "MT9M032 camera sensor support"
+	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
+	select VIDEO_APTINA_PLL
+	---help---
+	  This driver supports MT9M032 camera sensors from Aptina, monochrome
+	  models only.
+
+config VIDEO_MT9P031
+	tristate "Aptina MT9P031 support"
+	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
+	select VIDEO_APTINA_PLL
+	---help---
+	  This is a Video4Linux2 sensor-level driver for the Aptina
+	  (Micron) mt9p031 5 Mpixel camera.
+
+config VIDEO_MT9T001
+	tristate "Aptina MT9T001 support"
+	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This is a Video4Linux2 sensor-level driver for the Aptina
+	  (Micron) mt0t001 3 Mpixel camera.
+
+config VIDEO_MT9V011
+	tristate "Micron mt9v011 sensor support"
+	depends on I2C && VIDEO_V4L2
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This is a Video4Linux2 sensor-level driver for the Micron
+	  mt0v011 1.3 Mpixel camera.  It currently only works with the
+	  em28xx driver.
+
+config VIDEO_MT9V032
+	tristate "Micron MT9V032 sensor support"
+	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This is a Video4Linux2 sensor-level driver for the Micron
+	  MT9V032 752x480 CMOS sensor.
+
+config VIDEO_TCM825X
+	tristate "TCM825x camera sensor support"
+	depends on I2C && VIDEO_V4L2
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This is a driver for the Toshiba TCM825x VGA camera sensor.
+	  It is used for example in Nokia N800.
+
+config VIDEO_SR030PC30
+	tristate "Siliconfile SR030PC30 sensor support"
+	depends on I2C && VIDEO_V4L2
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This driver supports SR030PC30 VGA camera from Siliconfile
+
+config VIDEO_NOON010PC30
+	tristate "Siliconfile NOON010PC30 sensor support"
+	depends on I2C && VIDEO_V4L2 && EXPERIMENTAL && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This driver supports NOON010PC30 CIF camera from Siliconfile
+
+source "drivers/media/i2c/m5mols/Kconfig"
+
+config VIDEO_S5K6AA
+	tristate "Samsung S5K6AAFX sensor support"
+	depends on MEDIA_CAMERA_SUPPORT
+	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	---help---
+	  This is a V4L2 sensor-level driver for Samsung S5K6AA(FX) 1.3M
+	  camera sensor with an embedded SoC image signal processor.
+
+source "drivers/media/i2c/smiapp/Kconfig"
+
+comment "Flash devices"
+
+config VIDEO_ADP1653
+	tristate "ADP1653 flash support"
+	depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This is a driver for the ADP1653 flash controller. It is used for
+	  example in Nokia N900.
+
+config VIDEO_AS3645A
+	tristate "AS3645A flash driver support"
+	depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
+	depends on MEDIA_CAMERA_SUPPORT
+	---help---
+	  This is a driver for the AS3645A and LM3555 flash controllers. It has
+	  build in control for flash, torch and indicator LEDs.
+
+comment "Video improvement chips"
+
+config VIDEO_UPD64031A
+	tristate "NEC Electronics uPD64031A Ghost Reduction"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the NEC Electronics uPD64031A Ghost Reduction
+	  video chip. It is most often found in NTSC TV cards made for
+	  Japan and is used to reduce the 'ghosting' effect that can
+	  be present in analog TV broadcasts.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called upd64031a.
+
+config VIDEO_UPD64083
+	tristate "NEC Electronics uPD64083 3-Dimensional Y/C separation"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	  Support for the NEC Electronics uPD64083 3-Dimensional Y/C
+	  separation video chip. It is used to improve the quality of
+	  the colors of a composite signal.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called upd64083.
+
+comment "Miscelaneous helper chips"
+
+config VIDEO_THS7303
+	tristate "THS7303 Video Amplifier"
+	depends on I2C
+	help
+	  Support for TI THS7303 video amplifier
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called ths7303.
+
+config VIDEO_M52790
+	tristate "Mitsubishi M52790 A/V switch"
+	depends on VIDEO_V4L2 && I2C
+	---help---
+	 Support for the Mitsubishi M52790 A/V switch.
+
+	 To compile this driver as a module, choose M here: the
+	 module will be called m52790.
+
+endmenu
+endif
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
new file mode 100644
index 0000000..93e8c14
--- /dev/null
+++ b/drivers/media/i2c/Makefile
@@ -0,0 +1,63 @@
+msp3400-objs	:=	msp3400-driver.o msp3400-kthreads.o
+obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
+
+obj-$(CONFIG_VIDEO_SMIAPP)	+= smiapp/
+obj-$(CONFIG_VIDEO_CX25840) += cx25840/
+obj-$(CONFIG_VIDEO_M5MOLS)	+= m5mols/
+
+obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
+obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
+obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
+obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
+obj-$(CONFIG_VIDEO_TDA9840) += tda9840.o
+obj-$(CONFIG_VIDEO_TEA6415C) += tea6415c.o
+obj-$(CONFIG_VIDEO_TEA6420) += tea6420.o
+obj-$(CONFIG_VIDEO_SAA7110) += saa7110.o
+obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o
+obj-$(CONFIG_VIDEO_SAA717X) += saa717x.o
+obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o
+obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o
+obj-$(CONFIG_VIDEO_SAA7191) += saa7191.o
+obj-$(CONFIG_VIDEO_ADV7170) += adv7170.o
+obj-$(CONFIG_VIDEO_ADV7175) += adv7175.o
+obj-$(CONFIG_VIDEO_ADV7180) += adv7180.o
+obj-$(CONFIG_VIDEO_ADV7183) += adv7183.o
+obj-$(CONFIG_VIDEO_ADV7343) += adv7343.o
+obj-$(CONFIG_VIDEO_ADV7393) += adv7393.o
+obj-$(CONFIG_VIDEO_VPX3220) += vpx3220.o
+obj-$(CONFIG_VIDEO_VS6624)  += vs6624.o
+obj-$(CONFIG_VIDEO_BT819) += bt819.o
+obj-$(CONFIG_VIDEO_BT856) += bt856.o
+obj-$(CONFIG_VIDEO_BT866) += bt866.o
+obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
+obj-$(CONFIG_VIDEO_THS7303) += ths7303.o
+obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
+obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
+obj-$(CONFIG_VIDEO_TVP7002) += tvp7002.o
+obj-$(CONFIG_VIDEO_CS5345) += cs5345.o
+obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o
+obj-$(CONFIG_VIDEO_M52790) += m52790.o
+obj-$(CONFIG_VIDEO_TLV320AIC23B) += tlv320aic23b.o
+obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
+obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
+obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
+obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
+obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
+obj-$(CONFIG_VIDEO_OV7670) 	+= ov7670.o
+obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
+obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
+obj-$(CONFIG_VIDEO_MT9M032) += mt9m032.o
+obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o
+obj-$(CONFIG_VIDEO_MT9T001) += mt9t001.o
+obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o
+obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o
+obj-$(CONFIG_VIDEO_SR030PC30)	+= sr030pc30.o
+obj-$(CONFIG_VIDEO_NOON010PC30)	+= noon010pc30.o
+obj-$(CONFIG_VIDEO_S5K6AA)	+= s5k6aa.o
+obj-$(CONFIG_VIDEO_ADP1653)	+= adp1653.o
+obj-$(CONFIG_VIDEO_AS3645A)	+= as3645a.o
+obj-$(CONFIG_VIDEO_SMIAPP_PLL)	+= smiapp-pll.o
+obj-$(CONFIG_VIDEO_BTCX)  += btcx-risc.o
+obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o
+obj-$(CONFIG_VIDEO_AK881X)		+= ak881x.o
+obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
diff --git a/drivers/media/video/adp1653.c b/drivers/media/i2c/adp1653.c
similarity index 99%
rename from drivers/media/video/adp1653.c
rename to drivers/media/i2c/adp1653.c
index 57e8709..18a38b3 100644
--- a/drivers/media/video/adp1653.c
+++ b/drivers/media/i2c/adp1653.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/adp1653.c
+ * drivers/media/i2c/adp1653.c
  *
  * Copyright (C) 2008--2011 Nokia Corporation
  *
diff --git a/drivers/media/video/adv7170.c b/drivers/media/i2c/adv7170.c
similarity index 100%
rename from drivers/media/video/adv7170.c
rename to drivers/media/i2c/adv7170.c
diff --git a/drivers/media/video/adv7175.c b/drivers/media/i2c/adv7175.c
similarity index 100%
rename from drivers/media/video/adv7175.c
rename to drivers/media/i2c/adv7175.c
diff --git a/drivers/media/video/adv7180.c b/drivers/media/i2c/adv7180.c
similarity index 100%
rename from drivers/media/video/adv7180.c
rename to drivers/media/i2c/adv7180.c
diff --git a/drivers/media/video/adv7183.c b/drivers/media/i2c/adv7183.c
similarity index 100%
rename from drivers/media/video/adv7183.c
rename to drivers/media/i2c/adv7183.c
diff --git a/drivers/media/video/adv7183_regs.h b/drivers/media/i2c/adv7183_regs.h
similarity index 100%
rename from drivers/media/video/adv7183_regs.h
rename to drivers/media/i2c/adv7183_regs.h
diff --git a/drivers/media/video/adv7343.c b/drivers/media/i2c/adv7343.c
similarity index 100%
rename from drivers/media/video/adv7343.c
rename to drivers/media/i2c/adv7343.c
diff --git a/drivers/media/video/adv7343_regs.h b/drivers/media/i2c/adv7343_regs.h
similarity index 100%
rename from drivers/media/video/adv7343_regs.h
rename to drivers/media/i2c/adv7343_regs.h
diff --git a/drivers/media/video/adv7393.c b/drivers/media/i2c/adv7393.c
similarity index 100%
rename from drivers/media/video/adv7393.c
rename to drivers/media/i2c/adv7393.c
diff --git a/drivers/media/video/adv7393_regs.h b/drivers/media/i2c/adv7393_regs.h
similarity index 100%
rename from drivers/media/video/adv7393_regs.h
rename to drivers/media/i2c/adv7393_regs.h
diff --git a/drivers/media/video/ak881x.c b/drivers/media/i2c/ak881x.c
similarity index 100%
rename from drivers/media/video/ak881x.c
rename to drivers/media/i2c/ak881x.c
diff --git a/drivers/media/video/aptina-pll.c b/drivers/media/i2c/aptina-pll.c
similarity index 100%
rename from drivers/media/video/aptina-pll.c
rename to drivers/media/i2c/aptina-pll.c
diff --git a/drivers/media/video/aptina-pll.h b/drivers/media/i2c/aptina-pll.h
similarity index 100%
rename from drivers/media/video/aptina-pll.h
rename to drivers/media/i2c/aptina-pll.h
diff --git a/drivers/media/video/as3645a.c b/drivers/media/i2c/as3645a.c
similarity index 99%
rename from drivers/media/video/as3645a.c
rename to drivers/media/i2c/as3645a.c
index c4b0357..3bfdbf9 100644
--- a/drivers/media/video/as3645a.c
+++ b/drivers/media/i2c/as3645a.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/as3645a.c - AS3645A and LM3555 flash controllers driver
+ * drivers/media/i2c/as3645a.c - AS3645A and LM3555 flash controllers driver
  *
  * Copyright (C) 2008-2011 Nokia Corporation
  * Copyright (c) 2011, Intel Corporation.
diff --git a/drivers/media/video/bt819.c b/drivers/media/i2c/bt819.c
similarity index 100%
rename from drivers/media/video/bt819.c
rename to drivers/media/i2c/bt819.c
diff --git a/drivers/media/video/bt856.c b/drivers/media/i2c/bt856.c
similarity index 100%
rename from drivers/media/video/bt856.c
rename to drivers/media/i2c/bt856.c
diff --git a/drivers/media/video/bt866.c b/drivers/media/i2c/bt866.c
similarity index 100%
rename from drivers/media/video/bt866.c
rename to drivers/media/i2c/bt866.c
diff --git a/drivers/media/video/btcx-risc.c b/drivers/media/i2c/btcx-risc.c
similarity index 100%
rename from drivers/media/video/btcx-risc.c
rename to drivers/media/i2c/btcx-risc.c
diff --git a/drivers/media/video/btcx-risc.h b/drivers/media/i2c/btcx-risc.h
similarity index 100%
rename from drivers/media/video/btcx-risc.h
rename to drivers/media/i2c/btcx-risc.h
diff --git a/drivers/media/video/cs5345.c b/drivers/media/i2c/cs5345.c
similarity index 100%
rename from drivers/media/video/cs5345.c
rename to drivers/media/i2c/cs5345.c
diff --git a/drivers/media/video/cs53l32a.c b/drivers/media/i2c/cs53l32a.c
similarity index 100%
rename from drivers/media/video/cs53l32a.c
rename to drivers/media/i2c/cs53l32a.c
diff --git a/drivers/media/video/cx2341x.c b/drivers/media/i2c/cx2341x.c
similarity index 100%
rename from drivers/media/video/cx2341x.c
rename to drivers/media/i2c/cx2341x.c
diff --git a/drivers/media/video/cx25840/Kconfig b/drivers/media/i2c/cx25840/Kconfig
similarity index 100%
rename from drivers/media/video/cx25840/Kconfig
rename to drivers/media/i2c/cx25840/Kconfig
diff --git a/drivers/media/video/cx25840/Makefile b/drivers/media/i2c/cx25840/Makefile
similarity index 80%
rename from drivers/media/video/cx25840/Makefile
rename to drivers/media/i2c/cx25840/Makefile
index dc40dde..898eb13 100644
--- a/drivers/media/video/cx25840/Makefile
+++ b/drivers/media/i2c/cx25840/Makefile
@@ -3,4 +3,4 @@ cx25840-objs    := cx25840-core.o cx25840-audio.o cx25840-firmware.o \
 
 obj-$(CONFIG_VIDEO_CX25840) += cx25840.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
diff --git a/drivers/media/video/cx25840/cx25840-audio.c b/drivers/media/i2c/cx25840/cx25840-audio.c
similarity index 100%
rename from drivers/media/video/cx25840/cx25840-audio.c
rename to drivers/media/i2c/cx25840/cx25840-audio.c
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c
similarity index 100%
rename from drivers/media/video/cx25840/cx25840-core.c
rename to drivers/media/i2c/cx25840/cx25840-core.c
diff --git a/drivers/media/video/cx25840/cx25840-core.h b/drivers/media/i2c/cx25840/cx25840-core.h
similarity index 100%
rename from drivers/media/video/cx25840/cx25840-core.h
rename to drivers/media/i2c/cx25840/cx25840-core.h
diff --git a/drivers/media/video/cx25840/cx25840-firmware.c b/drivers/media/i2c/cx25840/cx25840-firmware.c
similarity index 100%
rename from drivers/media/video/cx25840/cx25840-firmware.c
rename to drivers/media/i2c/cx25840/cx25840-firmware.c
diff --git a/drivers/media/video/cx25840/cx25840-ir.c b/drivers/media/i2c/cx25840/cx25840-ir.c
similarity index 100%
rename from drivers/media/video/cx25840/cx25840-ir.c
rename to drivers/media/i2c/cx25840/cx25840-ir.c
diff --git a/drivers/media/video/cx25840/cx25840-vbi.c b/drivers/media/i2c/cx25840/cx25840-vbi.c
similarity index 100%
rename from drivers/media/video/cx25840/cx25840-vbi.c
rename to drivers/media/i2c/cx25840/cx25840-vbi.c
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/i2c/ir-kbd-i2c.c
similarity index 100%
rename from drivers/media/video/ir-kbd-i2c.c
rename to drivers/media/i2c/ir-kbd-i2c.c
diff --git a/drivers/media/video/ks0127.c b/drivers/media/i2c/ks0127.c
similarity index 100%
rename from drivers/media/video/ks0127.c
rename to drivers/media/i2c/ks0127.c
diff --git a/drivers/media/video/ks0127.h b/drivers/media/i2c/ks0127.h
similarity index 100%
rename from drivers/media/video/ks0127.h
rename to drivers/media/i2c/ks0127.h
diff --git a/drivers/media/video/m52790.c b/drivers/media/i2c/m52790.c
similarity index 100%
rename from drivers/media/video/m52790.c
rename to drivers/media/i2c/m52790.c
diff --git a/drivers/media/video/m5mols/Kconfig b/drivers/media/i2c/m5mols/Kconfig
similarity index 100%
rename from drivers/media/video/m5mols/Kconfig
rename to drivers/media/i2c/m5mols/Kconfig
diff --git a/drivers/media/video/m5mols/Makefile b/drivers/media/i2c/m5mols/Makefile
similarity index 100%
rename from drivers/media/video/m5mols/Makefile
rename to drivers/media/i2c/m5mols/Makefile
diff --git a/drivers/media/video/m5mols/m5mols.h b/drivers/media/i2c/m5mols/m5mols.h
similarity index 100%
rename from drivers/media/video/m5mols/m5mols.h
rename to drivers/media/i2c/m5mols/m5mols.h
diff --git a/drivers/media/video/m5mols/m5mols_capture.c b/drivers/media/i2c/m5mols/m5mols_capture.c
similarity index 100%
rename from drivers/media/video/m5mols/m5mols_capture.c
rename to drivers/media/i2c/m5mols/m5mols_capture.c
diff --git a/drivers/media/video/m5mols/m5mols_controls.c b/drivers/media/i2c/m5mols/m5mols_controls.c
similarity index 100%
rename from drivers/media/video/m5mols/m5mols_controls.c
rename to drivers/media/i2c/m5mols/m5mols_controls.c
diff --git a/drivers/media/video/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c
similarity index 100%
rename from drivers/media/video/m5mols/m5mols_core.c
rename to drivers/media/i2c/m5mols/m5mols_core.c
diff --git a/drivers/media/video/m5mols/m5mols_reg.h b/drivers/media/i2c/m5mols/m5mols_reg.h
similarity index 100%
rename from drivers/media/video/m5mols/m5mols_reg.h
rename to drivers/media/i2c/m5mols/m5mols_reg.h
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/i2c/msp3400-driver.c
similarity index 100%
rename from drivers/media/video/msp3400-driver.c
rename to drivers/media/i2c/msp3400-driver.c
diff --git a/drivers/media/video/msp3400-driver.h b/drivers/media/i2c/msp3400-driver.h
similarity index 100%
rename from drivers/media/video/msp3400-driver.h
rename to drivers/media/i2c/msp3400-driver.h
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/i2c/msp3400-kthreads.c
similarity index 100%
rename from drivers/media/video/msp3400-kthreads.c
rename to drivers/media/i2c/msp3400-kthreads.c
diff --git a/drivers/media/video/mt9m032.c b/drivers/media/i2c/mt9m032.c
similarity index 100%
rename from drivers/media/video/mt9m032.c
rename to drivers/media/i2c/mt9m032.c
diff --git a/drivers/media/video/mt9p031.c b/drivers/media/i2c/mt9p031.c
similarity index 100%
rename from drivers/media/video/mt9p031.c
rename to drivers/media/i2c/mt9p031.c
diff --git a/drivers/media/video/mt9t001.c b/drivers/media/i2c/mt9t001.c
similarity index 100%
rename from drivers/media/video/mt9t001.c
rename to drivers/media/i2c/mt9t001.c
diff --git a/drivers/media/video/mt9v011.c b/drivers/media/i2c/mt9v011.c
similarity index 100%
rename from drivers/media/video/mt9v011.c
rename to drivers/media/i2c/mt9v011.c
diff --git a/drivers/media/video/mt9v032.c b/drivers/media/i2c/mt9v032.c
similarity index 100%
rename from drivers/media/video/mt9v032.c
rename to drivers/media/i2c/mt9v032.c
diff --git a/drivers/media/video/noon010pc30.c b/drivers/media/i2c/noon010pc30.c
similarity index 100%
rename from drivers/media/video/noon010pc30.c
rename to drivers/media/i2c/noon010pc30.c
diff --git a/drivers/media/video/ov7670.c b/drivers/media/i2c/ov7670.c
similarity index 100%
rename from drivers/media/video/ov7670.c
rename to drivers/media/i2c/ov7670.c
diff --git a/drivers/media/video/s5k6aa.c b/drivers/media/i2c/s5k6aa.c
similarity index 100%
rename from drivers/media/video/s5k6aa.c
rename to drivers/media/i2c/s5k6aa.c
diff --git a/drivers/media/video/saa6588.c b/drivers/media/i2c/saa6588.c
similarity index 100%
rename from drivers/media/video/saa6588.c
rename to drivers/media/i2c/saa6588.c
diff --git a/drivers/media/video/saa7110.c b/drivers/media/i2c/saa7110.c
similarity index 100%
rename from drivers/media/video/saa7110.c
rename to drivers/media/i2c/saa7110.c
diff --git a/drivers/media/video/saa7115.c b/drivers/media/i2c/saa7115.c
similarity index 100%
rename from drivers/media/video/saa7115.c
rename to drivers/media/i2c/saa7115.c
diff --git a/drivers/media/video/saa711x_regs.h b/drivers/media/i2c/saa711x_regs.h
similarity index 100%
rename from drivers/media/video/saa711x_regs.h
rename to drivers/media/i2c/saa711x_regs.h
diff --git a/drivers/media/video/saa7127.c b/drivers/media/i2c/saa7127.c
similarity index 100%
rename from drivers/media/video/saa7127.c
rename to drivers/media/i2c/saa7127.c
diff --git a/drivers/media/video/saa717x.c b/drivers/media/i2c/saa717x.c
similarity index 100%
rename from drivers/media/video/saa717x.c
rename to drivers/media/i2c/saa717x.c
diff --git a/drivers/media/video/saa7185.c b/drivers/media/i2c/saa7185.c
similarity index 100%
rename from drivers/media/video/saa7185.c
rename to drivers/media/i2c/saa7185.c
diff --git a/drivers/media/video/saa7191.c b/drivers/media/i2c/saa7191.c
similarity index 100%
rename from drivers/media/video/saa7191.c
rename to drivers/media/i2c/saa7191.c
diff --git a/drivers/media/video/saa7191.h b/drivers/media/i2c/saa7191.h
similarity index 100%
rename from drivers/media/video/saa7191.h
rename to drivers/media/i2c/saa7191.h
diff --git a/drivers/media/video/smiapp-pll.c b/drivers/media/i2c/smiapp-pll.c
similarity index 99%
rename from drivers/media/video/smiapp-pll.c
rename to drivers/media/i2c/smiapp-pll.c
index a2e41a2..a577614 100644
--- a/drivers/media/video/smiapp-pll.c
+++ b/drivers/media/i2c/smiapp-pll.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp-pll.c
+ * drivers/media/i2c/smiapp-pll.c
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp-pll.h b/drivers/media/i2c/smiapp-pll.h
similarity index 98%
rename from drivers/media/video/smiapp-pll.h
rename to drivers/media/i2c/smiapp-pll.h
index 9eab63f..cb2d2db 100644
--- a/drivers/media/video/smiapp-pll.h
+++ b/drivers/media/i2c/smiapp-pll.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp-pll.h
+ * drivers/media/i2c/smiapp-pll.h
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp/Kconfig b/drivers/media/i2c/smiapp/Kconfig
similarity index 100%
rename from drivers/media/video/smiapp/Kconfig
rename to drivers/media/i2c/smiapp/Kconfig
diff --git a/drivers/media/video/smiapp/Makefile b/drivers/media/i2c/smiapp/Makefile
similarity index 78%
rename from drivers/media/video/smiapp/Makefile
rename to drivers/media/i2c/smiapp/Makefile
index 36b0cfa..f45a003 100644
--- a/drivers/media/video/smiapp/Makefile
+++ b/drivers/media/i2c/smiapp/Makefile
@@ -2,4 +2,4 @@ smiapp-objs			+= smiapp-core.o smiapp-regs.o \
 				   smiapp-quirk.o smiapp-limits.o
 obj-$(CONFIG_VIDEO_SMIAPP)	+= smiapp.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
diff --git a/drivers/media/video/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
similarity index 99%
rename from drivers/media/video/smiapp/smiapp-core.c
rename to drivers/media/i2c/smiapp/smiapp-core.c
index bfd47c1..1cf914d 100644
--- a/drivers/media/video/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp/smiapp-core.c
+ * drivers/media/i2c/smiapp/smiapp-core.c
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp/smiapp-limits.c b/drivers/media/i2c/smiapp/smiapp-limits.c
similarity index 99%
rename from drivers/media/video/smiapp/smiapp-limits.c
rename to drivers/media/i2c/smiapp/smiapp-limits.c
index 0800e09..fb2f81a 100644
--- a/drivers/media/video/smiapp/smiapp-limits.c
+++ b/drivers/media/i2c/smiapp/smiapp-limits.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp/smiapp-limits.c
+ * drivers/media/i2c/smiapp/smiapp-limits.c
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp/smiapp-limits.h b/drivers/media/i2c/smiapp/smiapp-limits.h
similarity index 99%
rename from drivers/media/video/smiapp/smiapp-limits.h
rename to drivers/media/i2c/smiapp/smiapp-limits.h
index 7f4836bb..9ae765e 100644
--- a/drivers/media/video/smiapp/smiapp-limits.h
+++ b/drivers/media/i2c/smiapp/smiapp-limits.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp/smiapp-limits.h
+ * drivers/media/i2c/smiapp/smiapp-limits.h
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp/smiapp-quirk.c b/drivers/media/i2c/smiapp/smiapp-quirk.c
similarity index 99%
rename from drivers/media/video/smiapp/smiapp-quirk.c
rename to drivers/media/i2c/smiapp/smiapp-quirk.c
index 55e8795..cf04812 100644
--- a/drivers/media/video/smiapp/smiapp-quirk.c
+++ b/drivers/media/i2c/smiapp/smiapp-quirk.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp/smiapp-quirk.c
+ * drivers/media/i2c/smiapp/smiapp-quirk.c
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp/smiapp-quirk.h b/drivers/media/i2c/smiapp/smiapp-quirk.h
similarity index 98%
rename from drivers/media/video/smiapp/smiapp-quirk.h
rename to drivers/media/i2c/smiapp/smiapp-quirk.h
index f4dcaab..86fd3e8 100644
--- a/drivers/media/video/smiapp/smiapp-quirk.h
+++ b/drivers/media/i2c/smiapp/smiapp-quirk.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp/smiapp-quirk.h
+ * drivers/media/i2c/smiapp/smiapp-quirk.h
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp/smiapp-reg-defs.h b/drivers/media/i2c/smiapp/smiapp-reg-defs.h
similarity index 99%
rename from drivers/media/video/smiapp/smiapp-reg-defs.h
rename to drivers/media/i2c/smiapp/smiapp-reg-defs.h
index a089eb8..defa7c5 100644
--- a/drivers/media/video/smiapp/smiapp-reg-defs.h
+++ b/drivers/media/i2c/smiapp/smiapp-reg-defs.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp/smiapp-reg-defs.h
+ * drivers/media/i2c/smiapp/smiapp-reg-defs.h
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp/smiapp-reg.h b/drivers/media/i2c/smiapp/smiapp-reg.h
similarity index 98%
rename from drivers/media/video/smiapp/smiapp-reg.h
rename to drivers/media/i2c/smiapp/smiapp-reg.h
index d0167aa..54568ca 100644
--- a/drivers/media/video/smiapp/smiapp-reg.h
+++ b/drivers/media/i2c/smiapp/smiapp-reg.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp/smiapp-reg.h
+ * drivers/media/i2c/smiapp/smiapp-reg.h
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp/smiapp-regs.c b/drivers/media/i2c/smiapp/smiapp-regs.c
similarity index 99%
rename from drivers/media/video/smiapp/smiapp-regs.c
rename to drivers/media/i2c/smiapp/smiapp-regs.c
index b1812b1..70e0d8d 100644
--- a/drivers/media/video/smiapp/smiapp-regs.c
+++ b/drivers/media/i2c/smiapp/smiapp-regs.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp/smiapp-regs.c
+ * drivers/media/i2c/smiapp/smiapp-regs.c
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/smiapp/smiapp-regs.h b/drivers/media/i2c/smiapp/smiapp-regs.h
similarity index 100%
rename from drivers/media/video/smiapp/smiapp-regs.h
rename to drivers/media/i2c/smiapp/smiapp-regs.h
diff --git a/drivers/media/video/smiapp/smiapp.h b/drivers/media/i2c/smiapp/smiapp.h
similarity index 99%
rename from drivers/media/video/smiapp/smiapp.h
rename to drivers/media/i2c/smiapp/smiapp.h
index 587f7f1..4182a69 100644
--- a/drivers/media/video/smiapp/smiapp.h
+++ b/drivers/media/i2c/smiapp/smiapp.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/smiapp/smiapp.h
+ * drivers/media/i2c/smiapp/smiapp.h
  *
  * Generic driver for SMIA/SMIA++ compliant camera modules
  *
diff --git a/drivers/media/video/sr030pc30.c b/drivers/media/i2c/sr030pc30.c
similarity index 100%
rename from drivers/media/video/sr030pc30.c
rename to drivers/media/i2c/sr030pc30.c
diff --git a/drivers/media/video/tcm825x.c b/drivers/media/i2c/tcm825x.c
similarity index 99%
rename from drivers/media/video/tcm825x.c
rename to drivers/media/i2c/tcm825x.c
index 462caa4..9252529 100644
--- a/drivers/media/video/tcm825x.c
+++ b/drivers/media/i2c/tcm825x.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/tcm825x.c
+ * drivers/media/i2c/tcm825x.c
  *
  * TCM825X camera sensor driver.
  *
diff --git a/drivers/media/video/tcm825x.h b/drivers/media/i2c/tcm825x.h
similarity index 99%
rename from drivers/media/video/tcm825x.h
rename to drivers/media/i2c/tcm825x.h
index 5b7e696..8ebab95 100644
--- a/drivers/media/video/tcm825x.h
+++ b/drivers/media/i2c/tcm825x.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/tcm825x.h
+ * drivers/media/i2c/tcm825x.h
  *
  * Register definitions for the TCM825X CameraChip.
  *
diff --git a/drivers/media/video/tda7432.c b/drivers/media/i2c/tda7432.c
similarity index 100%
rename from drivers/media/video/tda7432.c
rename to drivers/media/i2c/tda7432.c
diff --git a/drivers/media/video/tda9840.c b/drivers/media/i2c/tda9840.c
similarity index 100%
rename from drivers/media/video/tda9840.c
rename to drivers/media/i2c/tda9840.c
diff --git a/drivers/media/video/tea6415c.c b/drivers/media/i2c/tea6415c.c
similarity index 100%
rename from drivers/media/video/tea6415c.c
rename to drivers/media/i2c/tea6415c.c
diff --git a/drivers/media/video/tea6415c.h b/drivers/media/i2c/tea6415c.h
similarity index 100%
rename from drivers/media/video/tea6415c.h
rename to drivers/media/i2c/tea6415c.h
diff --git a/drivers/media/video/tea6420.c b/drivers/media/i2c/tea6420.c
similarity index 100%
rename from drivers/media/video/tea6420.c
rename to drivers/media/i2c/tea6420.c
diff --git a/drivers/media/video/tea6420.h b/drivers/media/i2c/tea6420.h
similarity index 100%
rename from drivers/media/video/tea6420.h
rename to drivers/media/i2c/tea6420.h
diff --git a/drivers/media/video/ths7303.c b/drivers/media/i2c/ths7303.c
similarity index 100%
rename from drivers/media/video/ths7303.c
rename to drivers/media/i2c/ths7303.c
diff --git a/drivers/media/video/tlv320aic23b.c b/drivers/media/i2c/tlv320aic23b.c
similarity index 100%
rename from drivers/media/video/tlv320aic23b.c
rename to drivers/media/i2c/tlv320aic23b.c
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/i2c/tvaudio.c
similarity index 100%
rename from drivers/media/video/tvaudio.c
rename to drivers/media/i2c/tvaudio.c
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/i2c/tveeprom.c
similarity index 100%
rename from drivers/media/video/tveeprom.c
rename to drivers/media/i2c/tveeprom.c
diff --git a/drivers/media/video/tvp514x.c b/drivers/media/i2c/tvp514x.c
similarity index 99%
rename from drivers/media/video/tvp514x.c
rename to drivers/media/i2c/tvp514x.c
index cd615c1..1f3943b 100644
--- a/drivers/media/video/tvp514x.c
+++ b/drivers/media/i2c/tvp514x.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/tvp514x.c
+ * drivers/media/i2c/tvp514x.c
  *
  * TI TVP5146/47 decoder driver
  *
diff --git a/drivers/media/video/tvp514x_regs.h b/drivers/media/i2c/tvp514x_regs.h
similarity index 99%
rename from drivers/media/video/tvp514x_regs.h
rename to drivers/media/i2c/tvp514x_regs.h
index 18f29ad..d23aa2f 100644
--- a/drivers/media/video/tvp514x_regs.h
+++ b/drivers/media/i2c/tvp514x_regs.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/tvp514x_regs.h
+ * drivers/media/i2c/tvp514x_regs.h
  *
  * Copyright (C) 2008 Texas Instruments Inc
  * Author: Vaibhav Hiremath <hvaibhav@ti.com>
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/i2c/tvp5150.c
similarity index 100%
rename from drivers/media/video/tvp5150.c
rename to drivers/media/i2c/tvp5150.c
diff --git a/drivers/media/video/tvp5150_reg.h b/drivers/media/i2c/tvp5150_reg.h
similarity index 100%
rename from drivers/media/video/tvp5150_reg.h
rename to drivers/media/i2c/tvp5150_reg.h
diff --git a/drivers/media/video/tvp7002.c b/drivers/media/i2c/tvp7002.c
similarity index 100%
rename from drivers/media/video/tvp7002.c
rename to drivers/media/i2c/tvp7002.c
diff --git a/drivers/media/video/tvp7002_reg.h b/drivers/media/i2c/tvp7002_reg.h
similarity index 100%
rename from drivers/media/video/tvp7002_reg.h
rename to drivers/media/i2c/tvp7002_reg.h
diff --git a/drivers/media/video/upd64031a.c b/drivers/media/i2c/upd64031a.c
similarity index 100%
rename from drivers/media/video/upd64031a.c
rename to drivers/media/i2c/upd64031a.c
diff --git a/drivers/media/video/upd64083.c b/drivers/media/i2c/upd64083.c
similarity index 100%
rename from drivers/media/video/upd64083.c
rename to drivers/media/i2c/upd64083.c
diff --git a/drivers/media/video/vp27smpx.c b/drivers/media/i2c/vp27smpx.c
similarity index 100%
rename from drivers/media/video/vp27smpx.c
rename to drivers/media/i2c/vp27smpx.c
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/i2c/vpx3220.c
similarity index 100%
rename from drivers/media/video/vpx3220.c
rename to drivers/media/i2c/vpx3220.c
diff --git a/drivers/media/video/vs6624.c b/drivers/media/i2c/vs6624.c
similarity index 100%
rename from drivers/media/video/vs6624.c
rename to drivers/media/i2c/vs6624.c
diff --git a/drivers/media/video/vs6624_regs.h b/drivers/media/i2c/vs6624_regs.h
similarity index 100%
rename from drivers/media/video/vs6624_regs.h
rename to drivers/media/i2c/vs6624_regs.h
diff --git a/drivers/media/video/wm8739.c b/drivers/media/i2c/wm8739.c
similarity index 100%
rename from drivers/media/video/wm8739.c
rename to drivers/media/i2c/wm8739.c
diff --git a/drivers/media/video/wm8775.c b/drivers/media/i2c/wm8775.c
similarity index 100%
rename from drivers/media/video/wm8775.c
rename to drivers/media/i2c/wm8775.c
diff --git a/drivers/media/pci/bt8xx/Makefile b/drivers/media/pci/bt8xx/Makefile
index ae347b7..5f06597 100644
--- a/drivers/media/pci/bt8xx/Makefile
+++ b/drivers/media/pci/bt8xx/Makefile
@@ -7,5 +7,5 @@ obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o
 
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
diff --git a/drivers/media/pci/cx23885/Makefile b/drivers/media/pci/cx23885/Makefile
index f92cc4c..a2cbdcf 100644
--- a/drivers/media/pci/cx23885/Makefile
+++ b/drivers/media/pci/cx23885/Makefile
@@ -7,7 +7,7 @@ cx23885-objs	:= cx23885-cards.o cx23885-video.o cx23885-vbi.o \
 obj-$(CONFIG_VIDEO_CX23885) += cx23885.o
 obj-$(CONFIG_MEDIA_ALTERA_CI) += altera-ci.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
diff --git a/drivers/media/pci/cx25821/Makefile b/drivers/media/pci/cx25821/Makefile
index 1434e80..c038941 100644
--- a/drivers/media/pci/cx25821/Makefile
+++ b/drivers/media/pci/cx25821/Makefile
@@ -7,7 +7,7 @@ cx25821-y   := cx25821-core.o cx25821-cards.o cx25821-i2c.o \
 obj-$(CONFIG_VIDEO_CX25821) += cx25821.o
 obj-$(CONFIG_VIDEO_CX25821_ALSA) += cx25821-alsa.o
 
-ccflags-y := -Idrivers/media/video
+ccflags-y := -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
diff --git a/drivers/media/pci/cx88/Makefile b/drivers/media/pci/cx88/Makefile
index 884b4cd..d3679c3 100644
--- a/drivers/media/pci/cx88/Makefile
+++ b/drivers/media/pci/cx88/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_VIDEO_CX88_BLACKBIRD) += cx88-blackbird.o
 obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o
 obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
diff --git a/drivers/media/pci/ivtv/Makefile b/drivers/media/pci/ivtv/Makefile
index 80b4ec1..1408c9f 100644
--- a/drivers/media/pci/ivtv/Makefile
+++ b/drivers/media/pci/ivtv/Makefile
@@ -7,7 +7,7 @@ ivtv-objs	:= ivtv-routing.o ivtv-cards.o ivtv-controls.o \
 obj-$(CONFIG_VIDEO_IVTV) += ivtv.o
 obj-$(CONFIG_VIDEO_FB_IVTV) += ivtvfb.o
 
-ccflags-y += -I$(srctree)/drivers/media/video
+ccflags-y += -I$(srctree)/drivers/media/i2c
 ccflags-y += -I$(srctree)/drivers/media/tuners
 ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
diff --git a/drivers/media/pci/saa7134/Makefile b/drivers/media/pci/saa7134/Makefile
index aba5008..9e510c1 100644
--- a/drivers/media/pci/saa7134/Makefile
+++ b/drivers/media/pci/saa7134/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o
 
 obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o
 
-ccflags-y += -I$(srctree)/drivers/media/video
+ccflags-y += -I$(srctree)/drivers/media/i2c
 ccflags-y += -I$(srctree)/drivers/media/tuners
 ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
diff --git a/drivers/media/pci/saa7146/Makefile b/drivers/media/pci/saa7146/Makefile
index 362a38b..f3566a9 100644
--- a/drivers/media/pci/saa7146/Makefile
+++ b/drivers/media/pci/saa7146/Makefile
@@ -2,4 +2,4 @@ obj-$(CONFIG_VIDEO_MXB) += mxb.o
 obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
 obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
 
-ccflags-y += -I$(srctree)/drivers/media/video
+ccflags-y += -I$(srctree)/drivers/media/i2c
diff --git a/drivers/media/pci/saa7164/Makefile b/drivers/media/pci/saa7164/Makefile
index 847110c..ba0e33a 100644
--- a/drivers/media/pci/saa7164/Makefile
+++ b/drivers/media/pci/saa7164/Makefile
@@ -4,7 +4,7 @@ saa7164-objs	:= saa7164-cards.o saa7164-core.o saa7164-i2c.o saa7164-dvb.o \
 
 obj-$(CONFIG_VIDEO_SAA7164) += saa7164.o
 
-ccflags-y += -I$(srctree)/drivers/media/video
+ccflags-y += -I$(srctree)/drivers/media/i2c
 ccflags-y += -I$(srctree)/drivers/media/tuners
 ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
diff --git a/drivers/media/usb/cx231xx/Makefile b/drivers/media/usb/cx231xx/Makefile
index 1d40fce..52cf769 100644
--- a/drivers/media/usb/cx231xx/Makefile
+++ b/drivers/media/usb/cx231xx/Makefile
@@ -8,7 +8,7 @@ obj-$(CONFIG_VIDEO_CX231XX) += cx231xx.o
 obj-$(CONFIG_VIDEO_CX231XX_ALSA) += cx231xx-alsa.o
 obj-$(CONFIG_VIDEO_CX231XX_DVB) += cx231xx-dvb.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
diff --git a/drivers/media/usb/em28xx/Makefile b/drivers/media/usb/em28xx/Makefile
index 65c7c29..6c5f338 100644
--- a/drivers/media/usb/em28xx/Makefile
+++ b/drivers/media/usb/em28xx/Makefile
@@ -9,7 +9,7 @@ obj-$(CONFIG_VIDEO_EM28XX_ALSA) += em28xx-alsa.o
 obj-$(CONFIG_VIDEO_EM28XX_DVB) += em28xx-dvb.o
 obj-$(CONFIG_VIDEO_EM28XX_RC) += em28xx-rc.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
diff --git a/drivers/media/usb/hdpvr/Makefile b/drivers/media/usb/hdpvr/Makefile
index 52f057f..9b8d146 100644
--- a/drivers/media/usb/hdpvr/Makefile
+++ b/drivers/media/usb/hdpvr/Makefile
@@ -2,6 +2,6 @@ hdpvr-objs	:= hdpvr-control.o hdpvr-core.o hdpvr-video.o hdpvr-i2c.o
 
 obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
 
 ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
diff --git a/drivers/media/usb/pvrusb2/Makefile b/drivers/media/usb/pvrusb2/Makefile
index bc716db..ad70554 100644
--- a/drivers/media/usb/pvrusb2/Makefile
+++ b/drivers/media/usb/pvrusb2/Makefile
@@ -16,7 +16,7 @@ pvrusb2-objs	:= pvrusb2-i2c-core.o \
 
 obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
diff --git a/drivers/media/usb/stk1160/Makefile b/drivers/media/usb/stk1160/Makefile
index 8a3c784..dfe3e90 100644
--- a/drivers/media/usb/stk1160/Makefile
+++ b/drivers/media/usb/stk1160/Makefile
@@ -8,4 +8,4 @@ stk1160-y := 	stk1160-core.o \
 
 obj-$(CONFIG_VIDEO_STK1160) += stk1160.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
diff --git a/drivers/media/usb/tlg2300/Makefile b/drivers/media/usb/tlg2300/Makefile
index 4d66087..137f8e3 100644
--- a/drivers/media/usb/tlg2300/Makefile
+++ b/drivers/media/usb/tlg2300/Makefile
@@ -2,7 +2,7 @@ poseidon-objs := pd-video.o pd-alsa.o pd-dvb.o pd-radio.o pd-main.o
 
 obj-$(CONFIG_VIDEO_TLG2300) += poseidon.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
diff --git a/drivers/media/usb/tm6000/Makefile b/drivers/media/usb/tm6000/Makefile
index 1feb8c9..6fa1f10 100644
--- a/drivers/media/usb/tm6000/Makefile
+++ b/drivers/media/usb/tm6000/Makefile
@@ -9,7 +9,7 @@ obj-$(CONFIG_VIDEO_TM6000) += tm6000.o
 obj-$(CONFIG_VIDEO_TM6000_ALSA) += tm6000-alsa.o
 obj-$(CONFIG_VIDEO_TM6000_DVB) += tm6000-dvb.o
 
-ccflags-y := -Idrivers/media/video
+ccflags-y := -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
 ccflags-y += -Idrivers/media/dvb-core
 ccflags-y += -Idrivers/media/dvb-frontends
diff --git a/drivers/media/usb/usbvision/Makefile b/drivers/media/usb/usbvision/Makefile
index d55c6bd..9b3a558 100644
--- a/drivers/media/usb/usbvision/Makefile
+++ b/drivers/media/usb/usbvision/Makefile
@@ -2,5 +2,5 @@ usbvision-objs  := usbvision-core.o usbvision-video.o usbvision-i2c.o usbvision-
 
 obj-$(CONFIG_VIDEO_USBVISION) += usbvision.o
 
-ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/i2c
 ccflags-y += -Idrivers/media/tuners
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index a7bd9576c..f2171e7 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -1,578 +1,4 @@
-#
-# Generic video config states
-#
-
-config VIDEO_BTCX
-	depends on PCI
-	tristate
-
-config VIDEO_TVEEPROM
-	tristate
-	depends on I2C
-
-#
-# Multimedia Video device configuration
-#
-
-menuconfig VIDEO_CAPTURE_DRIVERS
-	bool "Video capture adapters"
-	depends on VIDEO_V4L2
-	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT
-	default y
-	---help---
-	  Say Y here to enable selecting the video adapters for
-	  webcams, analog TV, and hybrid analog/digital TV.
-	  Some of those devices also supports FM radio.
-
-if VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2
-
-config VIDEO_HELPER_CHIPS_AUTO
-	bool "Autoselect pertinent encoders/decoders and other helper chips"
-	default y if !EXPERT
-	---help---
-	  Most video cards may require additional modules to encode or
-	  decode audio/video standards. This option will autoselect
-	  all pertinent modules to each selected video module.
-
-	  Unselect this only if you know exactly what you are doing, since
-	  it may break support on some boards.
-
-	  In doubt, say Y.
-
-config VIDEO_IR_I2C
-	tristate "I2C module for IR" if !VIDEO_HELPER_CHIPS_AUTO
-	depends on I2C && RC_CORE
-	default y
-	---help---
-	  Most boards have an IR chip directly connected via GPIO. However,
-	  some video boards have the IR connected via I2C bus.
-
-	  If your board doesn't have an I2C IR chip, you may disable this
-	  option.
-
-	  In doubt, say Y.
-
-#
-# Encoder / Decoder module configuration
-#
-
-menu "Encoders, decoders, sensors and other helper chips"
-	visible if !VIDEO_HELPER_CHIPS_AUTO
-
-comment "Audio decoders, processors and mixers"
-
-config VIDEO_TVAUDIO
-	tristate "Simple audio decoder chips"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for several audio decoder chips found on some bt8xx boards:
-	  Philips: tda9840, tda9873h, tda9874h/a, tda9850, tda985x, tea6300,
-		   tea6320, tea6420, tda8425, ta8874z.
-	  Microchip: pic16c54 based design on ProVideo PV951 board.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tvaudio.
-
-config VIDEO_TDA7432
-	tristate "Philips TDA7432 audio processor"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for tda7432 audio decoder chip found on some bt8xx boards.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tda7432.
-
-config VIDEO_TDA9840
-	tristate "Philips TDA9840 audio processor"
-	depends on I2C
-	---help---
-	  Support for tda9840 audio decoder chip found on some Zoran boards.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tda9840.
-
-config VIDEO_TEA6415C
-	tristate "Philips TEA6415C audio processor"
-	depends on I2C
-	---help---
-	  Support for tea6415c audio decoder chip found on some bt8xx boards.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tea6415c.
-
-config VIDEO_TEA6420
-	tristate "Philips TEA6420 audio processor"
-	depends on I2C
-	---help---
-	  Support for tea6420 audio decoder chip found on some bt8xx boards.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tea6420.
-
-config VIDEO_MSP3400
-	tristate "Micronas MSP34xx audio decoders"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Micronas MSP34xx series of audio decoders.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called msp3400.
-
-config VIDEO_CS5345
-	tristate "Cirrus Logic CS5345 audio ADC"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Cirrus Logic CS5345 24-bit, 192 kHz
-	  stereo A/D converter.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called cs5345.
-
-config VIDEO_CS53L32A
-	tristate "Cirrus Logic CS53L32A audio ADC"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Cirrus Logic CS53L32A low voltage
-	  stereo A/D converter.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called cs53l32a.
-
-config VIDEO_TLV320AIC23B
-	tristate "Texas Instruments TLV320AIC23B audio codec"
-	depends on VIDEO_V4L2 && I2C && EXPERIMENTAL
-	---help---
-	  Support for the Texas Instruments TLV320AIC23B audio codec.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tlv320aic23b.
-
-config VIDEO_WM8775
-	tristate "Wolfson Microelectronics WM8775 audio ADC with input mixer"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Wolfson Microelectronics WM8775 high
-	  performance stereo A/D Converter with a 4 channel input mixer.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called wm8775.
-
-config VIDEO_WM8739
-	tristate "Wolfson Microelectronics WM8739 stereo audio ADC"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Wolfson Microelectronics WM8739
-	  stereo A/D Converter.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called wm8739.
-
-config VIDEO_VP27SMPX
-	tristate "Panasonic VP27s internal MPX"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the internal MPX of the Panasonic VP27s tuner.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called vp27smpx.
-
-comment "RDS decoders"
-
-config VIDEO_SAA6588
-	tristate "SAA6588 Radio Chip RDS decoder support"
-	depends on VIDEO_V4L2 && I2C
-
-	help
-	  Support for this Radio Data System (RDS) decoder. This allows
-	  seeing radio station identification transmitted using this
-	  standard.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called saa6588.
-
-comment "Video decoders"
-
-config VIDEO_ADV7180
-	tristate "Analog Devices ADV7180 decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Analog Devices ADV7180 video decoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called adv7180.
-
-config VIDEO_ADV7183
-	tristate "Analog Devices ADV7183 decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  V4l2 subdevice driver for the Analog Devices
-	  ADV7183 video decoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called adv7183.
-
-config VIDEO_BT819
-	tristate "BT819A VideoStream decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for BT819A video decoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called bt819.
-
-config VIDEO_BT856
-	tristate "BT856 VideoStream decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for BT856 video decoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called bt856.
-
-config VIDEO_BT866
-	tristate "BT866 VideoStream decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for BT866 video decoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called bt866.
-
-config VIDEO_KS0127
-	tristate "KS0127 video decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for KS0127 video decoder.
-
-	  This chip is used on AverMedia AVS6EYES Zoran-based MJPEG
-	  cards.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called ks0127.
-
-config VIDEO_SAA7110
-	tristate "Philips SAA7110 video decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Philips SAA7110 video decoders.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called saa7110.
-
-config VIDEO_SAA711X
-	tristate "Philips SAA7111/3/4/5 video decoders"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Philips SAA7111/3/4/5 video decoders.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called saa7115.
-
-config VIDEO_SAA7191
-	tristate "Philips SAA7191 video decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Philips SAA7191 video decoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called saa7191.
-
-config VIDEO_TVP514X
-	tristate "Texas Instruments TVP514x video decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  This is a Video4Linux2 sensor-level driver for the TI TVP5146/47
-	  decoder. It is currently working with the TI OMAP3 camera
-	  controller.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tvp514x.
-
-config VIDEO_TVP5150
-	tristate "Texas Instruments TVP5150 video decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Texas Instruments TVP5150 video decoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tvp5150.
-
-config VIDEO_TVP7002
-	tristate "Texas Instruments TVP7002 video decoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Texas Instruments TVP7002 video decoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tvp7002.
-
-config VIDEO_VPX3220
-	tristate "vpx3220a, vpx3216b & vpx3214c video decoders"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for VPX322x video decoders.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called vpx3220.
-
-comment "Video and audio decoders"
-
-config VIDEO_SAA717X
-	tristate "Philips SAA7171/3/4 audio/video decoders"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Philips SAA7171/3/4 audio/video decoders.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called saa717x.
-
-source "drivers/media/video/cx25840/Kconfig"
-
-comment "MPEG video encoders"
-
-config VIDEO_CX2341X
-	tristate "Conexant CX2341x MPEG encoders"
-	depends on VIDEO_V4L2 && VIDEO_V4L2_COMMON
-	---help---
-	  Support for the Conexant CX23416 MPEG encoders
-	  and CX23415 MPEG encoder/decoders.
-
-	  This module currently supports the encoding functions only.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called cx2341x.
-
-comment "Video encoders"
-
-config VIDEO_SAA7127
-	tristate "Philips SAA7127/9 digital video encoders"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Philips SAA7127/9 digital video encoders.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called saa7127.
-
-config VIDEO_SAA7185
-	tristate "Philips SAA7185 video encoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Philips SAA7185 video encoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called saa7185.
-
-config VIDEO_ADV7170
-	tristate "Analog Devices ADV7170 video encoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Analog Devices ADV7170 video encoder driver
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called adv7170.
-
-config VIDEO_ADV7175
-	tristate "Analog Devices ADV7175 video encoder"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the Analog Devices ADV7175 video encoder driver
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called adv7175.
-
-config VIDEO_ADV7343
-	tristate "ADV7343 video encoder"
-	depends on I2C
-	help
-	  Support for Analog Devices I2C bus based ADV7343 encoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called adv7343.
-
-config VIDEO_ADV7393
-	tristate "ADV7393 video encoder"
-	depends on I2C
-	help
-	  Support for Analog Devices I2C bus based ADV7393 encoder.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called adv7393.
-
-config VIDEO_AK881X
-	tristate "AK8813/AK8814 video encoders"
-	depends on I2C
-	help
-	  Video output driver for AKM AK8813 and AK8814 TV encoders
-
-comment "Camera sensor devices"
-
-config VIDEO_APTINA_PLL
-	tristate
-
-config VIDEO_SMIAPP_PLL
-	tristate
-
-config VIDEO_OV7670
-	tristate "OmniVision OV7670 sensor support"
-	depends on I2C && VIDEO_V4L2
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This is a Video4Linux2 sensor-level driver for the OmniVision
-	  OV7670 VGA camera.  It currently only works with the M88ALP01
-	  controller.
-
-config VIDEO_VS6624
-	tristate "ST VS6624 sensor support"
-	depends on VIDEO_V4L2 && I2C
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This is a Video4Linux2 sensor-level driver for the ST VS6624
-	  camera.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called vs6624.
-
-config VIDEO_MT9M032
-	tristate "MT9M032 camera sensor support"
-	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
-	depends on MEDIA_CAMERA_SUPPORT
-	select VIDEO_APTINA_PLL
-	---help---
-	  This driver supports MT9M032 camera sensors from Aptina, monochrome
-	  models only.
-
-config VIDEO_MT9P031
-	tristate "Aptina MT9P031 support"
-	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
-	depends on MEDIA_CAMERA_SUPPORT
-	select VIDEO_APTINA_PLL
-	---help---
-	  This is a Video4Linux2 sensor-level driver for the Aptina
-	  (Micron) mt9p031 5 Mpixel camera.
-
-config VIDEO_MT9T001
-	tristate "Aptina MT9T001 support"
-	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This is a Video4Linux2 sensor-level driver for the Aptina
-	  (Micron) mt0t001 3 Mpixel camera.
-
-config VIDEO_MT9V011
-	tristate "Micron mt9v011 sensor support"
-	depends on I2C && VIDEO_V4L2
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This is a Video4Linux2 sensor-level driver for the Micron
-	  mt0v011 1.3 Mpixel camera.  It currently only works with the
-	  em28xx driver.
-
-config VIDEO_MT9V032
-	tristate "Micron MT9V032 sensor support"
-	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This is a Video4Linux2 sensor-level driver for the Micron
-	  MT9V032 752x480 CMOS sensor.
-
-config VIDEO_TCM825X
-	tristate "TCM825x camera sensor support"
-	depends on I2C && VIDEO_V4L2
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This is a driver for the Toshiba TCM825x VGA camera sensor.
-	  It is used for example in Nokia N800.
-
-config VIDEO_SR030PC30
-	tristate "Siliconfile SR030PC30 sensor support"
-	depends on I2C && VIDEO_V4L2
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This driver supports SR030PC30 VGA camera from Siliconfile
-
-config VIDEO_NOON010PC30
-	tristate "Siliconfile NOON010PC30 sensor support"
-	depends on I2C && VIDEO_V4L2 && EXPERIMENTAL && VIDEO_V4L2_SUBDEV_API
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This driver supports NOON010PC30 CIF camera from Siliconfile
-
-source "drivers/media/video/m5mols/Kconfig"
-
-config VIDEO_S5K6AA
-	tristate "Samsung S5K6AAFX sensor support"
-	depends on MEDIA_CAMERA_SUPPORT
-	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
-	---help---
-	  This is a V4L2 sensor-level driver for Samsung S5K6AA(FX) 1.3M
-	  camera sensor with an embedded SoC image signal processor.
-
-source "drivers/media/video/smiapp/Kconfig"
-
-comment "Flash devices"
-
-config VIDEO_ADP1653
-	tristate "ADP1653 flash support"
-	depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This is a driver for the ADP1653 flash controller. It is used for
-	  example in Nokia N900.
-
-config VIDEO_AS3645A
-	tristate "AS3645A flash driver support"
-	depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
-	depends on MEDIA_CAMERA_SUPPORT
-	---help---
-	  This is a driver for the AS3645A and LM3555 flash controllers. It has
-	  build in control for flash, torch and indicator LEDs.
-
-comment "Video improvement chips"
-
-config VIDEO_UPD64031A
-	tristate "NEC Electronics uPD64031A Ghost Reduction"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the NEC Electronics uPD64031A Ghost Reduction
-	  video chip. It is most often found in NTSC TV cards made for
-	  Japan and is used to reduce the 'ghosting' effect that can
-	  be present in analog TV broadcasts.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called upd64031a.
-
-config VIDEO_UPD64083
-	tristate "NEC Electronics uPD64083 3-Dimensional Y/C separation"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	  Support for the NEC Electronics uPD64083 3-Dimensional Y/C
-	  separation video chip. It is used to improve the quality of
-	  the colors of a composite signal.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called upd64083.
-
-comment "Miscelaneous helper chips"
-
-config VIDEO_THS7303
-	tristate "THS7303 Video Amplifier"
-	depends on I2C
-	help
-	  Support for TI THS7303 video amplifier
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called ths7303.
-
-config VIDEO_M52790
-	tristate "Mitsubishi M52790 A/V switch"
-	depends on VIDEO_V4L2 && I2C
-	---help---
-	 Support for the Mitsubishi M52790 A/V switch.
-
-	 To compile this driver as a module, choose M here: the
-	 module will be called m52790.
-
-endmenu # encoder / decoder chips
+if MEDIA_CAMERA_SUPPORT
 
 config VIDEO_VIVI
 	tristate "Virtual Video Driver"
@@ -877,7 +303,6 @@ source "drivers/media/video/s5p-fimc/Kconfig"
 source "drivers/media/video/s5p-tv/Kconfig"
 
 endif # V4L_PLATFORM_DRIVERS
-endif # VIDEO_CAPTURE_DRIVERS
 
 menuconfig V4L_MEM2MEM_DRIVERS
 	bool "Memory-to-memory multimedia devices"
@@ -955,3 +380,5 @@ config VIDEO_MX2_EMMAPRP
 	    conversion.
 
 endif # V4L_MEM2MEM_DRIVERS
+
+endif # MEDIA_CAMERA_SUPPORT
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index a0c6692..52a04fa 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -2,73 +2,9 @@
 # Makefile for the video capture/playback device drivers.
 #
 
-msp3400-objs	:=	msp3400-driver.o msp3400-kthreads.o
-
 omap2cam-objs	:=	omap24xxcam.o omap24xxcam-dma.o
 
-# Helper modules
-
-obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
-
-# All i2c modules must come first:
-
-obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
-obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
-obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
-obj-$(CONFIG_VIDEO_TDA9840) += tda9840.o
-obj-$(CONFIG_VIDEO_TEA6415C) += tea6415c.o
-obj-$(CONFIG_VIDEO_TEA6420) += tea6420.o
-obj-$(CONFIG_VIDEO_SAA7110) += saa7110.o
-obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o
-obj-$(CONFIG_VIDEO_SAA717X) += saa717x.o
-obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o
-obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o
-obj-$(CONFIG_VIDEO_SAA7191) += saa7191.o
-obj-$(CONFIG_VIDEO_ADV7170) += adv7170.o
-obj-$(CONFIG_VIDEO_ADV7175) += adv7175.o
-obj-$(CONFIG_VIDEO_ADV7180) += adv7180.o
-obj-$(CONFIG_VIDEO_ADV7183) += adv7183.o
-obj-$(CONFIG_VIDEO_ADV7343) += adv7343.o
-obj-$(CONFIG_VIDEO_ADV7393) += adv7393.o
-obj-$(CONFIG_VIDEO_VPX3220) += vpx3220.o
-obj-$(CONFIG_VIDEO_VS6624)  += vs6624.o
-obj-$(CONFIG_VIDEO_BT819) += bt819.o
-obj-$(CONFIG_VIDEO_BT856) += bt856.o
-obj-$(CONFIG_VIDEO_BT866) += bt866.o
-obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
-obj-$(CONFIG_VIDEO_THS7303) += ths7303.o
 obj-$(CONFIG_VIDEO_VINO) += indycam.o
-obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
-obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
-obj-$(CONFIG_VIDEO_TVP7002) += tvp7002.o
-obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
-obj-$(CONFIG_VIDEO_CS5345) += cs5345.o
-obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o
-obj-$(CONFIG_VIDEO_M52790) += m52790.o
-obj-$(CONFIG_VIDEO_TLV320AIC23B) += tlv320aic23b.o
-obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
-obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
-obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
-obj-$(CONFIG_VIDEO_CX25840) += cx25840/
-obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
-obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
-obj-$(CONFIG_VIDEO_OV7670) 	+= ov7670.o
-obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
-obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
-obj-$(CONFIG_VIDEO_MT9M032) += mt9m032.o
-obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o
-obj-$(CONFIG_VIDEO_MT9T001) += mt9t001.o
-obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o
-obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o
-obj-$(CONFIG_VIDEO_SR030PC30)	+= sr030pc30.o
-obj-$(CONFIG_VIDEO_NOON010PC30)	+= noon010pc30.o
-obj-$(CONFIG_VIDEO_M5MOLS)	+= m5mols/
-obj-$(CONFIG_VIDEO_S5K6AA)	+= s5k6aa.o
-obj-$(CONFIG_VIDEO_SMIAPP)	+= smiapp/
-obj-$(CONFIG_VIDEO_ADP1653)	+= adp1653.o
-obj-$(CONFIG_VIDEO_AS3645A)	+= as3645a.o
-
-obj-$(CONFIG_VIDEO_SMIAPP_PLL)	+= smiapp-pll.o
 
 obj-$(CONFIG_SOC_CAMERA_IMX074)		+= imx074.o
 obj-$(CONFIG_SOC_CAMERA_MT9M001)	+= mt9m001.o
@@ -85,16 +21,12 @@ obj-$(CONFIG_SOC_CAMERA_OV9740)		+= ov9740.o
 obj-$(CONFIG_SOC_CAMERA_RJ54N1)		+= rj54n1cb0c.o
 obj-$(CONFIG_SOC_CAMERA_TW9910)		+= tw9910.o
 
-# And now the v4l2 drivers:
-
 obj-$(CONFIG_VIDEO_VINO) += vino.o
 obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
 
-obj-$(CONFIG_VIDEO_BTCX)  += btcx-risc.o
 
 obj-$(CONFIG_VIDEO_M32R_AR_M64278) += arv.o
 
-obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o
 
 obj-$(CONFIG_VIDEO_CAFE_CCIC) += marvell-ccic/
 obj-$(CONFIG_VIDEO_MMP_CAMERA) += marvell-ccic/
@@ -107,7 +39,6 @@ obj-$(CONFIG_VIDEO_VIU) += fsl-viu.o
 obj-$(CONFIG_VIDEO_VIVI) += vivi.o
 obj-$(CONFIG_VIDEO_MEM2MEM_TESTDEV) += mem2mem_testdev.o
 
-obj-$(CONFIG_VIDEO_AK881X)		+= ak881x.o
 
 obj-$(CONFIG_VIDEO_OMAP2)		+= omap2cam.o
 obj-$(CONFIG_SOC_CAMERA)		+= soc_camera.o soc_mediabus.o
@@ -140,8 +71,6 @@ obj-$(CONFIG_ARCH_DAVINCI)		+= davinci/
 
 obj-$(CONFIG_VIDEO_SH_VOU)		+= sh_vou.o
 
-obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
-
 obj-y	+= davinci/
 
 obj-$(CONFIG_ARCH_OMAP)	+= omap/
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 11/12] [media] move soc_camera i2c drivers into its own dir
  2012-08-15 13:48   ` Mauro Carvalho Chehab
                       ` (9 preceding siblings ...)
  2012-08-15 13:48     ` [PATCH 10/12] [media] move i2c files into drivers/media/i2c Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  2012-08-15 13:48     ` [PATCH 12/12] [media] rename drivers/media/video to platform Mauro Carvalho Chehab
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Move all soc_camera i2c drivers into drivers/media/i2c/soc_camera/.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/i2c/Kconfig                          |  4 +
 drivers/media/i2c/Makefile                         |  1 +
 drivers/media/i2c/soc_camera/Kconfig               | 89 ++++++++++++++++++++++
 drivers/media/i2c/soc_camera/Makefile              | 14 ++++
 drivers/media/{video => i2c/soc_camera}/imx074.c   |  0
 drivers/media/{video => i2c/soc_camera}/mt9m001.c  |  0
 drivers/media/{video => i2c/soc_camera}/mt9m111.c  |  0
 drivers/media/{video => i2c/soc_camera}/mt9t031.c  |  0
 drivers/media/{video => i2c/soc_camera}/mt9t112.c  |  0
 drivers/media/{video => i2c/soc_camera}/mt9v022.c  |  0
 drivers/media/{video => i2c/soc_camera}/ov2640.c   |  0
 drivers/media/{video => i2c/soc_camera}/ov5642.c   |  0
 drivers/media/{video => i2c/soc_camera}/ov6650.c   |  0
 drivers/media/{video => i2c/soc_camera}/ov772x.c   |  0
 drivers/media/{video => i2c/soc_camera}/ov9640.c   |  0
 drivers/media/{video => i2c/soc_camera}/ov9640.h   |  0
 drivers/media/{video => i2c/soc_camera}/ov9740.c   |  0
 .../media/{video => i2c/soc_camera}/rj54n1cb0c.c   |  0
 .../{video => i2c/soc_camera}/sh_mobile_csi2.c     |  0
 drivers/media/{video => i2c/soc_camera}/tw9910.c   |  0
 drivers/media/video/Kconfig                        | 87 ---------------------
 drivers/media/video/Makefile                       | 16 +---
 22 files changed, 109 insertions(+), 102 deletions(-)
 create mode 100644 drivers/media/i2c/soc_camera/Kconfig
 create mode 100644 drivers/media/i2c/soc_camera/Makefile
 rename drivers/media/{video => i2c/soc_camera}/imx074.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9m001.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9m111.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9t031.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9t112.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/mt9v022.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov2640.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov5642.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov6650.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov772x.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov9640.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov9640.h (100%)
 rename drivers/media/{video => i2c/soc_camera}/ov9740.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/rj54n1cb0c.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/sh_mobile_csi2.c (100%)
 rename drivers/media/{video => i2c/soc_camera}/tw9910.c (100%)

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 1c677f5..7fe4acf 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -562,5 +562,9 @@ config VIDEO_M52790
 	 To compile this driver as a module, choose M here: the
 	 module will be called m52790.
 
+if SOC_CAMERA
+	source "drivers/media/i2c/soc_camera/Kconfig"
+endif
+
 endmenu
 endif
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
index 93e8c14..088a460 100644
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -4,6 +4,7 @@ obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
 obj-$(CONFIG_VIDEO_SMIAPP)	+= smiapp/
 obj-$(CONFIG_VIDEO_CX25840) += cx25840/
 obj-$(CONFIG_VIDEO_M5MOLS)	+= m5mols/
+obj-y				+= soc_camera/
 
 obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
 obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
diff --git a/drivers/media/i2c/soc_camera/Kconfig b/drivers/media/i2c/soc_camera/Kconfig
new file mode 100644
index 0000000..73fe21d
--- /dev/null
+++ b/drivers/media/i2c/soc_camera/Kconfig
@@ -0,0 +1,89 @@
+comment "soc_camera sensor drivers"
+
+config SOC_CAMERA_IMX074
+	tristate "imx074 support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This driver supports IMX074 cameras from Sony
+
+config SOC_CAMERA_MT9M001
+	tristate "mt9m001 support"
+	depends on SOC_CAMERA && I2C
+	select GPIO_PCA953X if MT9M001_PCA9536_SWITCH
+	help
+	  This driver supports MT9M001 cameras from Micron, monochrome
+	  and colour models.
+
+config SOC_CAMERA_MT9M111
+	tristate "mt9m111, mt9m112 and mt9m131 support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This driver supports MT9M111, MT9M112 and MT9M131 cameras from
+	  Micron/Aptina
+
+config SOC_CAMERA_MT9T031
+	tristate "mt9t031 support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This driver supports MT9T031 cameras from Micron.
+
+config SOC_CAMERA_MT9T112
+	tristate "mt9t112 support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This driver supports MT9T112 cameras from Aptina.
+
+config SOC_CAMERA_MT9V022
+	tristate "mt9v022 support"
+	depends on SOC_CAMERA && I2C
+	select GPIO_PCA953X if MT9V022_PCA9536_SWITCH
+	help
+	  This driver supports MT9V022 cameras from Micron
+
+config SOC_CAMERA_OV2640
+	tristate "ov2640 camera support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This is a ov2640 camera driver
+
+config SOC_CAMERA_OV5642
+	tristate "ov5642 camera support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This is a V4L2 camera driver for the OmniVision OV5642 sensor
+
+config SOC_CAMERA_OV6650
+	tristate "ov6650 sensor support"
+	depends on SOC_CAMERA && I2C
+	---help---
+	  This is a V4L2 SoC camera driver for the OmniVision OV6650 sensor
+
+config SOC_CAMERA_OV772X
+	tristate "ov772x camera support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This is a ov772x camera driver
+
+config SOC_CAMERA_OV9640
+	tristate "ov9640 camera support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This is a ov9640 camera driver
+
+config SOC_CAMERA_OV9740
+	tristate "ov9740 camera support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This is a ov9740 camera driver
+
+config SOC_CAMERA_RJ54N1
+	tristate "rj54n1cb0c support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This is a rj54n1cb0c video driver
+
+config SOC_CAMERA_TW9910
+	tristate "tw9910 support"
+	depends on SOC_CAMERA && I2C
+	help
+	  This is a tw9910 video driver
diff --git a/drivers/media/i2c/soc_camera/Makefile b/drivers/media/i2c/soc_camera/Makefile
new file mode 100644
index 0000000..d0421fe
--- /dev/null
+++ b/drivers/media/i2c/soc_camera/Makefile
@@ -0,0 +1,14 @@
+obj-$(CONFIG_SOC_CAMERA_IMX074)		+= imx074.o
+obj-$(CONFIG_SOC_CAMERA_MT9M001)	+= mt9m001.o
+obj-$(CONFIG_SOC_CAMERA_MT9M111)	+= mt9m111.o
+obj-$(CONFIG_SOC_CAMERA_MT9T031)	+= mt9t031.o
+obj-$(CONFIG_SOC_CAMERA_MT9T112)	+= mt9t112.o
+obj-$(CONFIG_SOC_CAMERA_MT9V022)	+= mt9v022.o
+obj-$(CONFIG_SOC_CAMERA_OV2640)		+= ov2640.o
+obj-$(CONFIG_SOC_CAMERA_OV5642)		+= ov5642.o
+obj-$(CONFIG_SOC_CAMERA_OV6650)		+= ov6650.o
+obj-$(CONFIG_SOC_CAMERA_OV772X)		+= ov772x.o
+obj-$(CONFIG_SOC_CAMERA_OV9640)		+= ov9640.o
+obj-$(CONFIG_SOC_CAMERA_OV9740)		+= ov9740.o
+obj-$(CONFIG_SOC_CAMERA_RJ54N1)		+= rj54n1cb0c.o
+obj-$(CONFIG_SOC_CAMERA_TW9910)		+= tw9910.o
diff --git a/drivers/media/video/imx074.c b/drivers/media/i2c/soc_camera/imx074.c
similarity index 100%
rename from drivers/media/video/imx074.c
rename to drivers/media/i2c/soc_camera/imx074.c
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/i2c/soc_camera/mt9m001.c
similarity index 100%
rename from drivers/media/video/mt9m001.c
rename to drivers/media/i2c/soc_camera/mt9m001.c
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/i2c/soc_camera/mt9m111.c
similarity index 100%
rename from drivers/media/video/mt9m111.c
rename to drivers/media/i2c/soc_camera/mt9m111.c
diff --git a/drivers/media/video/mt9t031.c b/drivers/media/i2c/soc_camera/mt9t031.c
similarity index 100%
rename from drivers/media/video/mt9t031.c
rename to drivers/media/i2c/soc_camera/mt9t031.c
diff --git a/drivers/media/video/mt9t112.c b/drivers/media/i2c/soc_camera/mt9t112.c
similarity index 100%
rename from drivers/media/video/mt9t112.c
rename to drivers/media/i2c/soc_camera/mt9t112.c
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/i2c/soc_camera/mt9v022.c
similarity index 100%
rename from drivers/media/video/mt9v022.c
rename to drivers/media/i2c/soc_camera/mt9v022.c
diff --git a/drivers/media/video/ov2640.c b/drivers/media/i2c/soc_camera/ov2640.c
similarity index 100%
rename from drivers/media/video/ov2640.c
rename to drivers/media/i2c/soc_camera/ov2640.c
diff --git a/drivers/media/video/ov5642.c b/drivers/media/i2c/soc_camera/ov5642.c
similarity index 100%
rename from drivers/media/video/ov5642.c
rename to drivers/media/i2c/soc_camera/ov5642.c
diff --git a/drivers/media/video/ov6650.c b/drivers/media/i2c/soc_camera/ov6650.c
similarity index 100%
rename from drivers/media/video/ov6650.c
rename to drivers/media/i2c/soc_camera/ov6650.c
diff --git a/drivers/media/video/ov772x.c b/drivers/media/i2c/soc_camera/ov772x.c
similarity index 100%
rename from drivers/media/video/ov772x.c
rename to drivers/media/i2c/soc_camera/ov772x.c
diff --git a/drivers/media/video/ov9640.c b/drivers/media/i2c/soc_camera/ov9640.c
similarity index 100%
rename from drivers/media/video/ov9640.c
rename to drivers/media/i2c/soc_camera/ov9640.c
diff --git a/drivers/media/video/ov9640.h b/drivers/media/i2c/soc_camera/ov9640.h
similarity index 100%
rename from drivers/media/video/ov9640.h
rename to drivers/media/i2c/soc_camera/ov9640.h
diff --git a/drivers/media/video/ov9740.c b/drivers/media/i2c/soc_camera/ov9740.c
similarity index 100%
rename from drivers/media/video/ov9740.c
rename to drivers/media/i2c/soc_camera/ov9740.c
diff --git a/drivers/media/video/rj54n1cb0c.c b/drivers/media/i2c/soc_camera/rj54n1cb0c.c
similarity index 100%
rename from drivers/media/video/rj54n1cb0c.c
rename to drivers/media/i2c/soc_camera/rj54n1cb0c.c
diff --git a/drivers/media/video/sh_mobile_csi2.c b/drivers/media/i2c/soc_camera/sh_mobile_csi2.c
similarity index 100%
rename from drivers/media/video/sh_mobile_csi2.c
rename to drivers/media/i2c/soc_camera/sh_mobile_csi2.c
diff --git a/drivers/media/video/tw9910.c b/drivers/media/i2c/soc_camera/tw9910.c
similarity index 100%
rename from drivers/media/video/tw9910.c
rename to drivers/media/i2c/soc_camera/tw9910.c
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index f2171e7..28b25bf 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -127,57 +127,6 @@ config SOC_CAMERA
 	  over a bus like PCI or USB. For example some i2c camera connected
 	  directly to the data bus of an SoC.
 
-config SOC_CAMERA_IMX074
-	tristate "imx074 support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This driver supports IMX074 cameras from Sony
-
-config SOC_CAMERA_MT9M001
-	tristate "mt9m001 support"
-	depends on SOC_CAMERA && I2C
-	select GPIO_PCA953X if MT9M001_PCA9536_SWITCH
-	help
-	  This driver supports MT9M001 cameras from Micron, monochrome
-	  and colour models.
-
-config SOC_CAMERA_MT9M111
-	tristate "mt9m111, mt9m112 and mt9m131 support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This driver supports MT9M111, MT9M112 and MT9M131 cameras from
-	  Micron/Aptina
-
-config SOC_CAMERA_MT9T031
-	tristate "mt9t031 support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This driver supports MT9T031 cameras from Micron.
-
-config SOC_CAMERA_MT9T112
-	tristate "mt9t112 support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This driver supports MT9T112 cameras from Aptina.
-
-config SOC_CAMERA_MT9V022
-	tristate "mt9v022 support"
-	depends on SOC_CAMERA && I2C
-	select GPIO_PCA953X if MT9V022_PCA9536_SWITCH
-	help
-	  This driver supports MT9V022 cameras from Micron
-
-config SOC_CAMERA_RJ54N1
-	tristate "rj54n1cb0c support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This is a rj54n1cb0c video driver
-
-config SOC_CAMERA_TW9910
-	tristate "tw9910 support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This is a tw9910 video driver
 
 config SOC_CAMERA_PLATFORM
 	tristate "platform camera support"
@@ -185,42 +134,6 @@ config SOC_CAMERA_PLATFORM
 	help
 	  This is a generic SoC camera platform driver, useful for testing
 
-config SOC_CAMERA_OV2640
-	tristate "ov2640 camera support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This is a ov2640 camera driver
-
-config SOC_CAMERA_OV5642
-	tristate "ov5642 camera support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This is a V4L2 camera driver for the OmniVision OV5642 sensor
-
-config SOC_CAMERA_OV6650
-	tristate "ov6650 sensor support"
-	depends on SOC_CAMERA && I2C
-	---help---
-	  This is a V4L2 SoC camera driver for the OmniVision OV6650 sensor
-
-config SOC_CAMERA_OV772X
-	tristate "ov772x camera support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This is a ov772x camera driver
-
-config SOC_CAMERA_OV9640
-	tristate "ov9640 camera support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This is a ov9640 camera driver
-
-config SOC_CAMERA_OV9740
-	tristate "ov9740 camera support"
-	depends on SOC_CAMERA && I2C
-	help
-	  This is a ov9740 camera driver
-
 config MX1_VIDEO
 	bool
 
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 52a04fa..b3effdc 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -6,21 +6,6 @@ omap2cam-objs	:=	omap24xxcam.o omap24xxcam-dma.o
 
 obj-$(CONFIG_VIDEO_VINO) += indycam.o
 
-obj-$(CONFIG_SOC_CAMERA_IMX074)		+= imx074.o
-obj-$(CONFIG_SOC_CAMERA_MT9M001)	+= mt9m001.o
-obj-$(CONFIG_SOC_CAMERA_MT9M111)	+= mt9m111.o
-obj-$(CONFIG_SOC_CAMERA_MT9T031)	+= mt9t031.o
-obj-$(CONFIG_SOC_CAMERA_MT9T112)	+= mt9t112.o
-obj-$(CONFIG_SOC_CAMERA_MT9V022)	+= mt9v022.o
-obj-$(CONFIG_SOC_CAMERA_OV2640)		+= ov2640.o
-obj-$(CONFIG_SOC_CAMERA_OV5642)		+= ov5642.o
-obj-$(CONFIG_SOC_CAMERA_OV6650)		+= ov6650.o
-obj-$(CONFIG_SOC_CAMERA_OV772X)		+= ov772x.o
-obj-$(CONFIG_SOC_CAMERA_OV9640)		+= ov9640.o
-obj-$(CONFIG_SOC_CAMERA_OV9740)		+= ov9740.o
-obj-$(CONFIG_SOC_CAMERA_RJ54N1)		+= rj54n1cb0c.o
-obj-$(CONFIG_SOC_CAMERA_TW9910)		+= tw9910.o
-
 obj-$(CONFIG_VIDEO_VINO) += vino.o
 obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
 
@@ -78,3 +63,4 @@ obj-$(CONFIG_ARCH_OMAP)	+= omap/
 ccflags-y += -I$(srctree)/drivers/media/dvb-core
 ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
 ccflags-y += -I$(srctree)/drivers/media/tuners
+ccflags-y += -I$(srctree)/drivers/media/i2c/soc_camera
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 12/12] [media] rename drivers/media/video to platform
  2012-08-15 13:48   ` Mauro Carvalho Chehab
                       ` (10 preceding siblings ...)
  2012-08-15 13:48     ` [PATCH 11/12] [media] move soc_camera i2c drivers into its own dir Mauro Carvalho Chehab
@ 2012-08-15 13:48     ` Mauro Carvalho Chehab
  11 siblings, 0 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-08-15 13:48 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

As now most of the drivers there are platform drivers, rename
the directory. It still makes sense to split mem2mem from
it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/Kconfig                                        |  2 +-
 drivers/media/Makefile                                       |  2 +-
 drivers/media/{video => platform}/Kconfig                    | 12 ++++++------
 drivers/media/{video => platform}/Makefile                   |  0
 drivers/media/{video => platform}/arv.c                      |  0
 drivers/media/{video => platform}/atmel-isi.c                |  0
 drivers/media/{video => platform}/blackfin/Kconfig           |  0
 drivers/media/{video => platform}/blackfin/Makefile          |  0
 drivers/media/{video => platform}/blackfin/bfin_capture.c    |  0
 drivers/media/{video => platform}/blackfin/ppi.c             |  0
 drivers/media/{video => platform}/coda.c                     |  0
 drivers/media/{video => platform}/coda.h                     |  2 +-
 drivers/media/{video => platform}/davinci/Kconfig            |  0
 drivers/media/{video => platform}/davinci/Makefile           |  0
 drivers/media/{video => platform}/davinci/ccdc_hw_device.h   |  0
 drivers/media/{video => platform}/davinci/dm355_ccdc.c       |  0
 drivers/media/{video => platform}/davinci/dm355_ccdc_regs.h  |  0
 drivers/media/{video => platform}/davinci/dm644x_ccdc.c      |  0
 drivers/media/{video => platform}/davinci/dm644x_ccdc_regs.h |  0
 drivers/media/{video => platform}/davinci/isif.c             |  0
 drivers/media/{video => platform}/davinci/isif_regs.h        |  0
 drivers/media/{video => platform}/davinci/vpbe.c             |  0
 drivers/media/{video => platform}/davinci/vpbe_display.c     |  0
 drivers/media/{video => platform}/davinci/vpbe_osd.c         |  0
 drivers/media/{video => platform}/davinci/vpbe_osd_regs.h    |  0
 drivers/media/{video => platform}/davinci/vpbe_venc.c        |  0
 drivers/media/{video => platform}/davinci/vpbe_venc_regs.h   |  0
 drivers/media/{video => platform}/davinci/vpfe_capture.c     |  0
 drivers/media/{video => platform}/davinci/vpif.c             |  0
 drivers/media/{video => platform}/davinci/vpif.h             |  0
 drivers/media/{video => platform}/davinci/vpif_capture.c     |  0
 drivers/media/{video => platform}/davinci/vpif_capture.h     |  0
 drivers/media/{video => platform}/davinci/vpif_display.c     |  0
 drivers/media/{video => platform}/davinci/vpif_display.h     |  0
 drivers/media/{video => platform}/davinci/vpss.c             |  0
 drivers/media/{video => platform}/fsl-viu.c                  |  0
 drivers/media/{video => platform}/indycam.c                  |  0
 drivers/media/{video => platform}/indycam.h                  |  0
 drivers/media/{video => platform}/m2m-deinterlace.c          |  0
 drivers/media/{video => platform}/marvell-ccic/Kconfig       |  0
 drivers/media/{video => platform}/marvell-ccic/Makefile      |  0
 drivers/media/{video => platform}/marvell-ccic/cafe-driver.c |  0
 drivers/media/{video => platform}/marvell-ccic/mcam-core.c   |  0
 drivers/media/{video => platform}/marvell-ccic/mcam-core.h   |  0
 drivers/media/{video => platform}/marvell-ccic/mmp-driver.c  |  0
 drivers/media/{video => platform}/mem2mem_testdev.c          |  0
 drivers/media/{video => platform}/mx1_camera.c               |  0
 drivers/media/{video => platform}/mx2_camera.c               |  0
 drivers/media/{video => platform}/mx2_emmaprp.c              |  0
 drivers/media/{video => platform}/mx3_camera.c               |  0
 drivers/media/{video => platform}/omap/Kconfig               |  0
 drivers/media/{video => platform}/omap/Makefile              |  0
 drivers/media/{video => platform}/omap/omap_vout.c           |  0
 drivers/media/{video => platform}/omap/omap_vout_vrfb.c      |  0
 drivers/media/{video => platform}/omap/omap_vout_vrfb.h      |  0
 drivers/media/{video => platform}/omap/omap_voutdef.h        |  0
 drivers/media/{video => platform}/omap/omap_voutlib.c        |  0
 drivers/media/{video => platform}/omap/omap_voutlib.h        |  0
 drivers/media/{video => platform}/omap1_camera.c             |  2 +-
 drivers/media/{video => platform}/omap24xxcam-dma.c          |  2 +-
 drivers/media/{video => platform}/omap24xxcam.c              |  2 +-
 drivers/media/{video => platform}/omap24xxcam.h              |  2 +-
 drivers/media/{video => platform}/omap3isp/Makefile          |  0
 drivers/media/{video => platform}/omap3isp/cfa_coef_table.h  |  0
 drivers/media/{video => platform}/omap3isp/gamma_table.h     |  0
 drivers/media/{video => platform}/omap3isp/isp.c             |  0
 drivers/media/{video => platform}/omap3isp/isp.h             |  0
 drivers/media/{video => platform}/omap3isp/ispccdc.c         |  0
 drivers/media/{video => platform}/omap3isp/ispccdc.h         |  0
 drivers/media/{video => platform}/omap3isp/ispccp2.c         |  0
 drivers/media/{video => platform}/omap3isp/ispccp2.h         |  0
 drivers/media/{video => platform}/omap3isp/ispcsi2.c         |  0
 drivers/media/{video => platform}/omap3isp/ispcsi2.h         |  0
 drivers/media/{video => platform}/omap3isp/ispcsiphy.c       |  0
 drivers/media/{video => platform}/omap3isp/ispcsiphy.h       |  0
 drivers/media/{video => platform}/omap3isp/isph3a.h          |  0
 drivers/media/{video => platform}/omap3isp/isph3a_aewb.c     |  0
 drivers/media/{video => platform}/omap3isp/isph3a_af.c       |  0
 drivers/media/{video => platform}/omap3isp/isphist.c         |  0
 drivers/media/{video => platform}/omap3isp/isphist.h         |  0
 drivers/media/{video => platform}/omap3isp/isppreview.c      |  0
 drivers/media/{video => platform}/omap3isp/isppreview.h      |  0
 drivers/media/{video => platform}/omap3isp/ispqueue.c        |  0
 drivers/media/{video => platform}/omap3isp/ispqueue.h        |  0
 drivers/media/{video => platform}/omap3isp/ispreg.h          |  0
 drivers/media/{video => platform}/omap3isp/ispresizer.c      |  0
 drivers/media/{video => platform}/omap3isp/ispresizer.h      |  0
 drivers/media/{video => platform}/omap3isp/ispstat.c         |  0
 drivers/media/{video => platform}/omap3isp/ispstat.h         |  0
 drivers/media/{video => platform}/omap3isp/ispvideo.c        |  0
 drivers/media/{video => platform}/omap3isp/ispvideo.h        |  0
 .../media/{video => platform}/omap3isp/luma_enhance_table.h  |  0
 .../media/{video => platform}/omap3isp/noise_filter_table.h  |  0
 drivers/media/{video => platform}/pxa_camera.c               |  0
 drivers/media/{video => platform}/s5p-fimc/Kconfig           |  0
 drivers/media/{video => platform}/s5p-fimc/Makefile          |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-capture.c    |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-core.c       |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-core.h       |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-lite-reg.c   |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-lite-reg.h   |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-lite.c       |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-lite.h       |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-m2m.c        |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-mdevice.c    |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-mdevice.h    |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-reg.c        |  0
 drivers/media/{video => platform}/s5p-fimc/fimc-reg.h        |  0
 drivers/media/{video => platform}/s5p-fimc/mipi-csis.c       |  0
 drivers/media/{video => platform}/s5p-fimc/mipi-csis.h       |  0
 drivers/media/{video => platform}/s5p-g2d/Makefile           |  0
 drivers/media/{video => platform}/s5p-g2d/g2d-hw.c           |  0
 drivers/media/{video => platform}/s5p-g2d/g2d-regs.h         |  0
 drivers/media/{video => platform}/s5p-g2d/g2d.c              |  0
 drivers/media/{video => platform}/s5p-g2d/g2d.h              |  0
 drivers/media/{video => platform}/s5p-jpeg/Makefile          |  0
 drivers/media/{video => platform}/s5p-jpeg/jpeg-core.c       |  2 +-
 drivers/media/{video => platform}/s5p-jpeg/jpeg-core.h       |  2 +-
 drivers/media/{video => platform}/s5p-jpeg/jpeg-hw.h         |  2 +-
 drivers/media/{video => platform}/s5p-jpeg/jpeg-regs.h       |  2 +-
 drivers/media/{video => platform}/s5p-mfc/Makefile           |  0
 drivers/media/{video => platform}/s5p-mfc/regs-mfc.h         |  0
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc.c          |  0
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_cmd.c      |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_cmd.h      |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_common.h   |  0
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_ctrl.c     |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_ctrl.h     |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_debug.h    |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_dec.c      |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_dec.h      |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_enc.c      |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_enc.h      |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_intr.c     |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_intr.h     |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_opr.c      |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_opr.h      |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_pm.c       |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_pm.h       |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_shm.c      |  2 +-
 drivers/media/{video => platform}/s5p-mfc/s5p_mfc_shm.h      |  2 +-
 drivers/media/{video => platform}/s5p-tv/Kconfig             |  2 +-
 drivers/media/{video => platform}/s5p-tv/Makefile            |  2 +-
 drivers/media/{video => platform}/s5p-tv/hdmi_drv.c          |  0
 drivers/media/{video => platform}/s5p-tv/hdmiphy_drv.c       |  0
 drivers/media/{video => platform}/s5p-tv/mixer.h             |  0
 drivers/media/{video => platform}/s5p-tv/mixer_drv.c         |  0
 drivers/media/{video => platform}/s5p-tv/mixer_grp_layer.c   |  0
 drivers/media/{video => platform}/s5p-tv/mixer_reg.c         |  0
 drivers/media/{video => platform}/s5p-tv/mixer_video.c       |  0
 drivers/media/{video => platform}/s5p-tv/mixer_vp_layer.c    |  0
 drivers/media/{video => platform}/s5p-tv/regs-hdmi.h         |  0
 drivers/media/{video => platform}/s5p-tv/regs-mixer.h        |  0
 drivers/media/{video => platform}/s5p-tv/regs-sdo.h          |  2 +-
 drivers/media/{video => platform}/s5p-tv/regs-vp.h           |  0
 drivers/media/{video => platform}/s5p-tv/sdo_drv.c           |  0
 drivers/media/{video => platform}/s5p-tv/sii9234_drv.c       |  0
 drivers/media/{video => platform}/sh_mobile_ceu_camera.c     |  0
 drivers/media/{video => platform}/sh_vou.c                   |  0
 drivers/media/{video => platform}/soc_camera.c               |  0
 drivers/media/{video => platform}/soc_camera_platform.c      |  0
 drivers/media/{video => platform}/soc_mediabus.c             |  0
 drivers/media/{video => platform}/timblogiw.c                |  0
 drivers/media/{video => platform}/via-camera.c               |  0
 drivers/media/{video => platform}/via-camera.h               |  0
 drivers/media/{video => platform}/vino.c                     |  0
 drivers/media/{video => platform}/vino.h                     |  0
 drivers/media/{video => platform}/vivi.c                     |  0
 168 files changed, 37 insertions(+), 37 deletions(-)
 rename drivers/media/{video => platform}/Kconfig (96%)
 rename drivers/media/{video => platform}/Makefile (100%)
 rename drivers/media/{video => platform}/arv.c (100%)
 rename drivers/media/{video => platform}/atmel-isi.c (100%)
 rename drivers/media/{video => platform}/blackfin/Kconfig (100%)
 rename drivers/media/{video => platform}/blackfin/Makefile (100%)
 rename drivers/media/{video => platform}/blackfin/bfin_capture.c (100%)
 rename drivers/media/{video => platform}/blackfin/ppi.c (100%)
 rename drivers/media/{video => platform}/coda.c (100%)
 rename drivers/media/{video => platform}/coda.h (99%)
 rename drivers/media/{video => platform}/davinci/Kconfig (100%)
 rename drivers/media/{video => platform}/davinci/Makefile (100%)
 rename drivers/media/{video => platform}/davinci/ccdc_hw_device.h (100%)
 rename drivers/media/{video => platform}/davinci/dm355_ccdc.c (100%)
 rename drivers/media/{video => platform}/davinci/dm355_ccdc_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/dm644x_ccdc.c (100%)
 rename drivers/media/{video => platform}/davinci/dm644x_ccdc_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/isif.c (100%)
 rename drivers/media/{video => platform}/davinci/isif_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/vpbe.c (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_display.c (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_osd.c (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_osd_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_venc.c (100%)
 rename drivers/media/{video => platform}/davinci/vpbe_venc_regs.h (100%)
 rename drivers/media/{video => platform}/davinci/vpfe_capture.c (100%)
 rename drivers/media/{video => platform}/davinci/vpif.c (100%)
 rename drivers/media/{video => platform}/davinci/vpif.h (100%)
 rename drivers/media/{video => platform}/davinci/vpif_capture.c (100%)
 rename drivers/media/{video => platform}/davinci/vpif_capture.h (100%)
 rename drivers/media/{video => platform}/davinci/vpif_display.c (100%)
 rename drivers/media/{video => platform}/davinci/vpif_display.h (100%)
 rename drivers/media/{video => platform}/davinci/vpss.c (100%)
 rename drivers/media/{video => platform}/fsl-viu.c (100%)
 rename drivers/media/{video => platform}/indycam.c (100%)
 rename drivers/media/{video => platform}/indycam.h (100%)
 rename drivers/media/{video => platform}/m2m-deinterlace.c (100%)
 rename drivers/media/{video => platform}/marvell-ccic/Kconfig (100%)
 rename drivers/media/{video => platform}/marvell-ccic/Makefile (100%)
 rename drivers/media/{video => platform}/marvell-ccic/cafe-driver.c (100%)
 rename drivers/media/{video => platform}/marvell-ccic/mcam-core.c (100%)
 rename drivers/media/{video => platform}/marvell-ccic/mcam-core.h (100%)
 rename drivers/media/{video => platform}/marvell-ccic/mmp-driver.c (100%)
 rename drivers/media/{video => platform}/mem2mem_testdev.c (100%)
 rename drivers/media/{video => platform}/mx1_camera.c (100%)
 rename drivers/media/{video => platform}/mx2_camera.c (100%)
 rename drivers/media/{video => platform}/mx2_emmaprp.c (100%)
 rename drivers/media/{video => platform}/mx3_camera.c (100%)
 rename drivers/media/{video => platform}/omap/Kconfig (100%)
 rename drivers/media/{video => platform}/omap/Makefile (100%)
 rename drivers/media/{video => platform}/omap/omap_vout.c (100%)
 rename drivers/media/{video => platform}/omap/omap_vout_vrfb.c (100%)
 rename drivers/media/{video => platform}/omap/omap_vout_vrfb.h (100%)
 rename drivers/media/{video => platform}/omap/omap_voutdef.h (100%)
 rename drivers/media/{video => platform}/omap/omap_voutlib.c (100%)
 rename drivers/media/{video => platform}/omap/omap_voutlib.h (100%)
 rename drivers/media/{video => platform}/omap1_camera.c (99%)
 rename drivers/media/{video => platform}/omap24xxcam-dma.c (99%)
 rename drivers/media/{video => platform}/omap24xxcam.c (99%)
 rename drivers/media/{video => platform}/omap24xxcam.h (99%)
 rename drivers/media/{video => platform}/omap3isp/Makefile (100%)
 rename drivers/media/{video => platform}/omap3isp/cfa_coef_table.h (100%)
 rename drivers/media/{video => platform}/omap3isp/gamma_table.h (100%)
 rename drivers/media/{video => platform}/omap3isp/isp.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isp.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispccdc.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispccdc.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispccp2.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispccp2.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispcsi2.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispcsi2.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispcsiphy.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispcsiphy.h (100%)
 rename drivers/media/{video => platform}/omap3isp/isph3a.h (100%)
 rename drivers/media/{video => platform}/omap3isp/isph3a_aewb.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isph3a_af.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isphist.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isphist.h (100%)
 rename drivers/media/{video => platform}/omap3isp/isppreview.c (100%)
 rename drivers/media/{video => platform}/omap3isp/isppreview.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispqueue.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispqueue.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispreg.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispresizer.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispresizer.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispstat.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispstat.h (100%)
 rename drivers/media/{video => platform}/omap3isp/ispvideo.c (100%)
 rename drivers/media/{video => platform}/omap3isp/ispvideo.h (100%)
 rename drivers/media/{video => platform}/omap3isp/luma_enhance_table.h (100%)
 rename drivers/media/{video => platform}/omap3isp/noise_filter_table.h (100%)
 rename drivers/media/{video => platform}/pxa_camera.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/Kconfig (100%)
 rename drivers/media/{video => platform}/s5p-fimc/Makefile (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-capture.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-core.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-core.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-lite-reg.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-lite-reg.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-lite.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-lite.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-m2m.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-mdevice.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-mdevice.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-reg.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/fimc-reg.h (100%)
 rename drivers/media/{video => platform}/s5p-fimc/mipi-csis.c (100%)
 rename drivers/media/{video => platform}/s5p-fimc/mipi-csis.h (100%)
 rename drivers/media/{video => platform}/s5p-g2d/Makefile (100%)
 rename drivers/media/{video => platform}/s5p-g2d/g2d-hw.c (100%)
 rename drivers/media/{video => platform}/s5p-g2d/g2d-regs.h (100%)
 rename drivers/media/{video => platform}/s5p-g2d/g2d.c (100%)
 rename drivers/media/{video => platform}/s5p-g2d/g2d.h (100%)
 rename drivers/media/{video => platform}/s5p-jpeg/Makefile (100%)
 rename drivers/media/{video => platform}/s5p-jpeg/jpeg-core.c (99%)
 rename drivers/media/{video => platform}/s5p-jpeg/jpeg-core.h (98%)
 rename drivers/media/{video => platform}/s5p-jpeg/jpeg-hw.h (99%)
 rename drivers/media/{video => platform}/s5p-jpeg/jpeg-regs.h (98%)
 rename drivers/media/{video => platform}/s5p-mfc/Makefile (100%)
 rename drivers/media/{video => platform}/s5p-mfc/regs-mfc.h (100%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc.c (100%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_cmd.c (98%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_cmd.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_common.h (100%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_ctrl.c (99%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_ctrl.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_debug.h (95%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_dec.c (99%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_dec.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_enc.c (99%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_enc.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_intr.c (97%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_intr.h (93%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_opr.c (99%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_opr.h (98%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_pm.c (98%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_pm.h (92%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_shm.c (96%)
 rename drivers/media/{video => platform}/s5p-mfc/s5p_mfc_shm.h (98%)
 rename drivers/media/{video => platform}/s5p-tv/Kconfig (98%)
 rename drivers/media/{video => platform}/s5p-tv/Makefile (92%)
 rename drivers/media/{video => platform}/s5p-tv/hdmi_drv.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/hdmiphy_drv.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer.h (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_drv.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_grp_layer.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_reg.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_video.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/mixer_vp_layer.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/regs-hdmi.h (100%)
 rename drivers/media/{video => platform}/s5p-tv/regs-mixer.h (100%)
 rename drivers/media/{video => platform}/s5p-tv/regs-sdo.h (97%)
 rename drivers/media/{video => platform}/s5p-tv/regs-vp.h (100%)
 rename drivers/media/{video => platform}/s5p-tv/sdo_drv.c (100%)
 rename drivers/media/{video => platform}/s5p-tv/sii9234_drv.c (100%)
 rename drivers/media/{video => platform}/sh_mobile_ceu_camera.c (100%)
 rename drivers/media/{video => platform}/sh_vou.c (100%)
 rename drivers/media/{video => platform}/soc_camera.c (100%)
 rename drivers/media/{video => platform}/soc_camera_platform.c (100%)
 rename drivers/media/{video => platform}/soc_mediabus.c (100%)
 rename drivers/media/{video => platform}/timblogiw.c (100%)
 rename drivers/media/{video => platform}/via-camera.c (100%)
 rename drivers/media/{video => platform}/via-camera.h (100%)
 rename drivers/media/{video => platform}/vino.c (100%)
 rename drivers/media/{video => platform}/vino.h (100%)
 rename drivers/media/{video => platform}/vivi.c (100%)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 26f3de5..dcaaf8e 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -156,7 +156,7 @@ source "drivers/media/i2c/Kconfig"
 #
 # V4L platform/mem2mem drivers
 #
-source "drivers/media/video/Kconfig"
+source "drivers/media/platform/Kconfig"
 
 source "drivers/media/radio/Kconfig"
 
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index e1be196..b0b0193 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -8,7 +8,7 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
   obj-$(CONFIG_MEDIA_SUPPORT) += media.o
 endif
 
-obj-y += tuners/ common/ rc/ video/
+obj-y += tuners/ common/ rc/ platform/
 obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
 
 obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
diff --git a/drivers/media/video/Kconfig b/drivers/media/platform/Kconfig
similarity index 96%
rename from drivers/media/video/Kconfig
rename to drivers/media/platform/Kconfig
index 28b25bf..e1959a8 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -27,7 +27,7 @@ menuconfig V4L_PLATFORM_DRIVERS
 
 if V4L_PLATFORM_DRIVERS
 
-source "drivers/media/video/marvell-ccic/Kconfig"
+source "drivers/media/platform/marvell-ccic/Kconfig"
 
 config VIDEO_VIA_CAMERA
 	tristate "VIAFB camera controller support"
@@ -43,11 +43,11 @@ config VIDEO_VIA_CAMERA
 # Platform multimedia device configuration
 #
 
-source "drivers/media/video/davinci/Kconfig"
+source "drivers/media/platform/davinci/Kconfig"
 
-source "drivers/media/video/omap/Kconfig"
+source "drivers/media/platform/omap/Kconfig"
 
-source "drivers/media/video/blackfin/Kconfig"
+source "drivers/media/platform/blackfin/Kconfig"
 
 config VIDEO_SH_VOU
 	tristate "SuperH VOU video output driver"
@@ -212,8 +212,8 @@ config VIDEO_ATMEL_ISI
 	  This module makes the ATMEL Image Sensor Interface available
 	  as a v4l2 device.
 
-source "drivers/media/video/s5p-fimc/Kconfig"
-source "drivers/media/video/s5p-tv/Kconfig"
+source "drivers/media/platform/s5p-fimc/Kconfig"
+source "drivers/media/platform/s5p-tv/Kconfig"
 
 endif # V4L_PLATFORM_DRIVERS
 
diff --git a/drivers/media/video/Makefile b/drivers/media/platform/Makefile
similarity index 100%
rename from drivers/media/video/Makefile
rename to drivers/media/platform/Makefile
diff --git a/drivers/media/video/arv.c b/drivers/media/platform/arv.c
similarity index 100%
rename from drivers/media/video/arv.c
rename to drivers/media/platform/arv.c
diff --git a/drivers/media/video/atmel-isi.c b/drivers/media/platform/atmel-isi.c
similarity index 100%
rename from drivers/media/video/atmel-isi.c
rename to drivers/media/platform/atmel-isi.c
diff --git a/drivers/media/video/blackfin/Kconfig b/drivers/media/platform/blackfin/Kconfig
similarity index 100%
rename from drivers/media/video/blackfin/Kconfig
rename to drivers/media/platform/blackfin/Kconfig
diff --git a/drivers/media/video/blackfin/Makefile b/drivers/media/platform/blackfin/Makefile
similarity index 100%
rename from drivers/media/video/blackfin/Makefile
rename to drivers/media/platform/blackfin/Makefile
diff --git a/drivers/media/video/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
similarity index 100%
rename from drivers/media/video/blackfin/bfin_capture.c
rename to drivers/media/platform/blackfin/bfin_capture.c
diff --git a/drivers/media/video/blackfin/ppi.c b/drivers/media/platform/blackfin/ppi.c
similarity index 100%
rename from drivers/media/video/blackfin/ppi.c
rename to drivers/media/platform/blackfin/ppi.c
diff --git a/drivers/media/video/coda.c b/drivers/media/platform/coda.c
similarity index 100%
rename from drivers/media/video/coda.c
rename to drivers/media/platform/coda.c
diff --git a/drivers/media/video/coda.h b/drivers/media/platform/coda.h
similarity index 99%
rename from drivers/media/video/coda.h
rename to drivers/media/platform/coda.h
index 4cf4a04..3fbb315 100644
--- a/drivers/media/video/coda.h
+++ b/drivers/media/platform/coda.h
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/coda/coda_regs.h
+ * linux/drivers/media/platform/coda/coda_regs.h
  *
  * Copyright (C) 2012 Vista Silicon SL
  *    Javier Martin <javier.martin@vista-silicon.com>
diff --git a/drivers/media/video/davinci/Kconfig b/drivers/media/platform/davinci/Kconfig
similarity index 100%
rename from drivers/media/video/davinci/Kconfig
rename to drivers/media/platform/davinci/Kconfig
diff --git a/drivers/media/video/davinci/Makefile b/drivers/media/platform/davinci/Makefile
similarity index 100%
rename from drivers/media/video/davinci/Makefile
rename to drivers/media/platform/davinci/Makefile
diff --git a/drivers/media/video/davinci/ccdc_hw_device.h b/drivers/media/platform/davinci/ccdc_hw_device.h
similarity index 100%
rename from drivers/media/video/davinci/ccdc_hw_device.h
rename to drivers/media/platform/davinci/ccdc_hw_device.h
diff --git a/drivers/media/video/davinci/dm355_ccdc.c b/drivers/media/platform/davinci/dm355_ccdc.c
similarity index 100%
rename from drivers/media/video/davinci/dm355_ccdc.c
rename to drivers/media/platform/davinci/dm355_ccdc.c
diff --git a/drivers/media/video/davinci/dm355_ccdc_regs.h b/drivers/media/platform/davinci/dm355_ccdc_regs.h
similarity index 100%
rename from drivers/media/video/davinci/dm355_ccdc_regs.h
rename to drivers/media/platform/davinci/dm355_ccdc_regs.h
diff --git a/drivers/media/video/davinci/dm644x_ccdc.c b/drivers/media/platform/davinci/dm644x_ccdc.c
similarity index 100%
rename from drivers/media/video/davinci/dm644x_ccdc.c
rename to drivers/media/platform/davinci/dm644x_ccdc.c
diff --git a/drivers/media/video/davinci/dm644x_ccdc_regs.h b/drivers/media/platform/davinci/dm644x_ccdc_regs.h
similarity index 100%
rename from drivers/media/video/davinci/dm644x_ccdc_regs.h
rename to drivers/media/platform/davinci/dm644x_ccdc_regs.h
diff --git a/drivers/media/video/davinci/isif.c b/drivers/media/platform/davinci/isif.c
similarity index 100%
rename from drivers/media/video/davinci/isif.c
rename to drivers/media/platform/davinci/isif.c
diff --git a/drivers/media/video/davinci/isif_regs.h b/drivers/media/platform/davinci/isif_regs.h
similarity index 100%
rename from drivers/media/video/davinci/isif_regs.h
rename to drivers/media/platform/davinci/isif_regs.h
diff --git a/drivers/media/video/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
similarity index 100%
rename from drivers/media/video/davinci/vpbe.c
rename to drivers/media/platform/davinci/vpbe.c
diff --git a/drivers/media/video/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
similarity index 100%
rename from drivers/media/video/davinci/vpbe_display.c
rename to drivers/media/platform/davinci/vpbe_display.c
diff --git a/drivers/media/video/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c
similarity index 100%
rename from drivers/media/video/davinci/vpbe_osd.c
rename to drivers/media/platform/davinci/vpbe_osd.c
diff --git a/drivers/media/video/davinci/vpbe_osd_regs.h b/drivers/media/platform/davinci/vpbe_osd_regs.h
similarity index 100%
rename from drivers/media/video/davinci/vpbe_osd_regs.h
rename to drivers/media/platform/davinci/vpbe_osd_regs.h
diff --git a/drivers/media/video/davinci/vpbe_venc.c b/drivers/media/platform/davinci/vpbe_venc.c
similarity index 100%
rename from drivers/media/video/davinci/vpbe_venc.c
rename to drivers/media/platform/davinci/vpbe_venc.c
diff --git a/drivers/media/video/davinci/vpbe_venc_regs.h b/drivers/media/platform/davinci/vpbe_venc_regs.h
similarity index 100%
rename from drivers/media/video/davinci/vpbe_venc_regs.h
rename to drivers/media/platform/davinci/vpbe_venc_regs.h
diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
similarity index 100%
rename from drivers/media/video/davinci/vpfe_capture.c
rename to drivers/media/platform/davinci/vpfe_capture.c
diff --git a/drivers/media/video/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
similarity index 100%
rename from drivers/media/video/davinci/vpif.c
rename to drivers/media/platform/davinci/vpif.c
diff --git a/drivers/media/video/davinci/vpif.h b/drivers/media/platform/davinci/vpif.h
similarity index 100%
rename from drivers/media/video/davinci/vpif.h
rename to drivers/media/platform/davinci/vpif.h
diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
similarity index 100%
rename from drivers/media/video/davinci/vpif_capture.c
rename to drivers/media/platform/davinci/vpif_capture.c
diff --git a/drivers/media/video/davinci/vpif_capture.h b/drivers/media/platform/davinci/vpif_capture.h
similarity index 100%
rename from drivers/media/video/davinci/vpif_capture.h
rename to drivers/media/platform/davinci/vpif_capture.h
diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
similarity index 100%
rename from drivers/media/video/davinci/vpif_display.c
rename to drivers/media/platform/davinci/vpif_display.c
diff --git a/drivers/media/video/davinci/vpif_display.h b/drivers/media/platform/davinci/vpif_display.h
similarity index 100%
rename from drivers/media/video/davinci/vpif_display.h
rename to drivers/media/platform/davinci/vpif_display.h
diff --git a/drivers/media/video/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c
similarity index 100%
rename from drivers/media/video/davinci/vpss.c
rename to drivers/media/platform/davinci/vpss.c
diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/platform/fsl-viu.c
similarity index 100%
rename from drivers/media/video/fsl-viu.c
rename to drivers/media/platform/fsl-viu.c
diff --git a/drivers/media/video/indycam.c b/drivers/media/platform/indycam.c
similarity index 100%
rename from drivers/media/video/indycam.c
rename to drivers/media/platform/indycam.c
diff --git a/drivers/media/video/indycam.h b/drivers/media/platform/indycam.h
similarity index 100%
rename from drivers/media/video/indycam.h
rename to drivers/media/platform/indycam.h
diff --git a/drivers/media/video/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
similarity index 100%
rename from drivers/media/video/m2m-deinterlace.c
rename to drivers/media/platform/m2m-deinterlace.c
diff --git a/drivers/media/video/marvell-ccic/Kconfig b/drivers/media/platform/marvell-ccic/Kconfig
similarity index 100%
rename from drivers/media/video/marvell-ccic/Kconfig
rename to drivers/media/platform/marvell-ccic/Kconfig
diff --git a/drivers/media/video/marvell-ccic/Makefile b/drivers/media/platform/marvell-ccic/Makefile
similarity index 100%
rename from drivers/media/video/marvell-ccic/Makefile
rename to drivers/media/platform/marvell-ccic/Makefile
diff --git a/drivers/media/video/marvell-ccic/cafe-driver.c b/drivers/media/platform/marvell-ccic/cafe-driver.c
similarity index 100%
rename from drivers/media/video/marvell-ccic/cafe-driver.c
rename to drivers/media/platform/marvell-ccic/cafe-driver.c
diff --git a/drivers/media/video/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
similarity index 100%
rename from drivers/media/video/marvell-ccic/mcam-core.c
rename to drivers/media/platform/marvell-ccic/mcam-core.c
diff --git a/drivers/media/video/marvell-ccic/mcam-core.h b/drivers/media/platform/marvell-ccic/mcam-core.h
similarity index 100%
rename from drivers/media/video/marvell-ccic/mcam-core.h
rename to drivers/media/platform/marvell-ccic/mcam-core.h
diff --git a/drivers/media/video/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
similarity index 100%
rename from drivers/media/video/marvell-ccic/mmp-driver.c
rename to drivers/media/platform/marvell-ccic/mmp-driver.c
diff --git a/drivers/media/video/mem2mem_testdev.c b/drivers/media/platform/mem2mem_testdev.c
similarity index 100%
rename from drivers/media/video/mem2mem_testdev.c
rename to drivers/media/platform/mem2mem_testdev.c
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/platform/mx1_camera.c
similarity index 100%
rename from drivers/media/video/mx1_camera.c
rename to drivers/media/platform/mx1_camera.c
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/platform/mx2_camera.c
similarity index 100%
rename from drivers/media/video/mx2_camera.c
rename to drivers/media/platform/mx2_camera.c
diff --git a/drivers/media/video/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c
similarity index 100%
rename from drivers/media/video/mx2_emmaprp.c
rename to drivers/media/platform/mx2_emmaprp.c
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/platform/mx3_camera.c
similarity index 100%
rename from drivers/media/video/mx3_camera.c
rename to drivers/media/platform/mx3_camera.c
diff --git a/drivers/media/video/omap/Kconfig b/drivers/media/platform/omap/Kconfig
similarity index 100%
rename from drivers/media/video/omap/Kconfig
rename to drivers/media/platform/omap/Kconfig
diff --git a/drivers/media/video/omap/Makefile b/drivers/media/platform/omap/Makefile
similarity index 100%
rename from drivers/media/video/omap/Makefile
rename to drivers/media/platform/omap/Makefile
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
similarity index 100%
rename from drivers/media/video/omap/omap_vout.c
rename to drivers/media/platform/omap/omap_vout.c
diff --git a/drivers/media/video/omap/omap_vout_vrfb.c b/drivers/media/platform/omap/omap_vout_vrfb.c
similarity index 100%
rename from drivers/media/video/omap/omap_vout_vrfb.c
rename to drivers/media/platform/omap/omap_vout_vrfb.c
diff --git a/drivers/media/video/omap/omap_vout_vrfb.h b/drivers/media/platform/omap/omap_vout_vrfb.h
similarity index 100%
rename from drivers/media/video/omap/omap_vout_vrfb.h
rename to drivers/media/platform/omap/omap_vout_vrfb.h
diff --git a/drivers/media/video/omap/omap_voutdef.h b/drivers/media/platform/omap/omap_voutdef.h
similarity index 100%
rename from drivers/media/video/omap/omap_voutdef.h
rename to drivers/media/platform/omap/omap_voutdef.h
diff --git a/drivers/media/video/omap/omap_voutlib.c b/drivers/media/platform/omap/omap_voutlib.c
similarity index 100%
rename from drivers/media/video/omap/omap_voutlib.c
rename to drivers/media/platform/omap/omap_voutlib.c
diff --git a/drivers/media/video/omap/omap_voutlib.h b/drivers/media/platform/omap/omap_voutlib.h
similarity index 100%
rename from drivers/media/video/omap/omap_voutlib.h
rename to drivers/media/platform/omap/omap_voutlib.h
diff --git a/drivers/media/video/omap1_camera.c b/drivers/media/platform/omap1_camera.c
similarity index 99%
rename from drivers/media/video/omap1_camera.c
rename to drivers/media/platform/omap1_camera.c
index c7e4114..fa08c76 100644
--- a/drivers/media/video/omap1_camera.c
+++ b/drivers/media/platform/omap1_camera.c
@@ -12,7 +12,7 @@
  * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
  *
  * Hardware specific bits initialy based on former work by Matt Callow
- * drivers/media/video/omap/omap1510cam.c
+ * drivers/media/platform/omap/omap1510cam.c
  * Copyright (C) 2006 Matt Callow
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/drivers/media/video/omap24xxcam-dma.c b/drivers/media/platform/omap24xxcam-dma.c
similarity index 99%
rename from drivers/media/video/omap24xxcam-dma.c
rename to drivers/media/platform/omap24xxcam-dma.c
index b5ae170..9c00776 100644
--- a/drivers/media/video/omap24xxcam-dma.c
+++ b/drivers/media/platform/omap24xxcam-dma.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/omap24xxcam-dma.c
+ * drivers/media/platform/omap24xxcam-dma.c
  *
  * Copyright (C) 2004 MontaVista Software, Inc.
  * Copyright (C) 2004 Texas Instruments.
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/platform/omap24xxcam.c
similarity index 99%
rename from drivers/media/video/omap24xxcam.c
rename to drivers/media/platform/omap24xxcam.c
index e5015b0..fde2e66 100644
--- a/drivers/media/video/omap24xxcam.c
+++ b/drivers/media/platform/omap24xxcam.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/omap24xxcam.c
+ * drivers/media/platform/omap24xxcam.c
  *
  * OMAP 2 camera block driver.
  *
diff --git a/drivers/media/video/omap24xxcam.h b/drivers/media/platform/omap24xxcam.h
similarity index 99%
rename from drivers/media/video/omap24xxcam.h
rename to drivers/media/platform/omap24xxcam.h
index d59727a..c439595 100644
--- a/drivers/media/video/omap24xxcam.h
+++ b/drivers/media/platform/omap24xxcam.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/omap24xxcam.h
+ * drivers/media/platform/omap24xxcam.h
  *
  * Copyright (C) 2004 MontaVista Software, Inc.
  * Copyright (C) 2004 Texas Instruments.
diff --git a/drivers/media/video/omap3isp/Makefile b/drivers/media/platform/omap3isp/Makefile
similarity index 100%
rename from drivers/media/video/omap3isp/Makefile
rename to drivers/media/platform/omap3isp/Makefile
diff --git a/drivers/media/video/omap3isp/cfa_coef_table.h b/drivers/media/platform/omap3isp/cfa_coef_table.h
similarity index 100%
rename from drivers/media/video/omap3isp/cfa_coef_table.h
rename to drivers/media/platform/omap3isp/cfa_coef_table.h
diff --git a/drivers/media/video/omap3isp/gamma_table.h b/drivers/media/platform/omap3isp/gamma_table.h
similarity index 100%
rename from drivers/media/video/omap3isp/gamma_table.h
rename to drivers/media/platform/omap3isp/gamma_table.h
diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
similarity index 100%
rename from drivers/media/video/omap3isp/isp.c
rename to drivers/media/platform/omap3isp/isp.c
diff --git a/drivers/media/video/omap3isp/isp.h b/drivers/media/platform/omap3isp/isp.h
similarity index 100%
rename from drivers/media/video/omap3isp/isp.h
rename to drivers/media/platform/omap3isp/isp.h
diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c
similarity index 100%
rename from drivers/media/video/omap3isp/ispccdc.c
rename to drivers/media/platform/omap3isp/ispccdc.c
diff --git a/drivers/media/video/omap3isp/ispccdc.h b/drivers/media/platform/omap3isp/ispccdc.h
similarity index 100%
rename from drivers/media/video/omap3isp/ispccdc.h
rename to drivers/media/platform/omap3isp/ispccdc.h
diff --git a/drivers/media/video/omap3isp/ispccp2.c b/drivers/media/platform/omap3isp/ispccp2.c
similarity index 100%
rename from drivers/media/video/omap3isp/ispccp2.c
rename to drivers/media/platform/omap3isp/ispccp2.c
diff --git a/drivers/media/video/omap3isp/ispccp2.h b/drivers/media/platform/omap3isp/ispccp2.h
similarity index 100%
rename from drivers/media/video/omap3isp/ispccp2.h
rename to drivers/media/platform/omap3isp/ispccp2.h
diff --git a/drivers/media/video/omap3isp/ispcsi2.c b/drivers/media/platform/omap3isp/ispcsi2.c
similarity index 100%
rename from drivers/media/video/omap3isp/ispcsi2.c
rename to drivers/media/platform/omap3isp/ispcsi2.c
diff --git a/drivers/media/video/omap3isp/ispcsi2.h b/drivers/media/platform/omap3isp/ispcsi2.h
similarity index 100%
rename from drivers/media/video/omap3isp/ispcsi2.h
rename to drivers/media/platform/omap3isp/ispcsi2.h
diff --git a/drivers/media/video/omap3isp/ispcsiphy.c b/drivers/media/platform/omap3isp/ispcsiphy.c
similarity index 100%
rename from drivers/media/video/omap3isp/ispcsiphy.c
rename to drivers/media/platform/omap3isp/ispcsiphy.c
diff --git a/drivers/media/video/omap3isp/ispcsiphy.h b/drivers/media/platform/omap3isp/ispcsiphy.h
similarity index 100%
rename from drivers/media/video/omap3isp/ispcsiphy.h
rename to drivers/media/platform/omap3isp/ispcsiphy.h
diff --git a/drivers/media/video/omap3isp/isph3a.h b/drivers/media/platform/omap3isp/isph3a.h
similarity index 100%
rename from drivers/media/video/omap3isp/isph3a.h
rename to drivers/media/platform/omap3isp/isph3a.h
diff --git a/drivers/media/video/omap3isp/isph3a_aewb.c b/drivers/media/platform/omap3isp/isph3a_aewb.c
similarity index 100%
rename from drivers/media/video/omap3isp/isph3a_aewb.c
rename to drivers/media/platform/omap3isp/isph3a_aewb.c
diff --git a/drivers/media/video/omap3isp/isph3a_af.c b/drivers/media/platform/omap3isp/isph3a_af.c
similarity index 100%
rename from drivers/media/video/omap3isp/isph3a_af.c
rename to drivers/media/platform/omap3isp/isph3a_af.c
diff --git a/drivers/media/video/omap3isp/isphist.c b/drivers/media/platform/omap3isp/isphist.c
similarity index 100%
rename from drivers/media/video/omap3isp/isphist.c
rename to drivers/media/platform/omap3isp/isphist.c
diff --git a/drivers/media/video/omap3isp/isphist.h b/drivers/media/platform/omap3isp/isphist.h
similarity index 100%
rename from drivers/media/video/omap3isp/isphist.h
rename to drivers/media/platform/omap3isp/isphist.h
diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/platform/omap3isp/isppreview.c
similarity index 100%
rename from drivers/media/video/omap3isp/isppreview.c
rename to drivers/media/platform/omap3isp/isppreview.c
diff --git a/drivers/media/video/omap3isp/isppreview.h b/drivers/media/platform/omap3isp/isppreview.h
similarity index 100%
rename from drivers/media/video/omap3isp/isppreview.h
rename to drivers/media/platform/omap3isp/isppreview.h
diff --git a/drivers/media/video/omap3isp/ispqueue.c b/drivers/media/platform/omap3isp/ispqueue.c
similarity index 100%
rename from drivers/media/video/omap3isp/ispqueue.c
rename to drivers/media/platform/omap3isp/ispqueue.c
diff --git a/drivers/media/video/omap3isp/ispqueue.h b/drivers/media/platform/omap3isp/ispqueue.h
similarity index 100%
rename from drivers/media/video/omap3isp/ispqueue.h
rename to drivers/media/platform/omap3isp/ispqueue.h
diff --git a/drivers/media/video/omap3isp/ispreg.h b/drivers/media/platform/omap3isp/ispreg.h
similarity index 100%
rename from drivers/media/video/omap3isp/ispreg.h
rename to drivers/media/platform/omap3isp/ispreg.h
diff --git a/drivers/media/video/omap3isp/ispresizer.c b/drivers/media/platform/omap3isp/ispresizer.c
similarity index 100%
rename from drivers/media/video/omap3isp/ispresizer.c
rename to drivers/media/platform/omap3isp/ispresizer.c
diff --git a/drivers/media/video/omap3isp/ispresizer.h b/drivers/media/platform/omap3isp/ispresizer.h
similarity index 100%
rename from drivers/media/video/omap3isp/ispresizer.h
rename to drivers/media/platform/omap3isp/ispresizer.h
diff --git a/drivers/media/video/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c
similarity index 100%
rename from drivers/media/video/omap3isp/ispstat.c
rename to drivers/media/platform/omap3isp/ispstat.c
diff --git a/drivers/media/video/omap3isp/ispstat.h b/drivers/media/platform/omap3isp/ispstat.h
similarity index 100%
rename from drivers/media/video/omap3isp/ispstat.h
rename to drivers/media/platform/omap3isp/ispstat.h
diff --git a/drivers/media/video/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
similarity index 100%
rename from drivers/media/video/omap3isp/ispvideo.c
rename to drivers/media/platform/omap3isp/ispvideo.c
diff --git a/drivers/media/video/omap3isp/ispvideo.h b/drivers/media/platform/omap3isp/ispvideo.h
similarity index 100%
rename from drivers/media/video/omap3isp/ispvideo.h
rename to drivers/media/platform/omap3isp/ispvideo.h
diff --git a/drivers/media/video/omap3isp/luma_enhance_table.h b/drivers/media/platform/omap3isp/luma_enhance_table.h
similarity index 100%
rename from drivers/media/video/omap3isp/luma_enhance_table.h
rename to drivers/media/platform/omap3isp/luma_enhance_table.h
diff --git a/drivers/media/video/omap3isp/noise_filter_table.h b/drivers/media/platform/omap3isp/noise_filter_table.h
similarity index 100%
rename from drivers/media/video/omap3isp/noise_filter_table.h
rename to drivers/media/platform/omap3isp/noise_filter_table.h
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/platform/pxa_camera.c
similarity index 100%
rename from drivers/media/video/pxa_camera.c
rename to drivers/media/platform/pxa_camera.c
diff --git a/drivers/media/video/s5p-fimc/Kconfig b/drivers/media/platform/s5p-fimc/Kconfig
similarity index 100%
rename from drivers/media/video/s5p-fimc/Kconfig
rename to drivers/media/platform/s5p-fimc/Kconfig
diff --git a/drivers/media/video/s5p-fimc/Makefile b/drivers/media/platform/s5p-fimc/Makefile
similarity index 100%
rename from drivers/media/video/s5p-fimc/Makefile
rename to drivers/media/platform/s5p-fimc/Makefile
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/platform/s5p-fimc/fimc-capture.c
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-capture.c
rename to drivers/media/platform/s5p-fimc/fimc-capture.c
diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/platform/s5p-fimc/fimc-core.c
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-core.c
rename to drivers/media/platform/s5p-fimc/fimc-core.c
diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/platform/s5p-fimc/fimc-core.h
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-core.h
rename to drivers/media/platform/s5p-fimc/fimc-core.h
diff --git a/drivers/media/video/s5p-fimc/fimc-lite-reg.c b/drivers/media/platform/s5p-fimc/fimc-lite-reg.c
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-lite-reg.c
rename to drivers/media/platform/s5p-fimc/fimc-lite-reg.c
diff --git a/drivers/media/video/s5p-fimc/fimc-lite-reg.h b/drivers/media/platform/s5p-fimc/fimc-lite-reg.h
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-lite-reg.h
rename to drivers/media/platform/s5p-fimc/fimc-lite-reg.h
diff --git a/drivers/media/video/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-lite.c
rename to drivers/media/platform/s5p-fimc/fimc-lite.c
diff --git a/drivers/media/video/s5p-fimc/fimc-lite.h b/drivers/media/platform/s5p-fimc/fimc-lite.h
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-lite.h
rename to drivers/media/platform/s5p-fimc/fimc-lite.h
diff --git a/drivers/media/video/s5p-fimc/fimc-m2m.c b/drivers/media/platform/s5p-fimc/fimc-m2m.c
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-m2m.c
rename to drivers/media/platform/s5p-fimc/fimc-m2m.c
diff --git a/drivers/media/video/s5p-fimc/fimc-mdevice.c b/drivers/media/platform/s5p-fimc/fimc-mdevice.c
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-mdevice.c
rename to drivers/media/platform/s5p-fimc/fimc-mdevice.c
diff --git a/drivers/media/video/s5p-fimc/fimc-mdevice.h b/drivers/media/platform/s5p-fimc/fimc-mdevice.h
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-mdevice.h
rename to drivers/media/platform/s5p-fimc/fimc-mdevice.h
diff --git a/drivers/media/video/s5p-fimc/fimc-reg.c b/drivers/media/platform/s5p-fimc/fimc-reg.c
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-reg.c
rename to drivers/media/platform/s5p-fimc/fimc-reg.c
diff --git a/drivers/media/video/s5p-fimc/fimc-reg.h b/drivers/media/platform/s5p-fimc/fimc-reg.h
similarity index 100%
rename from drivers/media/video/s5p-fimc/fimc-reg.h
rename to drivers/media/platform/s5p-fimc/fimc-reg.h
diff --git a/drivers/media/video/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c
similarity index 100%
rename from drivers/media/video/s5p-fimc/mipi-csis.c
rename to drivers/media/platform/s5p-fimc/mipi-csis.c
diff --git a/drivers/media/video/s5p-fimc/mipi-csis.h b/drivers/media/platform/s5p-fimc/mipi-csis.h
similarity index 100%
rename from drivers/media/video/s5p-fimc/mipi-csis.h
rename to drivers/media/platform/s5p-fimc/mipi-csis.h
diff --git a/drivers/media/video/s5p-g2d/Makefile b/drivers/media/platform/s5p-g2d/Makefile
similarity index 100%
rename from drivers/media/video/s5p-g2d/Makefile
rename to drivers/media/platform/s5p-g2d/Makefile
diff --git a/drivers/media/video/s5p-g2d/g2d-hw.c b/drivers/media/platform/s5p-g2d/g2d-hw.c
similarity index 100%
rename from drivers/media/video/s5p-g2d/g2d-hw.c
rename to drivers/media/platform/s5p-g2d/g2d-hw.c
diff --git a/drivers/media/video/s5p-g2d/g2d-regs.h b/drivers/media/platform/s5p-g2d/g2d-regs.h
similarity index 100%
rename from drivers/media/video/s5p-g2d/g2d-regs.h
rename to drivers/media/platform/s5p-g2d/g2d-regs.h
diff --git a/drivers/media/video/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
similarity index 100%
rename from drivers/media/video/s5p-g2d/g2d.c
rename to drivers/media/platform/s5p-g2d/g2d.c
diff --git a/drivers/media/video/s5p-g2d/g2d.h b/drivers/media/platform/s5p-g2d/g2d.h
similarity index 100%
rename from drivers/media/video/s5p-g2d/g2d.h
rename to drivers/media/platform/s5p-g2d/g2d.h
diff --git a/drivers/media/video/s5p-jpeg/Makefile b/drivers/media/platform/s5p-jpeg/Makefile
similarity index 100%
rename from drivers/media/video/s5p-jpeg/Makefile
rename to drivers/media/platform/s5p-jpeg/Makefile
diff --git a/drivers/media/video/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
similarity index 99%
rename from drivers/media/video/s5p-jpeg/jpeg-core.c
rename to drivers/media/platform/s5p-jpeg/jpeg-core.c
index be04d58..72c3e52 100644
--- a/drivers/media/video/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -1,4 +1,4 @@
-/* linux/drivers/media/video/s5p-jpeg/jpeg-core.c
+/* linux/drivers/media/platform/s5p-jpeg/jpeg-core.c
  *
  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com
diff --git a/drivers/media/video/s5p-jpeg/jpeg-core.h b/drivers/media/platform/s5p-jpeg/jpeg-core.h
similarity index 98%
rename from drivers/media/video/s5p-jpeg/jpeg-core.h
rename to drivers/media/platform/s5p-jpeg/jpeg-core.h
index 9d0cd2b..022b9b9 100644
--- a/drivers/media/video/s5p-jpeg/jpeg-core.h
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.h
@@ -1,4 +1,4 @@
-/* linux/drivers/media/video/s5p-jpeg/jpeg-core.h
+/* linux/drivers/media/platform/s5p-jpeg/jpeg-core.h
  *
  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com
diff --git a/drivers/media/video/s5p-jpeg/jpeg-hw.h b/drivers/media/platform/s5p-jpeg/jpeg-hw.h
similarity index 99%
rename from drivers/media/video/s5p-jpeg/jpeg-hw.h
rename to drivers/media/platform/s5p-jpeg/jpeg-hw.h
index f12f0fd..b47e887 100644
--- a/drivers/media/video/s5p-jpeg/jpeg-hw.h
+++ b/drivers/media/platform/s5p-jpeg/jpeg-hw.h
@@ -1,4 +1,4 @@
-/* linux/drivers/media/video/s5p-jpeg/jpeg-hw.h
+/* linux/drivers/media/platform/s5p-jpeg/jpeg-hw.h
  *
  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com
diff --git a/drivers/media/video/s5p-jpeg/jpeg-regs.h b/drivers/media/platform/s5p-jpeg/jpeg-regs.h
similarity index 98%
rename from drivers/media/video/s5p-jpeg/jpeg-regs.h
rename to drivers/media/platform/s5p-jpeg/jpeg-regs.h
index 91f4dd5..38e5081 100644
--- a/drivers/media/video/s5p-jpeg/jpeg-regs.h
+++ b/drivers/media/platform/s5p-jpeg/jpeg-regs.h
@@ -1,4 +1,4 @@
-/* linux/drivers/media/video/s5p-jpeg/jpeg-regs.h
+/* linux/drivers/media/platform/s5p-jpeg/jpeg-regs.h
  *
  * Register definition file for Samsung JPEG codec driver
  *
diff --git a/drivers/media/video/s5p-mfc/Makefile b/drivers/media/platform/s5p-mfc/Makefile
similarity index 100%
rename from drivers/media/video/s5p-mfc/Makefile
rename to drivers/media/platform/s5p-mfc/Makefile
diff --git a/drivers/media/video/s5p-mfc/regs-mfc.h b/drivers/media/platform/s5p-mfc/regs-mfc.h
similarity index 100%
rename from drivers/media/video/s5p-mfc/regs-mfc.h
rename to drivers/media/platform/s5p-mfc/regs-mfc.h
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
similarity index 100%
rename from drivers/media/video/s5p-mfc/s5p_mfc.c
rename to drivers/media/platform/s5p-mfc/s5p_mfc.c
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_cmd.c b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd.c
similarity index 98%
rename from drivers/media/video/s5p-mfc/s5p_mfc_cmd.c
rename to drivers/media/platform/s5p-mfc/s5p_mfc_cmd.c
index f0665ed..91a4155 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_cmd.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_cmd.c
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_cmd.c
  *
  * Copyright (C) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_cmd.h b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd.h
similarity index 93%
rename from drivers/media/video/s5p-mfc/s5p_mfc_cmd.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_cmd.h
index 5ceebfe..8b090d3 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_cmd.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd.h
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_cmd.h
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_cmd.h
  *
  * Copyright (C) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
similarity index 100%
rename from drivers/media/video/s5p-mfc/s5p_mfc_common.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_common.h
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
similarity index 99%
rename from drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
rename to drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
index 08a5cfe..4d662f1 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
  *
  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.h b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
similarity index 93%
rename from drivers/media/video/s5p-mfc/s5p_mfc_ctrl.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
index 61dc23b..e1e0c54 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_ctrl.h
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
  *
  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_debug.h b/drivers/media/platform/s5p-mfc/s5p_mfc_debug.h
similarity index 95%
rename from drivers/media/video/s5p-mfc/s5p_mfc_debug.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_debug.h
index ecb8616..bd5cd4a 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_debug.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_debug.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/samsung/mfc5/s5p_mfc_debug.h
+ * drivers/media/platform/samsung/mfc5/s5p_mfc_debug.h
  *
  * Header file for Samsung MFC (Multi Function Codec - FIMV) driver
  * This file contains debug macros
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
similarity index 99%
rename from drivers/media/video/s5p-mfc/s5p_mfc_dec.c
rename to drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index c5d567f..456f5df 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_dec.c
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
  *
  * Copyright (C) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_dec.h b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.h
similarity index 93%
rename from drivers/media/video/s5p-mfc/s5p_mfc_dec.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_dec.h
index fb8b215..fdf1d99 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_dec.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.h
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_dec.h
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_dec.h
  *
  * Copyright (C) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
similarity index 99%
rename from drivers/media/video/s5p-mfc/s5p_mfc_enc.c
rename to drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index aa1c244..fdeebb0 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_enc.c
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
  *
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_enc.h b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.h
similarity index 93%
rename from drivers/media/video/s5p-mfc/s5p_mfc_enc.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_enc.h
index 405bdd3..ca9fd66 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_enc.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.h
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_enc.h
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_enc.h
  *
  * Copyright (C) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_intr.c b/drivers/media/platform/s5p-mfc/s5p_mfc_intr.c
similarity index 97%
rename from drivers/media/video/s5p-mfc/s5p_mfc_intr.c
rename to drivers/media/platform/s5p-mfc/s5p_mfc_intr.c
index 8f2f8bf..37860e2 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_intr.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_intr.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/samsung/mfc5/s5p_mfc_intr.c
+ * drivers/media/platform/samsung/mfc5/s5p_mfc_intr.c
  *
  * C file for Samsung MFC (Multi Function Codec - FIMV) driver
  * This file contains functions used to wait for command completion.
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_intr.h b/drivers/media/platform/s5p-mfc/s5p_mfc_intr.h
similarity index 93%
rename from drivers/media/video/s5p-mfc/s5p_mfc_intr.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_intr.h
index 122d773..18341a8 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_intr.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_intr.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/samsung/mfc5/s5p_mfc_intr.h
+ * drivers/media/platform/samsung/mfc5/s5p_mfc_intr.h
  *
  * Header file for Samsung MFC (Multi Function Codec - FIMV) driver
  * It contains waiting functions declarations.
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_opr.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
similarity index 99%
rename from drivers/media/video/s5p-mfc/s5p_mfc_opr.c
rename to drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
index e6217cb..b5fd3d4 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_opr.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/samsung/mfc5/s5p_mfc_opr.c
+ * drivers/media/platform/samsung/mfc5/s5p_mfc_opr.c
  *
  * Samsung MFC (Multi Function Codec - FIMV) driver
  * This file contains hw related functions.
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_opr.h b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.h
similarity index 98%
rename from drivers/media/video/s5p-mfc/s5p_mfc_opr.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_opr.h
index 5932d1c..2ad3def 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_opr.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.h
@@ -1,5 +1,5 @@
 /*
- * drivers/media/video/samsung/mfc5/s5p_mfc_opr.h
+ * drivers/media/platform/samsung/mfc5/s5p_mfc_opr.h
  *
  * Header file for Samsung MFC (Multi Function Codec - FIMV) driver
  * Contains declarations of hw related functions.
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
similarity index 98%
rename from drivers/media/video/s5p-mfc/s5p_mfc_pm.c
rename to drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
index 738a607..0503d14 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_pm.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_pm.c
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
  *
  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_pm.h b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.h
similarity index 92%
rename from drivers/media/video/s5p-mfc/s5p_mfc_pm.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_pm.h
index 5107914..875c534 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_pm.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.h
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_pm.h
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_pm.h
  *
  * Copyright (C) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_shm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_shm.c
similarity index 96%
rename from drivers/media/video/s5p-mfc/s5p_mfc_shm.c
rename to drivers/media/platform/s5p-mfc/s5p_mfc_shm.c
index 91fdbac8..b5933d2 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_shm.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_shm.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_shm.c
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_shm.c
  *
  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_shm.h b/drivers/media/platform/s5p-mfc/s5p_mfc_shm.h
similarity index 98%
rename from drivers/media/video/s5p-mfc/s5p_mfc_shm.h
rename to drivers/media/platform/s5p-mfc/s5p_mfc_shm.h
index cf962a4..416ebd7 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_shm.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_shm.h
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/media/video/s5p-mfc/s5p_mfc_shm.h
+ * linux/drivers/media/platform/s5p-mfc/s5p_mfc_shm.h
  *
  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-tv/Kconfig b/drivers/media/platform/s5p-tv/Kconfig
similarity index 98%
rename from drivers/media/video/s5p-tv/Kconfig
rename to drivers/media/platform/s5p-tv/Kconfig
index f248b28..ea11a51 100644
--- a/drivers/media/video/s5p-tv/Kconfig
+++ b/drivers/media/platform/s5p-tv/Kconfig
@@ -1,4 +1,4 @@
-# drivers/media/video/s5p-tv/Kconfig
+# drivers/media/platform/s5p-tv/Kconfig
 #
 # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
 #	http://www.samsung.com/
diff --git a/drivers/media/video/s5p-tv/Makefile b/drivers/media/platform/s5p-tv/Makefile
similarity index 92%
rename from drivers/media/video/s5p-tv/Makefile
rename to drivers/media/platform/s5p-tv/Makefile
index f49e756..7cd4790 100644
--- a/drivers/media/video/s5p-tv/Makefile
+++ b/drivers/media/platform/s5p-tv/Makefile
@@ -1,4 +1,4 @@
-# drivers/media/video/samsung/tvout/Makefile
+# drivers/media/platform/samsung/tvout/Makefile
 #
 # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
 #	http://www.samsung.com/
diff --git a/drivers/media/video/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c
similarity index 100%
rename from drivers/media/video/s5p-tv/hdmi_drv.c
rename to drivers/media/platform/s5p-tv/hdmi_drv.c
diff --git a/drivers/media/video/s5p-tv/hdmiphy_drv.c b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
similarity index 100%
rename from drivers/media/video/s5p-tv/hdmiphy_drv.c
rename to drivers/media/platform/s5p-tv/hdmiphy_drv.c
diff --git a/drivers/media/video/s5p-tv/mixer.h b/drivers/media/platform/s5p-tv/mixer.h
similarity index 100%
rename from drivers/media/video/s5p-tv/mixer.h
rename to drivers/media/platform/s5p-tv/mixer.h
diff --git a/drivers/media/video/s5p-tv/mixer_drv.c b/drivers/media/platform/s5p-tv/mixer_drv.c
similarity index 100%
rename from drivers/media/video/s5p-tv/mixer_drv.c
rename to drivers/media/platform/s5p-tv/mixer_drv.c
diff --git a/drivers/media/video/s5p-tv/mixer_grp_layer.c b/drivers/media/platform/s5p-tv/mixer_grp_layer.c
similarity index 100%
rename from drivers/media/video/s5p-tv/mixer_grp_layer.c
rename to drivers/media/platform/s5p-tv/mixer_grp_layer.c
diff --git a/drivers/media/video/s5p-tv/mixer_reg.c b/drivers/media/platform/s5p-tv/mixer_reg.c
similarity index 100%
rename from drivers/media/video/s5p-tv/mixer_reg.c
rename to drivers/media/platform/s5p-tv/mixer_reg.c
diff --git a/drivers/media/video/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c
similarity index 100%
rename from drivers/media/video/s5p-tv/mixer_video.c
rename to drivers/media/platform/s5p-tv/mixer_video.c
diff --git a/drivers/media/video/s5p-tv/mixer_vp_layer.c b/drivers/media/platform/s5p-tv/mixer_vp_layer.c
similarity index 100%
rename from drivers/media/video/s5p-tv/mixer_vp_layer.c
rename to drivers/media/platform/s5p-tv/mixer_vp_layer.c
diff --git a/drivers/media/video/s5p-tv/regs-hdmi.h b/drivers/media/platform/s5p-tv/regs-hdmi.h
similarity index 100%
rename from drivers/media/video/s5p-tv/regs-hdmi.h
rename to drivers/media/platform/s5p-tv/regs-hdmi.h
diff --git a/drivers/media/video/s5p-tv/regs-mixer.h b/drivers/media/platform/s5p-tv/regs-mixer.h
similarity index 100%
rename from drivers/media/video/s5p-tv/regs-mixer.h
rename to drivers/media/platform/s5p-tv/regs-mixer.h
diff --git a/drivers/media/video/s5p-tv/regs-sdo.h b/drivers/media/platform/s5p-tv/regs-sdo.h
similarity index 97%
rename from drivers/media/video/s5p-tv/regs-sdo.h
rename to drivers/media/platform/s5p-tv/regs-sdo.h
index 7f7c2b8..6f22fbf 100644
--- a/drivers/media/video/s5p-tv/regs-sdo.h
+++ b/drivers/media/platform/s5p-tv/regs-sdo.h
@@ -1,4 +1,4 @@
-/* drivers/media/video/s5p-tv/regs-sdo.h
+/* drivers/media/platform/s5p-tv/regs-sdo.h
  *
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
diff --git a/drivers/media/video/s5p-tv/regs-vp.h b/drivers/media/platform/s5p-tv/regs-vp.h
similarity index 100%
rename from drivers/media/video/s5p-tv/regs-vp.h
rename to drivers/media/platform/s5p-tv/regs-vp.h
diff --git a/drivers/media/video/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c
similarity index 100%
rename from drivers/media/video/s5p-tv/sdo_drv.c
rename to drivers/media/platform/s5p-tv/sdo_drv.c
diff --git a/drivers/media/video/s5p-tv/sii9234_drv.c b/drivers/media/platform/s5p-tv/sii9234_drv.c
similarity index 100%
rename from drivers/media/video/s5p-tv/sii9234_drv.c
rename to drivers/media/platform/s5p-tv/sii9234_drv.c
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/platform/sh_mobile_ceu_camera.c
similarity index 100%
rename from drivers/media/video/sh_mobile_ceu_camera.c
rename to drivers/media/platform/sh_mobile_ceu_camera.c
diff --git a/drivers/media/video/sh_vou.c b/drivers/media/platform/sh_vou.c
similarity index 100%
rename from drivers/media/video/sh_vou.c
rename to drivers/media/platform/sh_vou.c
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/platform/soc_camera.c
similarity index 100%
rename from drivers/media/video/soc_camera.c
rename to drivers/media/platform/soc_camera.c
diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/platform/soc_camera_platform.c
similarity index 100%
rename from drivers/media/video/soc_camera_platform.c
rename to drivers/media/platform/soc_camera_platform.c
diff --git a/drivers/media/video/soc_mediabus.c b/drivers/media/platform/soc_mediabus.c
similarity index 100%
rename from drivers/media/video/soc_mediabus.c
rename to drivers/media/platform/soc_mediabus.c
diff --git a/drivers/media/video/timblogiw.c b/drivers/media/platform/timblogiw.c
similarity index 100%
rename from drivers/media/video/timblogiw.c
rename to drivers/media/platform/timblogiw.c
diff --git a/drivers/media/video/via-camera.c b/drivers/media/platform/via-camera.c
similarity index 100%
rename from drivers/media/video/via-camera.c
rename to drivers/media/platform/via-camera.c
diff --git a/drivers/media/video/via-camera.h b/drivers/media/platform/via-camera.h
similarity index 100%
rename from drivers/media/video/via-camera.h
rename to drivers/media/platform/via-camera.h
diff --git a/drivers/media/video/vino.c b/drivers/media/platform/vino.c
similarity index 100%
rename from drivers/media/video/vino.c
rename to drivers/media/platform/vino.c
diff --git a/drivers/media/video/vino.h b/drivers/media/platform/vino.h
similarity index 100%
rename from drivers/media/video/vino.h
rename to drivers/media/platform/vino.h
diff --git a/drivers/media/video/vivi.c b/drivers/media/platform/vivi.c
similarity index 100%
rename from drivers/media/video/vivi.c
rename to drivers/media/platform/vivi.c
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 10/12] [media] move i2c files into drivers/media/i2c
  2012-08-15 13:48     ` [PATCH 10/12] [media] move i2c files into drivers/media/i2c Mauro Carvalho Chehab
@ 2012-08-24 23:44       ` Sylwester Nawrocki
  2012-09-06 14:07         ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 24+ messages in thread
From: Sylwester Nawrocki @ 2012-08-24 23:44 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

[-- Attachment #1: Type: text/plain, Size: 3092 bytes --]

Hi Mauro,

On 08/15/2012 03:48 PM, Mauro Carvalho Chehab wrote:
> Move ancillary I2C drivers into drivers/media/i2c, in order to
> better organize them.
> 
> Signed-off-by: Mauro Carvalho Chehab<mchehab@redhat.com>
> ---
>   drivers/media/Kconfig                              |   9 +-
>   drivers/media/Makefile                             |   2 +-
>   drivers/media/i2c/Kconfig                          | 566 ++++++++++++++++++++
>   drivers/media/i2c/Makefile                         |  63 +++
>   drivers/media/{video =>  i2c}/adp1653.c             |   2 +-
...
>   rename drivers/media/{video =>  i2c}/wm8775.c (100%)
> 
> diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> index c9cdc61..26f3de5 100644
> --- a/drivers/media/Kconfig
> +++ b/drivers/media/Kconfig
> @@ -151,18 +151,15 @@ source "drivers/media/rc/Kconfig"
> 
>   source "drivers/media/tuners/Kconfig"
> 
> +source "drivers/media/i2c/Kconfig"
> +
>   #
> -# Video/Radio/Hybrid adapters
> +# V4L platform/mem2mem drivers
>   #
> -
>   source "drivers/media/video/Kconfig"
> 
>   source "drivers/media/radio/Kconfig"
> 
> -#
> -# DVB adapters
> -#
> -
>   source "drivers/media/pci/Kconfig"
>   source "drivers/media/usb/Kconfig"
>   source "drivers/media/mmc/Kconfig"
> diff --git a/drivers/media/Makefile b/drivers/media/Makefile
> index 360c44d..e1be196 100644
> --- a/drivers/media/Makefile
> +++ b/drivers/media/Makefile
> @@ -9,7 +9,7 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
>   endif
> 
>   obj-y += tuners/ common/ rc/ video/
> -obj-y += pci/ usb/ mmc/ firewire/ parport/
> +obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/

That way all i2c drivers won't be linked before bridge drivers, which
causes failure of sensor subdev registration. There was a comment
about it in the original Makefile, please see further below.

This issue have already shown up for me in a real system,

[    1.075000] s3c_camif_driver_init:633
[    1.080000] s3c-camif s3c2440-camif: sensor clock frequency: 12000000
[    1.090000] s3c-camif: failed to acquire subdev OV9650
[    1.095000] platform s3c2440-camif: Driver s3c-camif requests probe deferral
[    1.100000] ov965x_i2c_driver_init:820

I've attached a patch to fix this issue.

>   obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
>   obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/

[snip]

> diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
> index a0c6692..52a04fa 100644
> --- a/drivers/media/video/Makefile
> +++ b/drivers/media/video/Makefile
> @@ -2,73 +2,9 @@
>   # Makefile for the video capture/playback device drivers.
>   #
> 
> -msp3400-objs	:=	msp3400-driver.o msp3400-kthreads.o
> -
>   omap2cam-objs	:=	omap24xxcam.o omap24xxcam-dma.o
> 
> -# Helper modules
> -
> -obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
> -
> -# All i2c modules must come first:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                    |
This is currently not preserved ----+
   
> -obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
> -obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
> -obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o

--

Regards,
Sylwester

[-- Attachment #2: 0001-media-Fix-link-order-of-the-V4L2-bridge-and-I2C-modu.patch --]
[-- Type: text/x-patch, Size: 1374 bytes --]

>From ca02e4cba9f400a0066f2875c2fe4284bc8e06dc Mon Sep 17 00:00:00 2001
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Date: Sat, 25 Aug 2012 01:23:14 +0200
Subject: [PATCH] [media] Fix link order of the V4L2 bridge and I2C modules

All I2C modules must be linked first to ensure proper module
initialization order. With platform devices linked before I2C
modules I2C subdev registration fails as the subdev drivers
are not yet initialized during bridge driver's probing.

This fixes regression introduced with commmit cb7a01ac324bf2ee2,
"[media] move i2c files into drivers/media/i2c".

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 drivers/media/Makefile |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index b0b0193..92a8bcf 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -8,8 +8,9 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
   obj-$(CONFIG_MEDIA_SUPPORT) += media.o
 endif
 
-obj-y += tuners/ common/ rc/ platform/
-obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
+obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
+obj-y += common/ rc/ i2c/
+obj-y += tuners/ platform/ pci/ usb/ mmc/ firewire/ parport/
 
-obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
+obj-$(CONFIG_VIDEO_DEV) += radio/
 obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 10/12] [media] move i2c files into drivers/media/i2c
  2012-08-24 23:44       ` Sylwester Nawrocki
@ 2012-09-06 14:07         ` Mauro Carvalho Chehab
  2012-09-06 20:35           ` Sylwester Nawrocki
  2012-09-07  4:33           ` Prabhakar Lad
  0 siblings, 2 replies; 24+ messages in thread
From: Mauro Carvalho Chehab @ 2012-09-06 14:07 UTC (permalink / raw)
  To: Sylwester Nawrocki; +Cc: Linux Media Mailing List, Prabhakar Lad

Em 24-08-2012 20:44, Sylwester Nawrocki escreveu:
> From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
> Date: Sat, 25 Aug 2012 01:23:14 +0200
> Subject: [PATCH] [media] Fix link order of the V4L2 bridge and I2C modules
> 
> All I2C modules must be linked first to ensure proper module
> initialization order. With platform devices linked before I2C
> modules I2C subdev registration fails as the subdev drivers
> are not yet initialized during bridge driver's probing.
> 
> This fixes regression introduced with commmit cb7a01ac324bf2ee2,
> "[media] move i2c files into drivers/media/i2c".
> 
> Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
> ---
>  drivers/media/Makefile |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/Makefile b/drivers/media/Makefile
> index b0b0193..92a8bcf 100644
> --- a/drivers/media/Makefile
> +++ b/drivers/media/Makefile
> @@ -8,8 +8,9 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
>    obj-$(CONFIG_MEDIA_SUPPORT) += media.o
>  endif
>  
> -obj-y += tuners/ common/ rc/ platform/
> -obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
> +obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
> +obj-y += common/ rc/ i2c/
> +obj-y += tuners/ platform/ pci/ usb/ mmc/ firewire/ parport/
>  
> -obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
> +obj-$(CONFIG_VIDEO_DEV) += radio/
>  obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/
> -- 1.7.4.1

Hmm... This change seems incomplete on my eyes: tuners and dvb-frontends
are also I2C drivers. So, while this fixes the issue for platform drivers,
other drivers will still suffer this issue, at least on drivers that doesn't
depend on drivers located outside the media subsystem[1]

[1] thankfully, staging compiles after media, so the drivers there
shouldn't be affected. Also, drivers that use alsa won't be affected, as
alsa core (with is compiled after media) uses subsys_initcall().

IMO, the correct fix is the one below. Could you please test it?

Regards,
Mauro

-

[media] Fix init order for I2C drivers

Based on a patch from Sylvester Nawrocki

This fixes regression introduced with commmit cb7a01ac324bf2ee2,
"[media] move i2c files into drivers/media/i2c".

The linked order affect what drivers will be initialized first, when
they're built-in at Kernel. While there are macros that allow changing
the init order, like subsys_initcall(), late_initcall() & friends,
when all drivers  linked belong to the same subsystem, it is easier
to change the order at the Makefile.

All I2C modules must be linked before any drivers that actually use it,
in order to ensure proper module initialization order.

Also, the core drivers should be initialized before the drivers that use
them.

This patch reorders the drivers init, in order to fulfill the above
requirements.

Reported-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index b0b0193..620f275 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -4,12 +4,30 @@
 
 media-objs	:= media-device.o media-devnode.o media-entity.o
 
+#
+# I2C drivers should come before other drivers, otherwise they'll fail
+# when compiled as builtin drivers
+#
+obj-y += i2c/ tuners/
+obj-$(CONFIG_DVB_CORE)  += dvb-frontends/
+
+#
+# Now, let's link-in the media core
+#
 ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
   obj-$(CONFIG_MEDIA_SUPPORT) += media.o
 endif
 
-obj-y += tuners/ common/ rc/ platform/
-obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
+obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
+obj-$(CONFIG_DVB_CORE)  += dvb-core/
+
+# There are both core and drivers at RC subtree - merge before drivers
+obj-y += rc/
+
+#
+# Finally, merge the drivers that require the core
+#
+
+obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ parport/
+obj-$(CONFIG_VIDEO_DEV) += radio/
 
-obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
-obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 10/12] [media] move i2c files into drivers/media/i2c
  2012-09-06 14:07         ` Mauro Carvalho Chehab
@ 2012-09-06 20:35           ` Sylwester Nawrocki
  2012-09-07  4:33           ` Prabhakar Lad
  1 sibling, 0 replies; 24+ messages in thread
From: Sylwester Nawrocki @ 2012-09-06 20:35 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, Prabhakar Lad

On 09/06/2012 04:07 PM, Mauro Carvalho Chehab wrote:
> Em 24-08-2012 20:44, Sylwester Nawrocki escreveu:
>> From: Sylwester Nawrocki<sylvester.nawrocki@gmail.com>
>> Date: Sat, 25 Aug 2012 01:23:14 +0200
>> Subject: [PATCH] [media] Fix link order of the V4L2 bridge and I2C modules
>>
>> All I2C modules must be linked first to ensure proper module
>> initialization order. With platform devices linked before I2C
>> modules I2C subdev registration fails as the subdev drivers
>> are not yet initialized during bridge driver's probing.
>>
>> This fixes regression introduced with commmit cb7a01ac324bf2ee2,
>> "[media] move i2c files into drivers/media/i2c".
>>
>> Signed-off-by: Sylwester Nawrocki<sylvester.nawrocki@gmail.com>
>> ---
>>   drivers/media/Makefile |    7 ++++---
>>   1 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/Makefile b/drivers/media/Makefile
>> index b0b0193..92a8bcf 100644
>> --- a/drivers/media/Makefile
>> +++ b/drivers/media/Makefile
>> @@ -8,8 +8,9 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
>>     obj-$(CONFIG_MEDIA_SUPPORT) += media.o
>>   endif
>>
>> -obj-y += tuners/ common/ rc/ platform/
>> -obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
>> +obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
>> +obj-y += common/ rc/ i2c/
>> +obj-y += tuners/ platform/ pci/ usb/ mmc/ firewire/ parport/
>>
>> -obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
>> +obj-$(CONFIG_VIDEO_DEV) += radio/
>>   obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/
>> -- 1.7.4.1
> 
> Hmm... This change seems incomplete on my eyes: tuners and dvb-frontends
> are also I2C drivers. So, while this fixes the issue for platform drivers,
> other drivers will still suffer this issue, at least on drivers that doesn't
> depend on drivers located outside the media subsystem[1]

Yeah, that's possible. I wasn't very confident about anything but platform 
and i2c drivers. Thanks for improving it. I tested the patch with a camera 
host and I2C sensor driver and it also fixed the problem.

> [1] thankfully, staging compiles after media, so the drivers there
> shouldn't be affected. Also, drivers that use alsa won't be affected, as
> alsa core (with is compiled after media) uses subsys_initcall().
> 
> IMO, the correct fix is the one below. Could you please test it?
> 
> Regards,
> Mauro
> 
> -
> 
> [media] Fix init order for I2C drivers
> 
> Based on a patch from Sylvester Nawrocki
> 
> This fixes regression introduced with commmit cb7a01ac324bf2ee2,
> "[media] move i2c files into drivers/media/i2c".
> 
> The linked order affect what drivers will be initialized first, when
> they're built-in at Kernel. While there are macros that allow changing
> the init order, like subsys_initcall(), late_initcall()&  friends,
> when all drivers  linked belong to the same subsystem, it is easier
> to change the order at the Makefile.
> 
> All I2C modules must be linked before any drivers that actually use it,
> in order to ensure proper module initialization order.
> 
> Also, the core drivers should be initialized before the drivers that use
> them.
> 
> This patch reorders the drivers init, in order to fulfill the above
> requirements.
> 
> Reported-by: Sylwester Nawrocki<sylvester.nawrocki@gmail.com>
> Signed-off-by: Mauro Carvalho Chehab<mchehab@redhat.com>
 
Acked-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
 
> diff --git a/drivers/media/Makefile b/drivers/media/Makefile
> index b0b0193..620f275 100644
> --- a/drivers/media/Makefile
> +++ b/drivers/media/Makefile
> @@ -4,12 +4,30 @@
> 
>   media-objs	:= media-device.o media-devnode.o media-entity.o
> 
> +#
> +# I2C drivers should come before other drivers, otherwise they'll fail
> +# when compiled as builtin drivers
> +#
> +obj-y += i2c/ tuners/
> +obj-$(CONFIG_DVB_CORE)  += dvb-frontends/
> +
> +#
> +# Now, let's link-in the media core
> +#
>   ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
>     obj-$(CONFIG_MEDIA_SUPPORT) += media.o
>   endif
> 
> -obj-y += tuners/ common/ rc/ platform/
> -obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
> +obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
> +obj-$(CONFIG_DVB_CORE)  += dvb-core/
> +
> +# There are both core and drivers at RC subtree - merge before drivers
> +obj-y += rc/
> +
> +#
> +# Finally, merge the drivers that require the core
> +#
> +
> +obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ parport/
> +obj-$(CONFIG_VIDEO_DEV) += radio/
> 
> -obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
> -obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/

--

Regards,
Sylwester

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 10/12] [media] move i2c files into drivers/media/i2c
  2012-09-06 14:07         ` Mauro Carvalho Chehab
  2012-09-06 20:35           ` Sylwester Nawrocki
@ 2012-09-07  4:33           ` Prabhakar Lad
  1 sibling, 0 replies; 24+ messages in thread
From: Prabhakar Lad @ 2012-09-07  4:33 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Sylwester Nawrocki, Linux Media Mailing List

Hi Mauro,

Thanks for the patch.

On Thu, Sep 6, 2012 at 7:37 PM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
> Em 24-08-2012 20:44, Sylwester Nawrocki escreveu:
>> From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
>> Date: Sat, 25 Aug 2012 01:23:14 +0200
>> Subject: [PATCH] [media] Fix link order of the V4L2 bridge and I2C modules
>>
>> All I2C modules must be linked first to ensure proper module
>> initialization order. With platform devices linked before I2C
>> modules I2C subdev registration fails as the subdev drivers
>> are not yet initialized during bridge driver's probing.
>>
>> This fixes regression introduced with commmit cb7a01ac324bf2ee2,
>> "[media] move i2c files into drivers/media/i2c".
>>
>> Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
>> ---
>>  drivers/media/Makefile |    7 ++++---
>>  1 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/Makefile b/drivers/media/Makefile
>> index b0b0193..92a8bcf 100644
>> --- a/drivers/media/Makefile
>> +++ b/drivers/media/Makefile
>> @@ -8,8 +8,9 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
>>    obj-$(CONFIG_MEDIA_SUPPORT) += media.o
>>  endif
>>
>> -obj-y += tuners/ common/ rc/ platform/
>> -obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
>> +obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
>> +obj-y += common/ rc/ i2c/
>> +obj-y += tuners/ platform/ pci/ usb/ mmc/ firewire/ parport/
>>
>> -obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
>> +obj-$(CONFIG_VIDEO_DEV) += radio/
>>  obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/
>> -- 1.7.4.1
>
> Hmm... This change seems incomplete on my eyes: tuners and dvb-frontends
> are also I2C drivers. So, while this fixes the issue for platform drivers,
> other drivers will still suffer this issue, at least on drivers that doesn't
> depend on drivers located outside the media subsystem[1]
>
> [1] thankfully, staging compiles after media, so the drivers there
> shouldn't be affected. Also, drivers that use alsa won't be affected, as
> alsa core (with is compiled after media) uses subsys_initcall().
>
> IMO, the correct fix is the one below. Could you please test it?
>
> Regards,
> Mauro
>
> -
>
> [media] Fix init order for I2C drivers
>
> Based on a patch from Sylvester Nawrocki
>
> This fixes regression introduced with commmit cb7a01ac324bf2ee2,
> "[media] move i2c files into drivers/media/i2c".
>
> The linked order affect what drivers will be initialized first, when
> they're built-in at Kernel. While there are macros that allow changing
> the init order, like subsys_initcall(), late_initcall() & friends,
> when all drivers  linked belong to the same subsystem, it is easier
> to change the order at the Makefile.
>
> All I2C modules must be linked before any drivers that actually use it,
> in order to ensure proper module initialization order.
>
> Also, the core drivers should be initialized before the drivers that use
> them.
>
> This patch reorders the drivers init, in order to fulfill the above
> requirements.
>
> Reported-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
Acked-by: Prabhakar Lad <prabhakar.lad@ti.com>


Thanks and Regards,
--Prabhakar Lad

> diff --git a/drivers/media/Makefile b/drivers/media/Makefile
> index b0b0193..620f275 100644
> --- a/drivers/media/Makefile
> +++ b/drivers/media/Makefile
> @@ -4,12 +4,30 @@
>
>  media-objs     := media-device.o media-devnode.o media-entity.o
>
> +#
> +# I2C drivers should come before other drivers, otherwise they'll fail
> +# when compiled as builtin drivers
> +#
> +obj-y += i2c/ tuners/
> +obj-$(CONFIG_DVB_CORE)  += dvb-frontends/
> +
> +#
> +# Now, let's link-in the media core
> +#
>  ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
>    obj-$(CONFIG_MEDIA_SUPPORT) += media.o
>  endif
>
> -obj-y += tuners/ common/ rc/ platform/
> -obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
> +obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
> +obj-$(CONFIG_DVB_CORE)  += dvb-core/
> +
> +# There are both core and drivers at RC subtree - merge before drivers
> +obj-y += rc/
> +
> +#
> +# Finally, merge the drivers that require the core
> +#
> +
> +obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ parport/
> +obj-$(CONFIG_VIDEO_DEV) += radio/
>
> -obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
> -obj-$(CONFIG_DVB_CORE)  += dvb-core/ dvb-frontends/
>
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2012-09-07  4:41 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14 20:55 [PATCH 00/12] media tree reorganization part 2 (second version) Mauro Carvalho Chehab
2012-08-14 20:55 ` [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir Mauro Carvalho Chehab
2012-08-14 20:55 ` =?true?q?=5BPATCH=2006/12=5D=20=5Bmedia=5D=20move=20the=20remaining=20PCI=20devices=20to=20drivers/media/pci?= Mauro Carvalho Chehab
2012-08-14 20:55 ` [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/ Mauro Carvalho Chehab
2012-08-14 20:55 ` [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver Mauro Carvalho Chehab
2012-08-14 20:55 ` [PATCH 09/12] [media] reorganize the API core items Mauro Carvalho Chehab
2012-08-14 21:17 ` [PATCH 00/12] media tree reorganization part 2 (second version) Sylwester Nawrocki
2012-08-15 13:48   ` Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 01/12] [media] rename most media/video usb drivers to media/usb Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 02/12] [media] move the remaining USB drivers to drivers/media/usb Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 03/12] [media] bt8xx: move analog TV part to be together with DTV one Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 04/12] [media] rename most media/video pci drivers to media/pci Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 06/12] [media] move the remaining PCI devices to drivers/media/pci Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/ Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 09/12] [media] reorganize the API core items Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 10/12] [media] move i2c files into drivers/media/i2c Mauro Carvalho Chehab
2012-08-24 23:44       ` Sylwester Nawrocki
2012-09-06 14:07         ` Mauro Carvalho Chehab
2012-09-06 20:35           ` Sylwester Nawrocki
2012-09-07  4:33           ` Prabhakar Lad
2012-08-15 13:48     ` [PATCH 11/12] [media] move soc_camera i2c drivers into its own dir Mauro Carvalho Chehab
2012-08-15 13:48     ` [PATCH 12/12] [media] rename drivers/media/video to platform Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.