Re: [warning: ugly, FYI] battery charging support for sharp sl-5500

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux