Changed so the len parameter in gpio_valid() are const.