All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Pavel Machek <pavel@ucw.cz>
Cc: rpurdie@rpsys.net, lenz@cs.wisc.edu,
	kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [warning: ugly, FYI] battery charging support for sharp sl-5500
Date: Sat, 30 Jul 2005 10:26:56 +0100	[thread overview]
Message-ID: <20050730102656.C9652@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050725062242.GA3292@elf.ucw.cz>; from pavel@ucw.cz on Mon, Jul 25, 2005 at 08:22:42AM +0200

On Mon, Jul 25, 2005 at 08:22:42AM +0200, Pavel Machek wrote:
> I replaced sharp functions with ucb_1x00 functions this way; I hope I
> did not mess it up.
> 
> diff --git a/arch/arm/mach-sa1100/battery-collie.c b/arch/arm/mach-sa1100/battery-collie.c
> --- a/arch/arm/mach-sa1100/battery-collie.c
> +++ b/arch/arm/mach-sa1100/battery-collie.c
> -
> -  	ucb1200_set_io(COLLIE_TC35143_GPIO_BBAT_ON, COLLIE_TC35143_IODAT_LOW);
> -  	ucb1200_set_io(COLLIE_TC35143_GPIO_MBAT_ON, COLLIE_TC35143_IODAT_HIGH);
> -	voltage = ucb1200_get_adc_value(ADC_REQ_ID, COLLIE_TC35143_ADC_BAT_VOL);
> +	ucb1x00_io_write(NULL, 0, COLLIE_TC35143_GPIO_BBAT_ON);
> +	ucb1x00_io_write(NULL, COLLIE_TC35143_GPIO_MBAT_ON, 0);
> +	voltage = ucb1x00_adc_read(NULL, COLLIE_TC35143_ADC_BAT_VOL, UCB_SYNC);

This won't work.  You can't pass NULL to functions that take a pointer
and expect them to work.  Look back at my patch set, at the way the
ucb1x00-assabet patch does this.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2005-07-30  9:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-25  5:46 [warning: ugly, FYI] battery charging support for sharp sl-5500 Pavel Machek
2005-07-25  6:22 ` Pavel Machek
2005-07-30  9:26   ` Russell King [this message]
2005-07-30 14:21     ` Pavel Machek
2005-07-25 15:06 ` Richard Purdie
2005-07-26 20:52   ` Pavel Machek
2005-07-26 21:00   ` Pavel Machek

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=20050730102656.C9652@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=lenz@cs.wisc.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.