public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: ap325 camera without i2c driver fix
@ 2009-05-20 14:30 Magnus Damm
  2009-05-21 17:45 ` Paul Mundt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Magnus Damm @ 2009-05-20 14:30 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@igel.co.jp>

This patch fixes the ap325rxa ncm03j camera code to handle
the case where no i2c driver is present. Without this fix
i2c_transfer() may be passed NULL as adapter which results
in a crash.

Triggered when i2c-sh_mobile.c failed to probe() due to
missing MSTP clocks.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 arch/sh/boards/board-ap325rxa.c |    3 +++
 1 file changed, 3 insertions(+)

--- 0001/arch/sh/boards/board-ap325rxa.c
+++ work/arch/sh/boards/board-ap325rxa.c	2009-05-20 22:25:41.000000000 +0900
@@ -263,6 +263,9 @@ static int camera_probe(void)
 	struct i2c_msg msg;
 	int ret;
 
+	if (!a)
+		return -ENODEV;
+
 	camera_power(1);
 	msg.addr = 0x6e;
 	msg.buf = camera_ncm03j_magic;

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

* Re: [PATCH] sh: ap325 camera without i2c driver fix
  2009-05-20 14:30 [PATCH] sh: ap325 camera without i2c driver fix Magnus Damm
@ 2009-05-21 17:45 ` Paul Mundt
  2009-05-22  4:14 ` Magnus Damm
  2009-05-22  4:28 ` Paul Mundt
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2009-05-21 17:45 UTC (permalink / raw)
  To: linux-sh

On Wed, May 20, 2009 at 11:30:06PM +0900, Magnus Damm wrote:
> This patch fixes the ap325rxa ncm03j camera code to handle
> the case where no i2c driver is present. Without this fix
> i2c_transfer() may be passed NULL as adapter which results
> in a crash.
> 
> Triggered when i2c-sh_mobile.c failed to probe() due to
> missing MSTP clocks.

On Wed, May 20, 2009 at 11:34:43PM +0900, Magnus Damm wrote:
> This patch fixes the LCDC driver to avoid calling the
> function sh_mobile_lcdc_start_stop(priv, 0) unless the
> same function has been called before to start the LCDC
> hardware.
> 
> Triggered when sh_mobile_lcdcfb.c failed to probe() due to
> missing MSTP clocks.

I was going to apply these, but as you provided no information as to what
branch these should be applied to, I didn't bother. Is this a problem
only in sh/clkfwk? Is this a problem with HEAD? Does it need to go in
2.6.30? If you are going to post a bunch of seemingly unrelated patches
in one go, it helps to know what exactly you want done with them.

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

* Re: [PATCH] sh: ap325 camera without i2c driver fix
  2009-05-20 14:30 [PATCH] sh: ap325 camera without i2c driver fix Magnus Damm
  2009-05-21 17:45 ` Paul Mundt
@ 2009-05-22  4:14 ` Magnus Damm
  2009-05-22  4:28 ` Paul Mundt
  2 siblings, 0 replies; 4+ messages in thread
From: Magnus Damm @ 2009-05-22  4:14 UTC (permalink / raw)
  To: linux-sh

On Fri, May 22, 2009 at 2:45 AM, Paul Mundt <lethal@linux-sh.org> wrote:
> On Wed, May 20, 2009 at 11:30:06PM +0900, Magnus Damm wrote:
>> This patch fixes the ap325rxa ncm03j camera code to handle
>> the case where no i2c driver is present. Without this fix
>> i2c_transfer() may be passed NULL as adapter which results
>> in a crash.
>>
>> Triggered when i2c-sh_mobile.c failed to probe() due to
>> missing MSTP clocks.
>
> On Wed, May 20, 2009 at 11:34:43PM +0900, Magnus Damm wrote:
>> This patch fixes the LCDC driver to avoid calling the
>> function sh_mobile_lcdc_start_stop(priv, 0) unless the
>> same function has been called before to start the LCDC
>> hardware.
>>
>> Triggered when sh_mobile_lcdcfb.c failed to probe() due to
>> missing MSTP clocks.
>
> I was going to apply these, but as you provided no information as to what
> branch these should be applied to, I didn't bother. Is this a problem
> only in sh/clkfwk? Is this a problem with HEAD? Does it need to go in
> 2.6.30? If you are going to post a bunch of seemingly unrelated patches
> in one go, it helps to know what exactly you want done with them.

These fixes are not sh/clkfwk specific. Does the branch modify these drivers?

Since they are not very critical I suggest adding them to 2.6.31, but
if you're going to push things for 2.6.30 once more then you may
include these as well.

Cheers,

/ magnus

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

* Re: [PATCH] sh: ap325 camera without i2c driver fix
  2009-05-20 14:30 [PATCH] sh: ap325 camera without i2c driver fix Magnus Damm
  2009-05-21 17:45 ` Paul Mundt
  2009-05-22  4:14 ` Magnus Damm
@ 2009-05-22  4:28 ` Paul Mundt
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2009-05-22  4:28 UTC (permalink / raw)
  To: linux-sh

On Fri, May 22, 2009 at 01:14:51PM +0900, Magnus Damm wrote:
> On Fri, May 22, 2009 at 2:45 AM, Paul Mundt <lethal@linux-sh.org> wrote:
> > On Wed, May 20, 2009 at 11:30:06PM +0900, Magnus Damm wrote:
> >> This patch fixes the ap325rxa ncm03j camera code to handle
> >> the case where no i2c driver is present. Without this fix
> >> i2c_transfer() may be passed NULL as adapter which results
> >> in a crash.
> >>
> >> Triggered when i2c-sh_mobile.c failed to probe() due to
> >> missing MSTP clocks.
> >
> > On Wed, May 20, 2009 at 11:34:43PM +0900, Magnus Damm wrote:
> >> This patch fixes the LCDC driver to avoid calling the
> >> function sh_mobile_lcdc_start_stop(priv, 0) unless the
> >> same function has been called before to start the LCDC
> >> hardware.
> >>
> >> Triggered when sh_mobile_lcdcfb.c failed to probe() due to
> >> missing MSTP clocks.
> >
> > I was going to apply these, but as you provided no information as to what
> > branch these should be applied to, I didn't bother. Is this a problem
> > only in sh/clkfwk? Is this a problem with HEAD? Does it need to go in
> > 2.6.30? If you are going to post a bunch of seemingly unrelated patches
> > in one go, it helps to know what exactly you want done with them.
> 
> These fixes are not sh/clkfwk specific. Does the branch modify these drivers?
> 
No, but there are plenty of MSTP related changes. If you are sending a
set of patches where some are destined for some particular branch, you do
need to specify precisely where you want them applied. If it's not
immediately obvious, then they just aren't going to be applied, period.

> Since they are not very critical I suggest adding them to 2.6.31, but
> if you're going to push things for 2.6.30 once more then you may
> include these as well.
> 
I've rolled them in to the 2.6.30 queue now, thanks.

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

end of thread, other threads:[~2009-05-22  4:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20 14:30 [PATCH] sh: ap325 camera without i2c driver fix Magnus Damm
2009-05-21 17:45 ` Paul Mundt
2009-05-22  4:14 ` Magnus Damm
2009-05-22  4:28 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox