Re: [PATCH v1] usb: phy: generic: migrate to gpio_desc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Jarzmik <robert.jarzmik@xxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux