[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALAqxLV5mJB3Aphdxk527c9okjdaoXAOD436OF=fji3w0wWrNQ@mail.gmail.com>
Date: Mon, 20 Nov 2017 12:13:36 -0800
From: John Stultz <john.stultz@...aro.org>
To: Hans Verkuil <hverkuil@...all.nl>
Cc: Arnd Bergmann <arnd@...db.de>, David Airlie <airlied@...ux.ie>,
lkml <linux-kernel@...r.kernel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Hans Verkuil <hans.verkuil@...co.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Bhumika Goyal <bhumirks@...il.com>
Subject: Re: [RFC] [PATCH] drm: adv7511/33: Fix adv7511_cec_init() failure handling
On Fri, Nov 17, 2017 at 12:43 AM, Hans Verkuil <hverkuil@...all.nl> wrote:
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index 3a33075dbb22..56eeeea6a1fa 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1202,9 +1202,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
> offset = adv7511->type == ADV7533 ? ADV7533_REG_CEC_OFFSET : 0;
>
> #ifdef CONFIG_DRM_I2C_ADV7511_CEC
> - ret = adv7511_cec_init(dev, adv7511, offset);
> - if (ret)
> - goto err_unregister_cec;
> + adv7511_cec_init(dev, adv7511, offset);
> #else
> regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset,
> ADV7511_CEC_CTRL_POWER_DOWN);
One tiny nit-pick I realized I should have made in my patch...
In the !CONFIG_DRM_I2C_ADV7511_CEC, can you just define adv7511_cec_init() as
{
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset,
ADV7511_CEC_CTRL_POWER_DOWN);
}
Then we can call it either way, and don't need to have the ufly
#ifdefs in the adv7511_probe function?
thanks
-john
Powered by blists - more mailing lists