Re: [PATCH] staging: iio: adt7316: Switch to the gpio descriptor interface
From: Dan Carpenter
Date: Tue Oct 23 2018 - 01:40:57 EST
On Mon, Oct 22, 2018 at 10:44:22PM +0530, Nishad Kamdar wrote:
> - chip->ldac_pin = adt7316_platform_data[1];
> + chip->ldac_pin = devm_gpiod_get(dev, "ldac", GPIOD_OUT_HIGH);
> + if (IS_ERR(chip->ldac_pin)) {
> + ret = PTR_ERR(chip->ldac_pin);
> + dev_err(dev, "Failed to request ldac GPIO: %d\n",
> + ret);
This can fit on one line:
dev_err(dev, "Failed to request ldac GPIO: %d\n", ret);
regards,
dan carpenter
> + return ret;
> + }