Robert Jarzmik <robert.jarz...@free.fr> writes:

>       } else if (pdata) {
>               type = pdata->type;
>               clk_rate = pdata->clk_rate;
>               needs_vcc = pdata->needs_vcc;
> -             nop->gpio_reset = pdata->gpio_reset;
> -     } else {
> -             nop->gpio_reset = -1;


> +             err = devm_gpio_request_one(dev, pdata->gpio_reset, 0,
> +                                         dev_name(dev));
> +             if (!err)
> +                     nop->gpiod_reset = gpio_to_desc(pdata->gpio_reset);
This 4 lines block should be conditionally encompassed with a :
     if (gpio_is_valid(pdata->gpio_reset))

When I reread our previous conversation the "optional" part hit me there.

Cheers.

-- 
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to