Fix a bug that could fail to initialize GPIO pins specified in "gpios" because

"gpio-controller" property at the controller node was always ignored.
This commit is contained in:
Hiroki Sato 2012-08-18 11:33:21 +00:00
parent 26ca49652b
commit d542454787

View File

@ -547,7 +547,7 @@ mv_handle_gpios_prop(phandle_t ctrl, pcell_t *gpios, int len)
struct mv_gpio_softc sc;
pincnt = 0;
if (OF_getproplen(ctrl, "gpio-controller") <= 0)
if (!OF_hasprop(ctrl, "gpio-controller"))
/* Node is not a GPIO controller. */
return (ENXIO);