compat: backport soc_camera_power_[on|off] for 3.3
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Mon, 6 May 2013 21:52:06 +0000 (14:52 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 7 May 2013 13:22:48 +0000 (15:22 +0200)
commit03c51d2af435f85542259f8be142de638c759e9e
tree63c02ec596a9935e47d1a859471d2e0b5f0167f1
parente95a92688751d497f6f4e2abbb34945b689f3924
compat: backport soc_camera_power_[on|off] for 3.3

We are only backporting CONFIG_SOC_CAMERA for kernels >= 3.4
but there is an exported symbol from there that some media
drivers that we do support on 3.3 need. Handle this special
case.

SOC_CAMERA is only enabled on 3.4 as it depends on some
newer regulator functionality, however there are some SOC
cameras that can rely on the 3.3 regulatory built-in core
and the 3.3 SOC_CAMERA module however two routines are
not exported in that version of SOC_CAMERA that newer
SOC cameras do require. Backport that functionality.

Technically this should go into <media/soc_camera.h>
given that is where its where its exported on linux-next
but in practice only placing it on <linux/v4l2-mediabus.h>
actually fixes linking errors for 3.3 for all SOC camera
drivers we make available for 3.3:

  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/imx074.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/mt9m001.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/mt9m111.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/mt9t031.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/mt9t112.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/mt9v022.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/ov2640.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/ov5642.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/ov6650.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/ov772x.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/ov9640.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/ov9740.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/rj54n1cb0c.ko
  LD [M]  /home/mcgrof/build/drivers/media/i2c/soc_camera/tw9910.ko

This fixes all pending linking errors on 3.3.

$ time ckmake --check-exports --allyesconfig

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  LINK  ]
22  3.5.7               [  LINK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

real    30m14.581s
user    796m34.495s
sys     126m46.807s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
backport/Makefile.kernel
backport/backport-include/uapi/linux/v4l2-mediabus.h [new file with mode: 0644]
backport/compat/compat-3.4.c