]> err.no Git - linux-2.6/commitdiff
[POWERPC] PS3: Fix bug where the major version part is not compared
authorMasakazu Mokuno <mokuno@sm.sony.co.jp>
Wed, 29 Aug 2007 11:30:25 +0000 (20:30 +0900)
committerPaul Mackerras <paulus@samba.org>
Thu, 30 Aug 2007 10:49:41 +0000 (20:49 +1000)
Fix the bug that the major version part of the firmware version number
is ignored in the comparison done by ps3_compare_firmware_version
because the difference of two 64-bit quantities is returned as an int.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/ps3/setup.c

index 2952b22f1c8489945d1607487fe14211c59d85c5..609945dbe39401459a1592cd5d264c3b10ad0507 100644 (file)
@@ -63,7 +63,8 @@ int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev)
        x.minor = minor;
        x.rev = rev;
 
-       return (ps3_firmware_version.raw - x.raw);
+       return (ps3_firmware_version.raw > x.raw) -
+              (ps3_firmware_version.raw < x.raw);
 }
 EXPORT_SYMBOL_GPL(ps3_compare_firmware_version);