On Wed, 10 Mar 2010, Patch from Douglas Schilling Landgraf wrote: > The patch number 14412 was added via Douglas Schilling Landgraf > <[email protected]> > to http://linuxtv.org/hg/v4l-dvb master development tree. > > Kernel patches in this development tree may be modified to be backward > compatible with older kernels. Compatibility modifications will be > removed before inclusion into the mainstream Kernel > > If anyone has any objections, please let us know by sending a message to: > Linux Media Mailing List <[email protected]> > > ------ > > From: Douglas Schilling Landgraf <[email protected]> > soc_camera: fix pm_runtime > > > pm_runtime is only available for kernels >= 2.6.32
FYI, you can just shift the whole soc-camera driver set with each kernel release - to be built only with the current kernel, but that's up to you. Thanks Guennadi > > Priority: normal > > Signed-off-by: Douglas Schilling Landgraf <[email protected]> > > > --- > > linux/drivers/media/video/soc_camera.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff -r 00872cf41803 -r 7a58d924fb04 linux/drivers/media/video/soc_camera.c > --- a/linux/drivers/media/video/soc_camera.c Tue Mar 09 22:34:51 2010 -0300 > +++ b/linux/drivers/media/video/soc_camera.c Tue Mar 09 23:00:59 2010 -0300 > @@ -24,7 +24,9 @@ > #include <linux/mutex.h> > #include <linux/module.h> > #include <linux/platform_device.h> > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) > #include <linux/pm_runtime.h> > +#endif > #include <linux/vmalloc.h> > > #include <media/soc_camera.h> > @@ -389,10 +391,12 @@ > goto eiciadd; > } > > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) > pm_runtime_enable(&icd->vdev->dev); > ret = pm_runtime_resume(&icd->vdev->dev); > if (ret < 0 && ret != -ENOSYS) > goto eresume; > +#endif > > /* > * Try to configure with default parameters. Notice: this is the > @@ -419,8 +423,10 @@ > * and use_count == 1 > */ > esfmt: > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) > pm_runtime_disable(&icd->vdev->dev); > eresume: > +#endif > ici->ops->remove(icd); > eiciadd: > if (icl->power) > @@ -445,8 +451,10 @@ > if (!icd->use_count) { > struct soc_camera_link *icl = to_soc_camera_link(icd); > > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) > pm_runtime_suspend(&icd->vdev->dev); > pm_runtime_disable(&icd->vdev->dev); > +#endif > > ici->ops->remove(icd); > > > > --- > > Patch is available at: > http://linuxtv.org/hg/v4l-dvb/rev/7a58d924fb049ff1d318514939b3a7e416670c13 > > _______________________________________________ > linuxtv-commits mailing list > [email protected] > http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits > --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
