From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] soc-camera: fix compile breakage on SH
Date: Mon, 20 Oct 2008 04:09:56 +0000 [thread overview]
Message-ID: <20081020040956.GA20044@linux-sh.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0810142335400.10458@axis700.grange>
On Fri, Oct 17, 2008 at 01:16:40AM +0200, Guennadi Liakhovetski wrote:
> 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,
> };
>
I don't like this. Keeping the enable and disable_camera interfaces
is really the way we want to go, evident by the fact that your new power
callback is forced to call in to one or the other anyways. I would rather
see these moved in to struct soc_camera_platform_info, rather than having
every single board in existence have to model that if (mode) on; else off
crap.
Also, there is not much point in splitting these changes out. They are
coupled, and splitting them out only causes confusion (especially across
a bisect).
next prev parent reply other threads:[~2008-10-20 4:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-14 18:39 sh/boards/mach-migor/setup.c build error Adrian Bunk
2008-10-14 21:53 ` [PATCH] soc-camera: fix compile breakage on SH Guennadi Liakhovetski
2008-10-15 3:33 ` Adrian Bunk
2008-10-15 5:20 ` Adrian Bunk
2008-10-15 6:28 ` Magnus Damm
2008-10-15 6:41 ` Guennadi Liakhovetski
2008-10-15 8:03 ` Magnus Damm
2008-10-15 8:26 ` Guennadi Liakhovetski
2008-10-15 8:55 ` Magnus Damm
2008-10-15 9:07 ` Guennadi Liakhovetski
2008-10-15 10:52 ` [PATCH v2] " Guennadi Liakhovetski
2008-10-16 23:08 ` Guennadi Liakhovetski
2008-10-16 23:16 ` [PATCH] " Guennadi Liakhovetski
2008-10-20 4:09 ` Paul Mundt [this message]
2008-10-20 7:02 ` Guennadi Liakhovetski
2008-10-20 12:45 ` Paul Mundt
2008-10-20 13:00 ` Guennadi Liakhovetski
2008-10-20 13:08 ` Paul Mundt
2008-10-20 17:44 ` Guennadi Liakhovetski
2008-10-21 3:45 ` Paul Mundt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081020040956.GA20044@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox