[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <50B46880.30109@samsung.com>
Date: Tue, 27 Nov 2012 16:15:12 +0900
From: Chanwoo Choi <cw00.choi@...sung.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] extcon: arizona: Only set GPIO if it has been requested
On 11/27/2012 03:35 PM, Mark Brown wrote:
> On Tue, Nov 27, 2012 at 08:26:35AM +0900, Chanwoo Choi wrote:
>> On 11/26/2012 08:28 PM, Mark Brown wrote:
>
>>> + if (arizona->pdata.micd_pol_gpio > 0)
>>> + gpio_set_value_cansleep(arizona->pdata.micd_pol_gpio,
>>> + info->micd_modes[mode].gpio);
>
>> Why not use gpio_is_valid() function to test arizona->pdata.micd_pol_gpio ?
>
> Zero is normally a valid GPIO (since it's an index into a big array
> after all) but this is unhelpful when checking to see if someone filled
> in platform data as it's also the default value for uninitialised member
> variables. It's much more likely that someone didn't fill in a GPIO
> than that GPIO 0 got assigned to this.
OK, Applied it.
You can check it after some minutes.
- git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git (for-next branch)
Thanks,
Chanwoo Choi
--
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