diff --git a/src/rpi.c b/src/rpi.c index 30c75a1..f48e499 100644 --- a/src/rpi.c +++ b/src/rpi.c @@ -21,11 +21,11 @@ unsigned bcm_host_get_peripheral_address(void) unsigned address = get_dt_ranges("/proc/device-tree/soc/ranges", 4); if (address == 0) address = get_dt_ranges("/proc/device-tree/soc/ranges", 8); - return address == ~0 ? 0x20000000 : address; + return address == ~0u ? 0x20000000 : address; } unsigned bcm_host_get_sdram_address(void) { unsigned address = get_dt_ranges("/proc/device-tree/axi/vc_mem/reg", 8); - return address == ~0 ? 0x40000000 : address; + return address == ~0u ? 0x40000000 : address; } diff --git a/src/rpi.h b/src/rpi.h index f3632a5..f1e8fe9 100644 --- a/src/rpi.h +++ b/src/rpi.h @@ -1,3 +1,3 @@ -static unsigned get_dt_ranges(const char *filename, unsigned offset); +unsigned get_dt_ranges(const char *filename, unsigned offset); unsigned bcm_host_get_peripheral_address(void); unsigned bcm_host_get_sdram_address(void);