]> Pileus Git - ~andy/linux/commit
avr32: favr-32: clk_round_rate() can return a zero upon error
authorPaul Walmsley <pwalmsley@nvidia.com>
Tue, 10 Dec 2013 02:35:24 +0000 (18:35 -0800)
committerHans-Christian Egtvedt <hegtvedt@cisco.com>
Tue, 10 Dec 2013 07:46:38 +0000 (08:46 +0100)
commit464b500e37a588be69ed9c9c21bca62a578ca66c
tree539049f9f53f1c9b0608069a6722f81d70dcf44a
parent7155530d9eb692994d208836e4965da06b17c99d
avr32: favr-32: clk_round_rate() can return a zero upon error

Treat both negative and zero return values from clk_round_rate() as
errors.  This is needed since subsequent patches will convert
clk_round_rate()'s return value to be an unsigned type, rather than a
signed type, since some clock sources can generate rates higher than
(2^31)-1 Hz.

Eventually, when calling clk_round_rate(), only a return value of zero
will be considered a error.  All other values will be considered valid
rates.  The comparison against values less than 0 is kept to preserve
the correct behavior in the meantime.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: HÃ¥vard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
arch/avr32/boards/favr-32/setup.c