Messages in this thread | | | Date | Fri, 17 Oct 2008 01:08:35 +0200 (CEST) | From | Guennadi Liakhovetski <> | Subject | Re: [PATCH v2] soc-camera: fix compile breakage on SH |
| |
On Wed, 15 Oct 2008, Guennadi Liakhovetski wrote:
> Fix Migo-R compile breakage caused by incomplete merge. Also remove > redundant soc_camera_platform_info struct definition from > drivers/media/video/soc_camera_platform.c
Ok, I got no acks to this one, so, let's drop it, I'll submit its two parts to the v4l and sh lists and maintainers independently.
Thanks Guennadi
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> > Tested-by: Magnus Damm <damm@igel.co.jp> > > --- > > Paul, Mauro, as this patch closes a compile-breakage, I'd like to get it > upstream asap. What would be the fastest way: get your both Acked-by and > send it directly to Andrew / Linus, or an Acked-by from one of you and > let the other one merge (you can decide who does what:-)) Splitting it > into two patches and merging separately seems suboptimal to me in this > case. > > Thanks > Guennadi > > diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c > index 714dce9..95459f3 100644 > --- a/arch/sh/boards/mach-migor/setup.c > +++ b/arch/sh/boards/mach-migor/setup.c > @@ -312,6 +312,14 @@ static void camera_power_off(void) > ctrl_outb(ctrl_inb(PORT_PTDR) & ~0x08, PORT_PTDR); > } > > +static void camera_power(int mode) > +{ > + if (mode) > + camera_power_on(); > + else > + camera_power_off(); > +} > + > #ifdef CONFIG_I2C > static unsigned char camera_ov772x_magic[] = > { > @@ -391,6 +399,7 @@ static struct soc_camera_platform_info ov772x_info = { > }, > .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | > SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, > + .power = camera_power, > .set_capture = ov772x_set_capture, > }; > > @@ -405,8 +414,6 @@ static struct platform_device migor_camera_device = { > static struct sh_mobile_ceu_info sh_mobile_ceu_info = { > .flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \ > | SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH, > - .enable_camera = camera_power_on, > - .disable_camera = camera_power_off, > }; > > static struct resource migor_ceu_resources[] = { > diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c > index 1adc257..bb7a9d4 100644 > --- a/drivers/media/video/soc_camera_platform.c > +++ b/drivers/media/video/soc_camera_platform.c > @@ -18,15 +18,7 @@ > #include <linux/videodev2.h> > #include <media/v4l2-common.h> > #include <media/soc_camera.h> > - > -struct soc_camera_platform_info { > - int iface; > - char *format_name; > - unsigned long format_depth; > - struct v4l2_pix_format format; > - unsigned long bus_param; > - int (*set_capture)(struct soc_camera_platform_info *info, int enable); > -}; > +#include <media/soc_camera_platform.h> > > struct soc_camera_platform_priv { > struct soc_camera_platform_info *info; > @@ -44,11 +36,21 @@ soc_camera_platform_get_info(struct soc_camera_device *icd) > > static int soc_camera_platform_init(struct soc_camera_device *icd) > { > + struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); > + > + if (p->power) > + p->power(1); > + > return 0; > } > > static int soc_camera_platform_release(struct soc_camera_device *icd) > { > + struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); > + > + if (p->power) > + p->power(0); > + > return 0; > } > > diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h > index 851f182..7c81ad3 100644 > --- a/include/media/soc_camera_platform.h > +++ b/include/media/soc_camera_platform.h > @@ -9,6 +9,7 @@ struct soc_camera_platform_info { > unsigned long format_depth; > struct v4l2_pix_format format; > unsigned long bus_param; > + void (*power)(int); > int (*set_capture)(struct soc_camera_platform_info *info, int enable); > }; > > > -- > video4linux-list mailing list > Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe > https://www.redhat.com/mailman/listinfo/video4linux-list >
--- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer
| |