Subject: Re: [PATCH] windfarm: add PowerMac 12,1 support

From: Andreas Schwab <[email-masked]>
Date: Sun, 23 Mar 2008 02:01:46 +0100

David Woodhouse <[email-masked]> writes:

> -	all = all && pm121_register_control(ct, "optical-driver-fan", FAN_OD);
> -	all = all && pm121_register_control(ct, "hard-driver-fan", FAN_HD);
> -	all = all && pm121_register_control(ct, "cpu-driver-fan", FAN_CPU);
> -	all = all && pm121_register_control(ct, "cpufreq-clamp", CPUFREQ);
> +	all = pm121_register_control(ct, "optical-drive-fan", FAN_OD) && all;
> +	all = pm121_register_control(ct, "hard-drive-fan", FAN_HD) && all;
> +	all = pm121_register_control(ct, "cpu-fan", FAN_CPU) && all;
> +	all = pm121_register_control(ct, "cpufreq-clamp", CPUFREQ) && all;

You can also write all &= ... if pm121_register_control always return
0/1 (or make it 0/1 with !!).

Andreas.

-- 
Andreas Schwab, SuSE Labs, [email-masked]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."