From 4a3a255289e7e322b8044286cce85031990f888a Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Thu, 11 Nov 2010 22:42:06 -0800 Subject: sparc: explicitly cast negative phandle checks to s32 When we switched sparc from using 'int's to 'phandle's (which is a u32), we neglected to do anything with the various checks for -1. For those tests, explicitly cast the phandles to s32. Signed-off-by: Andres Salomon Acked-by: David S. Miller Signed-off-by: Grant Likely --- drivers/sbus/char/jsflash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/sbus/char') diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index a624f5af432..e8566224fe4 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c @@ -467,7 +467,7 @@ static int jsflash_init(void) node = prom_getchild(prom_root_node); node = prom_searchsiblings(node, "flash-memory"); - if (node != 0 && node != -1) { + if (node != 0 && (s32)node != -1) { if (prom_getproperty(node, "reg", (char *)®0, sizeof(reg0)) == -1) { printk("jsflash: no \"reg\" property\n"); -- cgit v1.2.3-70-g09d2