Messages in this thread | | | Date | Fri, 28 Oct 2011 21:53:54 +0200 | Subject | Re: [PATCH 2/2] pinmux: Unify pin type from signed to unsigned. | From | Linus Walleij <> |
| |
On Thu, Oct 27, 2011 at 8:13 AM, Belisko Marek <marek.belisko@gmail.com> wrote: > On Wed, Oct 26, 2011 at 11:06 PM, David Rientjes <rientjes@google.com> wrote: >> On Wed, 26 Oct 2011, Marek Belisko wrote: >> >>> /* Sufficiently stupid default function when pinctrl is not in use */ >>> -static inline bool pin_is_valid(struct pinctrl_dev *pctldev, int pin) >>> +static inline bool pin_is_valid(struct pinctrl_dev *pctldev, unsigned int pin) >>> { >>> return pin >= 0; >>> } >> >> >> So this would just become return true, right? > > Right I've overlooked it. Will send update version.
Well, actually the idea was that the external interface to the pin control should have a signed value, so as to detect negative pin numbers as "invalid".
Internally, and towards the pin control driver backends it is supposed to be unsigned, because we don't want to have to check it for being negative all the time.
So can you please make a patch only patching pin_desc_get() to begin with?
For pin_is_valid() we rather should find out if it will have any external users (like for GPIO) or if we should just delete that function (now that pin control doesn't use it internally anymore).
Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |