Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] viafb: fix viafb_find_i2c_adapt return value
Date: Wed, 29 Dec 2010 01:26:55 +0000	[thread overview]
Message-ID: <4D1A8E5F.3010901@gmx.de> (raw)
In-Reply-To: <4D0FAB7E.1080704@bspu.unibel.by>

[cc'ed Jon; un-cc'ed Joseph as his email address is no longer valid]

Dzianis Kahanovich schrieb:
> viafb_find_i2c_adapt return unverifyed value, "is_active" field still uplevel.
> Fix it.

This patch looks useful to me but the viafb camera driver uses this function at 
the moment. It's not a big issue now as 31 will be always I2C but perhaps it 
might be a good idea to patch drivers/media/video/via-camera.c

Jon, do you agree that this patch is useful, at least as long we do not 
dynamically change the configuration?


Thanks,

Florian Tobias Schandinat

> 
> Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>
> ---
> --- a/drivers/video/via/via_i2c.c	2010-12-18 06:42:37.000000000 +0200
> +++ b/drivers/video/via/via_i2c.c	2010-12-20 19:55:17.000000000 +0200
> @@ -188,7 +188,7 @@ struct i2c_adapter *viafb_find_i2c_adapt
>  {
>  	struct via_i2c_stuff *stuff = &via_i2c_par[which];
> 
> -	return &stuff->adapter;
> +	return stuff->is_active ? &stuff->adapter : NULL;
>  }
>  EXPORT_SYMBOL_GPL(viafb_find_i2c_adapter);
> 
> --
> 
> 


  reply	other threads:[~2010-12-29  1:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 19:16 [PATCH] viafb: fix viafb_find_i2c_adapt return value Dzianis Kahanovich
2010-12-29  1:26 ` Florian Tobias Schandinat [this message]
2011-01-04 11:16 ` Dzianis Kahanovich

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=4D1A8E5F.3010901@gmx.de \
    --to=florianschandinat@gmx.de \
    --cc=linux-fbdev@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