[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5526561B.8000102@nvidia.com>
Date: Thu, 9 Apr 2015 16:06:11 +0530
From: Laxman Dewangan <ldewangan@...dia.com>
To: Mark Brown <broonie@...nel.org>
CC: <lgirdwood@...il.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: max8973: get rid of extra variable for gpio
validity
On Wednesday 08 April 2015 08:12 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Wed, Apr 08, 2015 at 07:08:00PM +0530, Laxman Dewangan wrote:
>> To find that dvs-gpio is valid or not, gpio API gpio_is_valid()
>> can be directly used instead of intermediate variable.
>>
>> Removing the extra variable and using the gpio_is_valid().
> Are you sure that platform data using 0 as default/unset is still
> handled correctly after this?
>
This issue already exist and this patch will not handle this case
because gpio_is_valid() return true for gpio 0 also.
I search the registration of this driver on linux-next and found that it
is used from DT only. No one is registering this device from non-DT.
However, I can push another patch to fix the issue as if platform data
is provided from non-DT and dvs_gpio is 0 then mark this as -EINVAL so
that it will treat this as invalid gpio.
Still there will be issue if some platform have real GPIO number as 0
and register from board files.
Does it make sense?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists