mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: boards: variscite-mx6: Remove the excess assignment
Date: Mon, 20 Jun 2016 08:34:31 +0200	[thread overview]
Message-ID: <20160620063431.GN9677@pengutronix.de> (raw)
In-Reply-To: <1466325070-20966-1-git-send-email-shc_work@mail.ru>

On Sun, Jun 19, 2016 at 11:31:10AM +0300, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  arch/arm/boards/variscite-mx6/board.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/boards/variscite-mx6/board.c b/arch/arm/boards/variscite-mx6/board.c
> index 3585deb..267f68c 100644
> --- a/arch/arm/boards/variscite-mx6/board.c
> +++ b/arch/arm/boards/variscite-mx6/board.c
> @@ -47,24 +47,19 @@
>  static int setup_pmic_voltages(void)
>  {
>  	unsigned char value, rev_id = 0 ;
> -	struct i2c_adapter *adapter = NULL;
> +	struct i2c_adapter *adapter;
>  	struct i2c_client client;
> -	int addr = -1, bus = 0;
>  
>  	/* I2C2 bus (2-1 = 1 in barebox numbering) */
> -	bus = 1;
> -
> -	/* PFUZE100 device address is 0x08 */
> -	addr = 0x08;
> -
> -	adapter = i2c_get_adapter(bus);
> +	adapter = i2c_get_adapter(1);
>  	if (!adapter) {
> -		pr_err("i2c bus %d not found\n", bus);
> +		pr_err("i2c2 bus not found\n");
>  		return -ENODEV;
>  	}
>  
>  	client.adapter = adapter;
> -	client.addr = addr;
> +	/* PFUZE100 device address is 0x08 */
> +	client.addr = 0x08;
>  
>  	/* Attempt to locate the PFUZE100 chip. */
>  	if (i2c_read_reg(&client, 0x00, &value, 1) != 1) {
> -- 
> 2.4.9
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2016-06-20  6:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-19  8:31 Alexander Shiyan
2016-06-20  6:34 ` Sascha Hauer [this message]

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=20160620063431.GN9677@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=shc_work@mail.ru \
    /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